From owner-freebsd-net@FreeBSD.ORG Mon Dec 20 15:56:09 2010 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29BE9106566B; Mon, 20 Dec 2010 15:56:09 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id 237288FC15; Mon, 20 Dec 2010 15:56:07 +0000 (UTC) Received: from alph.d.allbsd.org (p3165-ipbf2308funabasi.chiba.ocn.ne.jp [114.148.246.165]) (authenticated bits=128) by mail.allbsd.org (8.14.4/8.14.3) with ESMTP id oBKFtmAw073545; Tue, 21 Dec 2010 00:55:58 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.4/8.14.4) with ESMTP id oBKFtkuj028897; Tue, 21 Dec 2010 00:55:48 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Tue, 21 Dec 2010 00:54:58 +0900 (JST) Message-Id: <20101221.005458.144703395.hrs@allbsd.org> To: jhay@FreeBSD.org From: Hiroki Sato In-Reply-To: <201012200807.57670.jhb@freebsd.org> References: <20101220061057.GA36160@zibbi.meraka.csir.co.za> <201012200807.57670.jhb@freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Tue_Dec_21_00_54_58_2010_817)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [133.31.130.32]); Tue, 21 Dec 2010 00:56:02 +0900 (JST) X-Spam-Status: No, score=-98.2 required=13.0 tests=AWL,CONTENT_TYPE_PRESENT, FORGED_RCVD_IP, RCVD_IN_CHINA, RCVD_IN_CHINA_KR, RCVD_IN_PBL, RCVD_IN_TAIWAN, SPF_SOFTFAIL, USER_IN_WHITELIST, X_MAILER_PRESENT autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gatekeeper.allbsd.org Cc: freebsd-net@FreeBSD.org, jhb@FreeBSD.org Subject: Re: IFT_L2VLAN and IPv6 link-local addresses X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2010 15:56:09 -0000 ----Security_Multipart(Tue_Dec_21_00_54_58_2010_817)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit John Baldwin wrote in <201012200807.57670.jhb@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 ----Security_Multipart(Tue_Dec_21_00_54_58_2010_817)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAk0PfFIACgkQTyzT2CeTzy1h4wCeJaHEMhyf3i+yNxZa7Gc7lyhS 4y0AoLBQk5pOySS60nEVIEppIeSaUY8o =ki4p -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Dec_21_00_54_58_2010_817)----