Date: Mon, 30 Jan 2006 22:39:38 +0300 From: Yar Tikhiy <yar@comp.chem.msu.su> To: freebsd-net@freebsd.org Subject: Handling flags on vlan(4) Message-ID: <20060130193937.GG72743@comp.chem.msu.su>
next in thread | raw e-mail | index | archive | help
Hi folks, Presently our vlan(4) driver sets interface's flags to 0 initially and copies a subset of them from the parent interface when the vlan interface is attached to its parent. In particular, copied are flags IFF_BROADCAST and IFF_MULTICAST. This approach has an unpleasant consequence: if you assign IP to vlan before attaching the latter to its parent, IP won't be properly set up on vlanX because the IP code does some special things for IFF_BROADCAST and IFF_MULTICAST interfaces; at least it sets up a broadcast address and joins the all-hosts group. I can see two ways to deal with the problem. The ideal and hard way is to provide hooks to notify upper network stack layers of changes in interface properties. However, I doubt if such feature is called for. The easy and practical way is to set IFF_BROADCAST and IFF_MULTICAST on vlan from the beginning and prohibit vlan from attaching to a non-bcast or non-mcast parent (which wouldn't work anyway.) Any comments? -- Yar
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060130193937.GG72743>