Date: Sun, 13 May 2007 08:20:04 +1200 From: Andrew Thompson <thompsa@freebsd.org> To: Fredrik Lindberg <fli@FreeBSD.org> Cc: freebsd-current@freebsd.org Subject: Re: Network interface modules keeps re-loading Message-ID: <20070512202004.GA71624@heff.fud.org.nz> In-Reply-To: <4645E8A2.1040408@FreeBSD.org> References: <4645E8A2.1040408@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 12, 2007 at 06:17:38PM +0200, Fredrik Lindberg wrote: > Hi > > Due to some exciting interaction between kldunload, devctl/devd, rc(8) > and ifconfig it's currently impossible to unload a network interface > module (without stopping devd first). > > The feature of having ifconfig loading modules was discussed briefly > on current@ a while ago, but apparently nothing came out of it. > > ifmaybeload() is called quite early in ifconfig, my suggestion is to > only call it if there is at least one more argument except the interface > name given on the command line. > diff -u -u -r1.130 ifconfig.c > --- ifconfig.c 24 Mar 2007 20:26:54 -0000 1.130 > +++ ifconfig.c 12 May 2007 16:13:39 -0000 > @@ -229,7 +229,8 @@ > argc--, argv++; > > /* check and maybe load support for this interface */ > - ifmaybeload(ifname); > + if (argc >= 1) > + ifmaybeload(ifname); A similar solution to this was committed in rev1.129 of ifconfig.c but then backed out later as the module loading proved to be feature used by quite a few people. I think an example was being able to load and initialise an interface by just trying 'ifconfig foo0'. I think a different way to solve this is to add a argument to ifconfig to suppress the module loading and then use it at the appropriate places in rc. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070512202004.GA71624>