kern/102607: [if_bridge] don't generate random L2 address

Andrew Thompson thompsa at freebsd.org
Fri Sep 1 03:35:24 UTC 2006


On Tue, Aug 29, 2006 at 11:56:29PM +0200, Stefan Bethke wrote:
> Am 28.08.2006 um 18:19 schrieb Andrew Thompson:
> 
> >        1. change kernel code or  to generate static IP address
> >	for bridge interface from attached member interfaces.
> >	     or
> >	2. use startup scripts to generate random number and
> >	   store it somewhere in /var.
> >             or
> >	3. Make system complain/warning if you set bridge0 to broadcast
> >	   address.
> >	     or
> >        4. Document in if_bridge(4) that L2 address is random and  
> >document
> >	   correct format of ethernet addresses.
> >
> 
> First, the actual behavior and it's implications should be documented  
> in if_bridge(4), specifically the random assignment of a locally  
> administered address. (Cf. net/if_bridge.c:bridge_clone_create())
> 
> If the user wants a different (fixed) address on the bridge, I think  
> it's acceptable to configure this in rc.conf along with the member  
> interfaces. (Already implemented: ifconfig_bridge0="create ether  
> 01:23:45:67:89:ab...")

I agree with this. The first option is unfeasable as you cant guarantee
that the members will have a L2 address (tap/gif) and it could make a
dependency where you cant assign an IP until one or more networks are
bridged. As you say the correct way is to use rc.conf to set the MAC and
it just needs a bit more documentation.


Andrew


More information about the freebsd-net mailing list