Bug #38457
open
common/msg: sockaddr on FreeBSD differs from Linux, has sa_len
Added by Willem Jan Withagen about 5 years ago.
Updated almost 4 years ago.
Backport:
nautilus,mimic,luminous
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.
Needs to be backported to
Mimic
Luminous
- Project changed from Stable releases to Ceph
- 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.
- Backport set to mimic, luminous
- 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
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
}
]
***************
Also available in: Atom
PDF