Project

General

Profile

Actions

Bug #8472

closed

Using strncmp to compare sockaddr_in.

Added by Kevin Cox almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

100%

Source:
Community (user)
Tags:
Backport:
Regression:
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

Actions

Also available in: Atom PDF