Date: Tue, 2 Jun 2009 15:11:03 -0400 From: John Baldwin <jhb@freebsd.org> To: Brooks Davis <brooks@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Bruce Simpson <bms@incunabulum.net>, src-committers@freebsd.org, Doug Barton <dougb@freebsd.org> Subject: Re: svn commit: r193199 - head/etc Message-ID: <200906021511.03955.jhb@freebsd.org> In-Reply-To: <20090602165021.GB15552@lor.one-eyed-alien.net> References: <200906010537.n515bDou065357@svn.freebsd.org> <4A25491B.4030406@incunabulum.net> <20090602165021.GB15552@lor.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 02 June 2009 12:50:21 pm Brooks Davis wrote: > On Tue, Jun 02, 2009 at 04:45:31PM +0100, Bruce Simpson wrote: > > Brooks Davis wrote: > >> ... > >>> On boot time I instantiate a tap0 instance from cloned_interfaces=".." in > >>> /etc/rc.conf, and then use ifconfig_tap0="..." to clone the MAC address > >>> on the tap instance from the internal Ethernet port, as there is no other > >>> way of uniquely identifying the client for an automated bootstrap. > >>> > >>> This happens from within a flash image. > >>> > >> > >> I see nothing related to network_interfaces here... > >> > > > > I did explicitly name them there, so there would be no automated DHCP setup > > of any interfaces, even if hot-plugged. Perhaps I am thinking of > > cloned_interfaces=""... > > cloned_interfaces is different and will definiterly remain since you've > got to create them some how. They get created early and thus end up on > the list. Also, there's no need to worry about hot plugged interfaces > getting margically configured to do dhcp. For the system to do > something with an interface they following must be true: > > - It makes it in to the list of interfaces some how > - It actually exists or is create early in the process via > cloned_interfaces, gif_interfaces, etc > - The ifconfig_<if> variable is set (I think i can be "", but "up" is > alwasy a good choice if you just want a stub. > - The ifconfig_<if> variable must not contain the NOAUTO keyword. > > If all of those things are true, the interface will be configured at > startup or on insert. Otherwise, it won't be. I think more specifically, if you don't set 'ifconfig_<if>' to "DHCP", then when you plug a <if> device in, nothing happens. DHCP is opt-in, not opt-out. The only reason one would want to limit network_interfaces is if you wanted to have an ifconfig_foo0 line in /etc/rc.conf but not have foo0 configured automatically. But you can already accomplish that via either the 'NOAUTO' keyword or just not having a bogus ifconfig_foo0 line. Given that, there really isn't a good reason to customize network_interfaces anymore. Unless someone has a real usage case that NOAUTO, etc. doesn't cover, I think this commit should be reverted. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906021511.03955.jhb>