[asterisk-bugs] [JIRA] (ASTERISK-20572) Realtime Peers behind NAT are Set to RFC1918 private address after sip reload
Olivier Thibeault (JIRA)
noreply at issues.asterisk.org
Tue Jun 2 07:31:33 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-20572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=226430#comment-226430 ]
Olivier Thibeault commented on ASTERISK-20572:
----------------------------------------------
Stil broken in asterisk 11
Here the patch for asterisk 11.16
------------------------------------------------------------
chan_sip.c, Line : 30899
} else if (!strcasecmp(v->name, "host")) {
if (!strcasecmp(v->value, "dynamic")) {
/* They'll register with us */
- if ((!found && !ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS)) || !peer->host_dynamic) {
+ if (((!found && !ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS)) || !peer->host_dynamic) && !realtime ) {
/* Initialize stuff if this is a new peer, or if it used to
* not be dynamic before the reload. */
ast_sockaddr_setnull(&peer->addr);
}
peer->host_dynamic = TRUE;
> Realtime Peers behind NAT are Set to RFC1918 private address after sip reload
> -----------------------------------------------------------------------------
>
> Key: ASTERISK-20572
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-20572
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/General, PBX/pbx_realtime
> Affects Versions: 10.9.0
> Reporter: JoshE
> Severity: Critical
> Target Release: 1.8.19.0, 10.11.0, 10.11.0-digiumphones, 11.1.0
>
> Attachments: fix_nat_realtime.diff
>
>
> Repro steps:
> Realtime peer behind RFC1918 NAT.
> Register the peer and verify public IP address shows up under 'sip show peers'.
> Issue a SIP reload.
> Perform any dial action that will cause the peer reload process to happen.
> Check 'sip show peers'.
> The private IP address will be listed. If that peer is qualified, it will immediately go offline and remain so until it re-registers.
> Traced problem back to dynamic host detection nulling out the ast_sockaddr if it is in !found state.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list