Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Dec 2010 08:10:57 +0200
From:      John Hay <jhay@meraka.org.za>
To:        freebsd-net@freebsd.org
Subject:   IFT_L2VLAN and IPv6 link-local addresses
Message-ID:  <20101220061057.GA36160@zibbi.meraka.csir.co.za>

next in thread | raw e-mail | index | archive | help
Hi,

I see that on FreeBSD-8 if you use IPv6 inside vlans, the local part of
the address (bottom 64 bits) is based on the MAC address of the first
ethernet interface on the system. It was not like this in my old -7,
machine, so I looked around a bit. It looks like it is because vlans were
changed to report their type as IFT_L2VLAN. So I made this patch to the
IPv6 code that fix it for me:

Index: sys/netinet6/in6_ifattach.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/in6_ifattach.c,v
retrieving revision 1.74.2.3
diff -u -U 5 -r1.74.2.3 in6_ifattach.c
--- sys/netinet6/in6_ifattach.c	6 May 2010 06:44:19 -0000	1.74.2.3
+++ sys/netinet6/in6_ifattach.c	15 Dec 2010 18:33:45 -0000
@@ -265,10 +265,11 @@
 	addrlen = sdl->sdl_alen;
 
 	/* get EUI64 */
 	switch (ifp->if_type) {
 	case IFT_ETHER:
+	case IFT_L2VLAN:
 	case IFT_FDDI:
 	case IFT_ISO88025:
 	case IFT_ATM:
 	case IFT_IEEE1394:
 #ifdef IFT_IEEE80211

Anything against me committing it? Am I missing something? Should it be
sorted differently? Should it also be merged?

John
-- 
John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101220061057.GA36160>