Date: Sat, 28 Jan 2006 20:33:38 +0300 From: Yar Tikhiy <yar@comp.chem.msu.su> To: Oliver Brandmueller <ob@e-Gitt.NET> Cc: ivt@gamma.ru, stable@freebsd.org, Oleg Bulyzhin <oleg@rinet.ru>, Gleb Smirnoff <glebius@freebsd.org> Subject: Re: problem with vlan interfaces in 6-STABLE Message-ID: <20060128173337.GB70375@comp.chem.msu.su> In-Reply-To: <20060123230147.GB51645@comp.chem.msu.su> References: <20060123122800.GA14800@e-Gitt.NET> <20060123230147.GB51645@comp.chem.msu.su>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 24, 2006 at 02:01:47AM +0300, Yar Tikhiy wrote: > On Mon, Jan 23, 2006 at 01:28:00PM +0100, Oliver Brandmueller wrote: > > > > After my latest update to > > > > FreeBSD hudson 6.0-STABLE FreeBSD 6.0-STABLE #15: > > Mon Jan 23 12:29:38 CET 2006 > > root@hudson:/usr/obj/usr/src/sys/NFS-32-FBSD6 i386 > > > > I have a small problem with my vlan interfaces configured from rc.conf: > > They get configured well, but they are simply not in "up" state as they > > were before autmatically. I can login via console and do > > > > ifconfig vlan340 up > > > > and all is fine. The config did not change during the update: > > > > cloned_interfaces="vlan340" > > ifconfig_em0="up vlanhwtag vlanmtu" > > ifconfig_vlan340="inet xx.xx.xx.xx netmask 255.255.255.192 vlan 340 vlandev em0" > > The problem you're experiencing may be related to changes I committed > to ifconfig in RELENG_6. I'll investigate the issue ASAP and report > my results in this list. In short, I've just backed out my commit to ifconfig in RELENG_6, which should return ifconfig to the good old behaviour. The long story enchased with tech details is as follows. Historically our ifconfig used to set vlan parameters (vlan & vlandev) before IP ones when both kinds of them were specified on the same command line. (This is the case when vlanX is configured using rc.conf.) My change to ifconfig reversed the order (I had overlooked that,) which triggered a couple of kernel bugs. The old version of the if_vlan driver used to just overwrite a vlan interface's flags upon attaching it to its parent, some bits with those from the parent, the others just with 0. Consequently, the UP flag initially set by the IP layer was just reset to 0 by the code. It was the problem reported here. Then glebius@ merged if_vlan from CURRENT to RELENG_6, which remedied the UP loss problem, because now if_vlan was getting a subset of flags from its parent while keeping the others, UP among them. However, another problem has been noticed and tracked down. Namely, the subset of copied flags includes IFF_BROADCAST and IFF_MULTICAST, which means that the IP layer handles a fresh vlan interface differently depending on whether the parent is attached to it. Just assign IP to vlanX first, attach the parent then, and see a bogus or missing broadcast address on the vlanX in a wide range of FreeBSD versions. Today oleg@ and /me investigated the issue and worked out several approaches to it. I'm going to discuss them on net@ and choose an optimal one. The ifconfig utility will stick to its old semantics until then. Sorry for all the inconvenience involved. -- Yar
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060128173337.GB70375>