From: Jonathan Rose Date: Tue, 14 Jun 2011 16:38:43 +0000 (+0000) Subject: Changes contact use in build_peer to use the FORCE_RPORT flag instead of RPORT_PRESENT X-Git-Tag: 1.8.5-rc1~11^2~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9e5239e8aed3dfa612106401ab257d1e9f8802e;p=thirdparty%2Fasterisk.git Changes contact use in build_peer to use the FORCE_RPORT flag instead of RPORT_PRESENT It turned out that this was causing NAT=Yes to always use rport when present which was against 1.6.2 behavior and the check itself was redundant since the only way this segment of code could be reached was if RPORT_PRESENT was already evaluated as true earlier. (closes issue ASTERISK-17789) Reported by: byronclark Patches: use_sip_nat_force_rport.patch uploaded by byronclark (license 1200) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323371 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4b16fa21a5..b6ee0b9b94 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -26753,7 +26753,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str * specified, use that address instead. */ /* XXX May need to revisit the final argument; does the realtime DB store whether * the original contact was over TLS or not? XXX */ - if (!ast_test_flag(&peer->flags[0], SIP_NAT_RPORT_PRESENT) || ast_sockaddr_isnull(&peer->addr)) { + if (!ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) || ast_sockaddr_isnull(&peer->addr)) { __set_address_from_contact(fullcontact->str, &peer->addr, 0); } }