[asterisk-dev] [Code Review] 4563: chan_sip: handle IPv4 mapped clients when NAT and IPv6 socket is enabled

Michael Young reviewboard at asterisk.org
Tue Apr 7 14:44:29 CDT 2015



> On March 31, 2015, 11:19 a.m., Michael Young wrote:
> > I would hold off on committing this patch as I feel it is not really a proper solution.  I believe that this is just short circuiting the conditional and always applying remapping if IPv6 is involved or not.  On the issue tracker, Valentin has provided some debug logs which, unless I am reading them wrong, point to a configuration error.  The IPv4 addresses are not being mapped to IPv6 at all according to the debug logs.
> 
> Joshua Colp wrote:
>     If the socket is bound to :: they'll be IPv6 mapped. I've seen this in the PJSIP world (where it's not supported).
> 
> Joshua Colp wrote:
>     To respond to myself: I also checked the ACL code which is used for the localnet stuff, and it seems to support IPv6 mapped addresses.

Okay, I will withdraw my concerns.  I guess I never realized what was happening "behind the scenes".  After looking further into this, I understand things better now.  Thanks for correcting me.


- Michael


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4563/#review14973
-----------------------------------------------------------


On March 30, 2015, 10:23 a.m., Valentin Vidić wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4563/
> -----------------------------------------------------------
> 
> (Updated March 30, 2015, 10:23 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-18032
>     https://issues.asterisk.org/jira/browse/ASTERISK-18032
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When udpbindaddr=:: is set Asterisk accepts IPv4 and IPv6 clients both stored in a struct sockaddr_in6 with AF_INET6 family type. Current NAT code for IPv4 checks if the socket type is AF_INET6 and thus fails to handle IPv4 mapped addresses properly. The patch adds an additional check for this case allowing IPv4 clients to be handled by NAT even when IPv6 is enabled.
> 
> 
> Diffs
> -----
> 
>   /branches/11/channels/chan_sip.c 433794 
> 
> Diff: https://reviewboard.asterisk.org/r/4563/diff/
> 
> 
> Testing
> -------
> 
> Patch solves the problem of failing incoming calls on a local NATed installation with IPv6 sockets enabled.
> 
> 
> Thanks,
> 
> Valentin Vidić
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150407/6142c942/attachment-0001.html>


More information about the asterisk-dev mailing list