On Mon, 05.02.07 09:17, Alexander Larsson ([EMAIL PROTECTED]) wrote: > > This wouldn't work. Unfortunately most applications first query for > > IPv6 hostnames and then for IPv4 hostnames. i.e. the order which > > address we return first is not specified by us, but depends on the > > application. > > Well. Such applications would still have problems. However it would be > nice if there was a easy way to fix them. (I.E. let you specify "I > handle both ipv6 and ipv4, give me the 'best' version".)
The problem is glibc's gethostbyname2(). It expects an address family argument, which may be either AF_INET or AF_INET6, but unfortunately not AF_UNSPEC. On Linux NSS modules such as libnss-mdns provide an implementation for gethostbyname2(). getaddrinfo() would be a solution here. However, AFAIK NSS modules may not provide an implementation for that function, instead it is emulated on top of gethostbyname2(). > > Isn't it possible to set a proper IPv6 route for the link-local block and > > thus allowing usage of those addresses even without specifying the > > interface on connect()? That way IPv6 link-local addresses would > > behave much the same way as IPv4 link-local addresses. -- if this is > > is not possible with current Linux kernels, then maybe it's time to fix > > the kernel. Otherwise people will never start to use IPv6 link-local > > addresses for anything useful. > > This isn't only a problem with connect(). For instance, I first found > this in gnome-user-share where we look for exposed dav shares and > construct a URI from them. However, there is no way to create a URI for > a link-local ipv6 address (as you can't put the interface in it), and > even if you do using the ipv4 address would be better (unless it was > also link-local) because then you could hand the uri to another machine > and it would resolve. Redhat has a few kernel developers employed, hasn't it? Maybe you can ping your fellow colleagues and ask them what could be done to make link-local IPv6 addresses more usable! ;-) Lennart -- Lennart Poettering; lennart [at] poettering [dot] net ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/ _______________________________________________ avahi mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/avahi
