Bug #38457
opencommon/msg: sockaddr on FreeBSD differs from Linux, has sa_len
0%
Description
On Linux the definition of a sockaddr is:
```
struct sockaddr {
sa_family_t sa_family;
char sa_data14;
}
```
And on FreeBSD ik looks like:
```
struct sockaddr {
unsigned char sa_len; /* total length /
sa_family_t sa_family; / address family /
char sa_data14; / actually longer; address value */
};
```
We need to do 2 things:
- maintain the sa_len value for FreeBSD, otherwise memcmp() calls
can return unequal, where the only difference would be `sa_len`.
sa_len is set on returns from the FreeBSD syscalls.
- Look into comparing structures whch have sockaddr as members.
Testing with `ceph_test_msgr` will show all poll tests failing.
Most of the time the script wil just loop endlessly.
Future work could be to actually rework the comparission routines in
msg_types.h to make full use of the structure. But for now it looks
like it not needed.
Updated by Willem Jan Withagen about 5 years ago
Needs to be backported to
Mimic
Luminous
Updated by Yuri Weinstein about 5 years ago
- Project changed from Stable releases to Ceph
Updated by Nathan Cutler about 5 years ago
- Tracker changed from Tasks to Bug
- Regression set to No
- Severity set to 3 - minor
Willem Jan Withagen wrote:
Needs to be backported to
Mimic
Luminous
@Willem: There was no "Backport" field because you opened this in the wrong tracker. "Stable Releases" is, arguably, misleadingly named. You are not the first to open a bug there.
Updated by Patrick Donnelly about 5 years ago
- Project changed from Ceph to Messengers
- Target version set to v15.0.0
- Start date deleted (
02/23/2019) - Source set to Community (dev)
- Backport changed from mimic, luminous to nautilus,mimic,luminous
Updated by Willem Jan Withagen almost 4 years ago
This bug also causes errors in test_compression.cc.
Where the JSON output diff of the OSDMap structure between Linux and BSD
Results in:
*** 314,320 **** "addrvec": [ { "type": "v1", ! "addr": "(unrecognized address family \u0000)", "nonce": 1972920 } ] --- 314,320 ---- "addrvec": [ { "type": "v1", ! "addr": "128.142.161.208:6827", "nonce": 1972920 } ] ***************