Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2006 00:19:11 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Yar Tikhiy <yar@comp.chem.msu.su>
Cc:        freebsd-net@FreeBSD.org
Subject:   Re: Handling flags on vlan(4)
Message-ID:  <20060130211911.GG90131@FreeBSD.org>
In-Reply-To: <20060130193937.GG72743@comp.chem.msu.su>
References:  <20060130193937.GG72743@comp.chem.msu.su>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 30, 2006 at 10:39:38PM +0300, Yar Tikhiy wrote:
Y> Presently our vlan(4) driver sets interface's flags to 0 initially
Y> and copies a subset of them from the parent interface when the vlan
Y> interface is attached to its parent.  In particular, copied are flags
Y> IFF_BROADCAST and IFF_MULTICAST.  This approach has an unpleasant
Y> consequence: if you assign IP to vlan before attaching the latter to
Y> its parent, IP won't be properly set up on vlanX because the IP code
Y> does some special things for IFF_BROADCAST and IFF_MULTICAST
Y> interfaces; at least it sets up a broadcast address and joins the
Y> all-hosts group.
Y> 
Y> I can see two ways to deal with the problem.  The ideal and hard
Y> way is to provide hooks to notify upper network stack layers of
Y> changes in interface properties.  However, I doubt if such feature
Y> is called for.  The easy and practical way is to set IFF_BROADCAST
Y> and IFF_MULTICAST on vlan from the beginning and prohibit vlan from
Y> attaching to a non-bcast or non-mcast parent (which wouldn't work
Y> anyway.)

For now we can use the second way. I see no problems with it.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE



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