[asterisk-dev] NAT mapping while binding to IPv6

Simon Perreault simon.perreault at viagenie.ca
Tue Sep 6 10:18:59 CDT 2011


Jeremy Visser wrote, on 09/04/2011 11:07 AM:
> In ast_sip_ouraddrfor() in chan_sip.c, there is some "if
> (ast_sockaddr_is_ipv6(&theirs))" logic which seems to divert along a separate
> code path for when binding to an IPv6 socket that doesn't support NAT
> mapping.
> 
> I'm not a qualified C coder so please forgive me if I am completely wrong
> here, but am I right in guessing that the NAT handling code is hardcoded to
> expect AF_INET structures, whereas the code path taken if
> ast_sockaddr_is_ipv6() is true uses AF_INET6, leading to the fact that the
> nat= option is being ignored?

Right. The STUN subsystem and other NAT handling code has not been ported to
IPv6 yet. As IPv6 currently has no NAT, doing that was deemed low priority. IMHO
it is a missing feature, not a bug per se.

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca



More information about the asterisk-dev mailing list