Project

General

Profile

Bug #38457

common/msg: sockaddr on FreeBSD differs from Linux, has sa_len

Added by Willem Jan Withagen 4 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
nautilus,mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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.

History

#1 Updated by Willem Jan Withagen 4 months ago

Needs to be backported to
Mimic
Luminous

#2 Updated by Yuri Weinstein 4 months ago

  • Project changed from Stable releases to Ceph

#3 Updated by Nathan Cutler 4 months 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.

#4 Updated by Nathan Cutler 4 months ago

  • Backport set to mimic, luminous

#5 Updated by Patrick Donnelly 3 months 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

Also available in: Atom PDF