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 #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)
Actions #2

Updated by Dan Mick almost 10 years ago

  • Status changed from 12 to Fix Under Review
Actions #3

Updated by Loïc Dachary almost 10 years ago

  • Status changed from Fix Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF