[asterisk-bugs] [Asterisk 0015849]: Recent change to peer_iphash_cb breaks peer matching
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Sep 8 09:29:31 CDT 2009
The following issue requires your FEEDBACK.
======================================================================
https://issues.asterisk.org/view.php?id=15849
======================================================================
Reported By: Nick_Lewis
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 15849
Category: Channels/chan_sip/Interoperability
Reproducibility: have not tried
Severity: major
Priority: normal
Status: feedback
Asterisk Version: SVN
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-09-08 04:05 CDT
Last Modified: 2009-09-08 09:29 CDT
======================================================================
Summary: Recent change to peer_iphash_cb breaks peer matching
Description:
A change has been made to the chan_sip.c function peer_iphash_cb to remove
hashing on the port number. It is not clear why this change was made but it
may be indirectly related to a tcp/tls matching issue. However the change
breaks udp peer matching.
======================================================================
----------------------------------------------------------------------
(0110307) russell (administrator) - 2009-09-08 09:29
https://issues.asterisk.org/view.php?id=15849#c110307
----------------------------------------------------------------------
The issue was that hashing on the port number was problematic when it was
only sometimes going to be used in matching. For example, when matching
with TCP, the port will not be used. So, it was better to remove it from
the hash function.
The hash function doesn't change matching directly. However, it will
affect layout in the hash table. If you're seeing a difference in behavior
now, then you were relying on behavior that was just luck. You can't rely
on peers ending up in a different hash bucket.
For UDP peer matching, if you're matching on both IP and port, then you'll
still get the correct match. If you're not matching with port, then just
as you have configured, you're going for a less exact match, and you will
match the first peer with that IP address that the search comes across.
Issue History
Date Modified Username Field Change
======================================================================
2009-09-08 09:29 russell Note Added: 0110307
2009-09-08 09:29 russell Status new => feedback
======================================================================
More information about the asterisk-bugs
mailing list