[asterisk-bugs] [JIRA] (ASTERISK-20904) RFC1918 NAT Issue On Prune

Michael L. Young (JIRA) noreply at issues.asterisk.org
Wed Feb 27 16:44:18 CST 2013


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

Michael L. Young edited comment on ASTERISK-20904 at 2/27/13 4:42 PM:
----------------------------------------------------------------------

Mark, thanks for reviewing that last patch.  I was getting ready to post a review since it has been in use for over a month now without any issues.

In bringing the patch up to the latest revision and reviewing it one more time, I made two changes that I would like you to confirm that is correct.

The changes I made were to remove copying the SIP_NAT_FORCE_RPORT flag a second time since a few lines up, all these flags were already copied.  Added the copying of the flags to another part of the code that did not have the flags copied at all.  In both places, run check_via which determines if nat is involved and sets SIP_NAT_RPORT and SIP_PAGE2_SYMMETRICRTP accordingly if auto is on.  This is needed before running do_setnat.

If the "useglobal_nat" is turned on, currently we are only copying the SIP_NAT_FORCE_RPORT flag.  I think we need to also copy SIP_PAGE3_NAT_AUTO_RPORT, SIP_PAGE2_SYMMETRICRTP and SIP_PAGE3_NAT_AUTO_COMEDIA as well.  Can you confirm that this change I made is correct?  I have been testing this for the past week+ and haven't seen any problems occur.

Attaching my latest patch, [^asterisk-20904-nat-auto-and-rt-peers.diff], which included changes to the other realtime schemas.

Thanks
                
      was (Author: elguero):
    Mark, thanks for reviewing that last patch.  I was getting ready to post a review since it has been in use for a few months now without any issues.

In bringing the patch up to the latest revision and reviewing it one more time, I made two changes that I would like you to confirm that is correct.

The changes I made were to remove copying the SIP_NAT_FORCE_RPORT flag a second time since a few lines up, all these flags were already copied.  Added the copying of the flags to another part of the code that did not have the flags copied at all.  In both places, run check_via which determines if nat is involved and sets SIP_NAT_RPORT and SIP_PAGE2_SYMMETRICRTP accordingly if auto is on.  This is needed before running do_setnat.

If the "useglobal_nat" is turned on, currently we are only copying the SIP_NAT_FORCE_RPORT flag.  I think we need to also copy SIP_PAGE3_NAT_AUTO_RPORT, SIP_PAGE2_SYMMETRICRTP and SIP_PAGE3_NAT_AUTO_COMEDIA as well.  Can you confirm that this change I made is correct?  I have been testing this for the past week+ and haven't seen any problems occur.

Attaching my latest patch, [^asterisk-20904-nat-auto-and-rt-peers.diff], which included changes to the other realtime schemas.

Thanks
                  
> RFC1918 NAT Issue On Prune
> --------------------------
>
>                 Key: ASTERISK-20904
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20904
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 11.2.0
>            Reporter: JoshE
>            Assignee: Michael L. Young
>         Attachments: asterisk-20904-auto-nat-prune_v1.diff, asterisk-20904-nat-auto-and-rt-peers.diff, rfc1918_patch.diff
>
>
> Issue is related to ASTERISK-20572, but appears to have been reintroduced in Asterisk 11.x.
> Bring up a realtime peer behind separated from the Asterisk server behind NAT.   When the peer is pruned and brought back up, the peer's external NAT address is replaced with the private IP from the contact header, if that address was present.

--
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