From owner-freebsd-net@FreeBSD.ORG Mon Dec 20 14:59:10 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 5EABB1065672 for ; Mon, 20 Dec 2010 14:59:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 247948FC2D for ; Mon, 20 Dec 2010 14:59:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C97E546B17; Mon, 20 Dec 2010 09:59:09 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E745E8A029; Mon, 20 Dec 2010 09:59:08 -0500 (EST) From: John Baldwin To: freebsd-net@freebsd.org Date: Mon, 20 Dec 2010 08:07:55 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <20101220061057.GA36160@zibbi.meraka.csir.co.za> In-Reply-To: <20101220061057.GA36160@zibbi.meraka.csir.co.za> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012200807.57670.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 20 Dec 2010 09:59:09 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: 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 14:59:10 -0000 On Monday, December 20, 2010 1:10:57 am John Hay wrote: > 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? This looks correct. Please fix and MFC. I haven't merged the kernel changes to change the type of IFT_ for vlan's yet as I was worried about applications such as this needing to be updated (such as dhcpd for example). I had thought that I had not merged the kernel change to 8 though, that it was just in 9? -- John Baldwin