[svn-commits] elguero: trunk r401184 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Oct 18 10:14:46 CDT 2013
Author: elguero
Date: Fri Oct 18 10:14:36 2013
New Revision: 401184
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401184
Log:
Remove Port Restriction When Checking For NAT
When trying to determine if a peer is behind NAT, we should not be using the
ports when comparing addresses.
This patch removes the port from being checked and just useds the addresses
now.
(closes issue ASTERISK-22729)
Reported by: Michael L. Young
Tested by: Michael L. Young
Patches:
asterisk-remove-using-port-for-nat-check.diff
uploaded by Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2927/
........
Merged revisions 401182 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 401183 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=401184&r1=401183&r2=401184
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Oct 18 10:14:36 2013
@@ -18379,9 +18379,9 @@
return;
}
- if (ast_sockaddr_cmp(addr, &p->recv)) {
- char *tmp_str = ast_strdupa(ast_sockaddr_stringify(addr));
- ast_debug(3, "NAT detected for %s / %s\n", tmp_str, ast_sockaddr_stringify(&p->recv));
+ if (ast_sockaddr_cmp_addr(addr, &p->recv)) {
+ char *tmp_str = ast_strdupa(ast_sockaddr_stringify_addr(addr));
+ ast_debug(3, "NAT detected for %s / %s\n", tmp_str, ast_sockaddr_stringify_addr(&p->recv));
p->natdetected = 1;
if (ast_test_flag(&p->flags[2], SIP_PAGE3_NAT_AUTO_RPORT)) {
ast_set_flag(&p->flags[0], SIP_NAT_FORCE_RPORT);
More information about the svn-commits
mailing list