[Asterisk-Dev] IPv6

David Woodhouse dwmw2 at infradead.org
Mon Apr 4 16:15:38 MST 2005


On Tue, 2005-04-05 at 01:01 +0200, Mikael Magnusson wrote:
> It may break the IPv4 support, since It will never use IPv4 when
> communicating with servers that have AAAA records. 

That's going to be a problem. We need to use getaddrinfo() to get an
RFC3484-sorted list of addresses for a given name, then fall back in
order if they fail. This would be useful even for IPv4-only machines
when connecting to redundant servers.

The best approach here is probably to implement ast_getaddrinfo() for
the legacy systems which don't support it natively, and make asterisk
code use it instead of assuming a 1:1 mapping from names to numbers.

> Use "bindaddr=[::0]" to enable both IPv4 and IPv6 support. And you
> may not disable rtp checksums since UDP checksums are required for IPv6.

On some platforms (some BSDs IIRC) a bind to :: won't accept IPv4
connections. You need to bind to _both_ :: and 0.0.0.0. I think it's
generally done by binding to :: first, then trying to bind to 0.0.0.0
but not being too upset if you get -EADDRINUSE.

-- 
dwmw2




More information about the asterisk-dev mailing list