Bug #8472
Using strncmp to compare sockaddr_in.
% Done:
100%
Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
In /src/msg/msg_types.h strncmp is being used to compare sockaddr_in structures. This means that it will stop at the first zero byte. Meaning for any valid sockaddr_in structure only the IPv4/IPv6ness will be compared on little endian and nothing on big endian.
https://github.com/ceph/ceph/blob/master/src/msg/msg_types.h#L30
Associated revisions
msg_types.h: Don't use strncmp for comparing sockaddr_in.
Fixes: #8472
Signed-off-by: Dan Mick <dan.mick@inktank.com>
History
#1 Updated by Dan Mick almost 10 years ago
- Subject changed from Using ctrncmp to compare sockaddr_in. to Using strncmp to compare sockaddr_in.
- Status changed from New to 12
- Assignee set to Dan Mick
- Source changed from other to Community (user)
#2 Updated by Dan Mick almost 10 years ago
- Status changed from 12 to Fix Under Review
#3 Updated by Loïc Dachary almost 10 years ago
- Status changed from Fix Under Review to Resolved
- % Done changed from 0 to 100