Hi,

On Mon, Mar 29, 2010 at 11:29:42AM +0200, Joachim Breitner wrote:
> With ipv6, does routing work just as with ipv4? I.e. I look through the
> routing table and pick the entry with a ::0 destination netmask?

yes. However, there is a twist: The main use case of issuing
a »ping6 gateway.localhost« on the command-line can not be done
that easily with IPv6 and NSS.

It would work with statically configured routes towards your gateway but
not with router advertisements (which are what DHCPv6 and SLAAC use).
These communicate a link-local address that would need a scope
identifier to denote the interface to use. However, even though it's
easy to fetch the scope from netlink, NSS does not allow to pass it
back to the application through gethostbyname_r.

getaddrinfo returns a struct sockaddr, which does bear a scope field
in its IPv6 form (sin6_scope_id in sockaddr_in6). But I guess it is
not possible to get and answer these calls through NSS.

So it will still work if you manually specify the interface (»ping6 -I
eth0 gateway.localhost«), but it is confusing if you have multiple
interfaces (like eth0 and wlan0).

I've got code that's almost ready to submit. Maybe it will be still
be helpful.

Kind regards
Philipp kern

Attachment: signature.asc
Description: Digital signature

Reply via email to