IFT_L2VLAN and IPv6 link-local addresses
Hiroki Sato
hrs at FreeBSD.org
Mon Dec 20 15:56:09 UTC 2010
John Baldwin <jhb at freebsd.org> wrote
in <201012200807.57670.jhb at freebsd.org>:
jh> On Monday, December 20, 2010 1:10:57 am John Hay wrote:
jh> > Hi,
jh> >
jh> > I see that on FreeBSD-8 if you use IPv6 inside vlans, the local part of
jh> > the address (bottom 64 bits) is based on the MAC address of the first
jh> > ethernet interface on the system. It was not like this in my old -7,
jh> > machine, so I looked around a bit. It looks like it is because vlans were
jh> > changed to report their type as IFT_L2VLAN. So I made this patch to the
jh> > IPv6 code that fix it for me:
jh> >
jh> > Index: sys/netinet6/in6_ifattach.c
jh> > ===================================================================
jh> > RCS file: /home/ncvs/src/sys/netinet6/in6_ifattach.c,v
jh> > retrieving revision 1.74.2.3
jh> > diff -u -U 5 -r1.74.2.3 in6_ifattach.c
jh> > --- sys/netinet6/in6_ifattach.c 6 May 2010 06:44:19 -0000 1.74.2.3
jh> > +++ sys/netinet6/in6_ifattach.c 15 Dec 2010 18:33:45 -0000
jh> > @@ -265,10 +265,11 @@
jh> > addrlen = sdl->sdl_alen;
jh> >
jh> > /* get EUI64 */
jh> > switch (ifp->if_type) {
jh> > case IFT_ETHER:
jh> > + case IFT_L2VLAN:
jh> > case IFT_FDDI:
jh> > case IFT_ISO88025:
jh> > case IFT_ATM:
jh> > case IFT_IEEE1394:
jh> > #ifdef IFT_IEEE80211
jh> >
jh> > Anything against me committing it? Am I missing something? Should it be
jh> > sorted differently? Should it also be merged?
jh>
jh> This looks correct. Please fix and MFC. I haven't merged the kernel changes
jh> to change the type of IFT_ for vlan's yet as I was worried about applications
jh> such as this needing to be updated (such as dhcpd for example). I had thought
jh> that I had not merged the kernel change to 8 though, that it was just in 9?
Agreed with the fix, but I think both 7.X and 8.X pick the first IF's
address anyway. Which log message did you get, "borrow interface
identifier from..." or "...got interface identifier from itself"
when net.inet6.icmp6.nd6_debug=1 on 7.X and 8.X, respectively?
-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20101220/f710ddb9/attachment.pgp
More information about the freebsd-net
mailing list