[asterisk-bugs] [JIRA] (ASTERISK-20572) Realtime Peers behind NAT are Set to RFC1918 private address after sip reload

Mark Michelson (JIRA) noreply at issues.asterisk.org
Mon Oct 29 15:45:18 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198985#comment-198985 ] 

Mark Michelson edited comment on ASTERISK-20572 at 10/29/12 3:43 PM:
---------------------------------------------------------------------

The patch looks correct by me. The purpose of the if statement you modified is to only reset the address if the peer is not previously known or if it is previously known but did not previously have {{host=dynamic}} set. The real issue is that {{!found}} will always be true for realtime peers. As such, {{found}} is not something we should be generally checking unless {{realtime}} is not set.

I'm going to slightly rearrange the order of the if statement in the patch so that the relationship between {{found}} and {{realtime}} is made clear.

Thanks for the submission!
                
      was (Author: mmichelson):
    The patch looks correct by me. The purpose of the if statement you modified is to only reset the address if the peer is not previously known or if it is previously known but did not previously have {{host=dynamic}} set. The real issue is that {{!found}} will always be true for realtime peers. As such, {{found}} is not something we should be generally checking unless {{realtime}} is not set.

I'm going to slightly rearrange the order of the if statement in the patch so that the relationship between {{found}} and {{realtime}} is made clear.

Thanks for the submission!
                  
> 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
>         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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list