[Asterisk-Dev] [Bounty] IPv6 support in Asterisk

David Woodhouse dwmw2 at infradead.org
Tue May 31 02:40:16 MST 2005


On Tue, 2005-05-31 at 08:25 +0200, Olle E. Johansson wrote:
> -- If we fix the SRV record problem - how should we prioritize, or
> should we at all?

It's not just about SRV records -- and I think SRV records have
hostnames in them so it's not actually about SRV records at all. 

All address lookups for _all_ network connections should be done
according to RFC3484. There's a bunch of rules which determine the order
in which candidate addresses should be prioritised, and the results of
getaddrinfo() will be sorted accordingly. Any recent libc ought to get
this right.

Unfortunately, Asterisk isn't actually using getaddrinfo(); it's still
using the old functions which can only return a single result.

The first task in providing sane IPv6 support would be to remove
ast_inet_ntoa() and replace it with something equivalent to
getaddrinfo(). Then fix up all the existing IPv4 support to use it, and
deal correctly with the fact that there can be multiple results even on
the Legacy Internet. You may want to fall back from one address to the
next even if you don't have IPv6.

After that, adding IPv6 support should be relatively easy.

-- 
dwmw2




More information about the asterisk-dev mailing list