[avahi] Link local IPV6 addresses

Alexander Larsson alexl at redhat.com
Mon Feb 5 00:17:31 PST 2007

On Fri, 2007-02-02 at 17:41 +0100, Lennart Poettering wrote:
> On Mon, 08.01.07 09:32, Alexander Larsson (alexl at redhat.com) wrote:
> > It would be nice if Avahi could default to return the ipv4 address if
> > there is both an ipv6/ipv4 versions and the ipv6 address is link-local.
> 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".)

> I am not quite sure what to do about this. 

Neither do I. I'm far from an expert on these details.

> 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.

Anyway, I don't pretend to know the answers, just pointing out a problem
we saw.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl at redhat.com    alla at lysator.liu.se 
He's a notorious Amish jungle king who knows the secret of the alien invasion. 
She's an artistic nymphomaniac mermaid who hides her beauty behind a pair of 
thick-framed spectacles. They fight crime! 

More information about the avahi mailing list