[asterisk-dev] IPv4 and IPv6 preference

Klaus Darilion klaus.mailinglists at pernau.at
Mon Jul 19 07:53:02 CDT 2010



Am 16.07.2010 15:33, schrieb Simon Perreault:
>> I've been trying to understand some of the DNS support for IPv6 and can't find traces here. It seems a bit random.
> By default, on most OSes, getaddrinfo() will return IPv6 results first.
>
> We make no attempt to change the default order. However, we don't want
> to connect to IPv6 addresses if we are bound only to IPv4, and
> vice-versa. So we implemented the following heuristic:
>
> - If bindaddr is the IPv6 wildcard address (i.e. ::), we do not filter
> results.
> - If bindaddr is an IPv4 address, we only use IPv4 results.
> - Otherwise, we only use IPv6 results.

What is the default bindaddr? 0.0.0.0 or :: ?
I think, even if bindaddr is ::, it should be checked if the server 
really has a global IPv6 address - not only a link-local address, before 
trying to send SIP over v6.

regards
klaus



More information about the asterisk-dev mailing list