Subject: Re: ipv6 link-local multicast problems
To: Jun-ichiro itojun Hagino <itojun@itojun.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-net
Date: 11/07/2003 20:51:46
itojun@itojun.org said:
> i would suggest specifying interface
> 	explicitly, always, even with IPV6_JOIN_GROUP. 

Thanks -- yes, it is easy because the id is needed for the bind()
anyway. The ntp-4.2 code just doesn't care about scope_ids at all --
do other IPv6 implementations not need it to be specified?

Can one assume that every IPv6 stack worth using supports
the sin6_scope_id member (so it wouldn't need #ifdefs)?

Another problem I ran into with ntp-4.2 is that it picked up
KAME-mangled link-local IPv6 addresses when it enumerated its
interfaces. (ie, with the scope id in byte 3)
While bind()ing to such an address works (the non-zero bytes are
silently ignored), this breaks crypto authentication because
the sending IPv6 address is used to calculate a session key.
Imho, these mangled addresses shouldn't occur outside the
kernel (except for kvm readers, where it can hardly be avoided).
Both the sysctl() and the SIOCGIFCONF method however pass the
internal representation of the addresses to users.
Well, user code can fix it (as some NetBSD utilities as eg route(8)
do), but this seems unnecessary because in both cases a complete
sockaddr structure is passed, so the scope_id can be put into
its designated field.

best regards
Matthias