Re: [Exim] Re: Bug#64531: Exim does not recognize IPv6 local…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Blundell
Data:  
Para: Jason Gunthorpe, 64531, exim-users
Asunto: Re: [Exim] Re: Bug#64531: Exim does not recognize IPv6 local IP's
>The code that gets interface addresses does check the address type it gets
>and looks like it is designed to cope with IPv6 addresses, but as I
>understand it the ioctl it uses won't actually return IPv6 addresses despite
>having an address type field in the response, because that would have broken
>too many old programs that didn't bother to check the type. I can't remember
>what the correct way to get IPv6 addresses is, I think there's a new API
>call (which presumably maps onto some ioctl or something at a lower level)
>but I'm not sure (where is the IPv6 API defined anyway?)


BSD has a function called getifaddrs() that does this job. Linux doesn't have
any direct equivalent at the moment - as you've noted, SIOCGIFCONF doesn't
return IPv6 addresses. You pretty much have to go digging around in /proc
which is obviously Linux specific. I hope that some future release of glibc
will include getifaddrs() but don't expect it any time soon.

The IPv6 API is defined in RFC2553 and RFC2292, though the latter is likely to
be superceded by draft-ietf-ipngwg-rfc2292bis at some point.

p.