Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2009 11:18:25 -0400
From:      David Horn <dhorn2000@gmail.com>
To:        freebsd-net@freebsd.org, dhorn2000@gmail.com
Subject:   Re: Dynamic loading of network kernel modules?
Message-ID:  <25ff90d60903180818j16996fd5vf9dda27a1ebd0d0f@mail.gmail.com>
In-Reply-To: <200903180937.n2I9btPQ036563@lurza.secnetix.de>
References:  <25ff90d60903171427y4032d11es516d7b757fc3b8e0@mail.gmail.com> <200903180937.n2I9btPQ036563@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, Mar 18, 2009 at 5:37 AM, Oliver Fromme <olli@lurza.secnetix.de> wrote:
> David Horn wrote:
>  > I made a minor change to ifconfig to try kldloading the interface name
>  > specified on the create wlandev XXXX (ifconfig already tries for
>  > normal invocations, just needed to try with the wlandev interface)
>  > [...]
>  > This works nicely, however at startup, I still do not get the
>  > interface up, or the kernel module loaded, so a second patch is
>  > needed.
>
> I don't understand why you have to patch anything.  It
> seems to work for me out of the box.  For example, with
> the following entries in /etc/rc.conf, all required KLD
> modules are loaded automatically, and the interfaces
> are up:

The first patch is required for dynamic kernel loading in the wlandev
invocation of ifconfig.  e.g.:

ifconfig wlan create wlandev iwn0

This is part of the vaps changes, and ifconfig was not updated yet for
this new kernel load case.

>
> ifconfig_bge0="up"
> cloned_interfaces="vlan103 vlan105"
> ifconfig_vlan103="inet 10.103.0.20/16 vlan 103 vlandev bge0"
> ifconfig_vlan105="inet 10.105.0.20/16 vlan 105 vlandev bge0"

Interesting.  Are you certain that bge is a kernel module, and not
statically built into your kernel ?
Are you using /boot/loader.conf to load the module  ?
What does kldstat show ?

I ran through all of the case scenarios I can find, and the rc.d
scripts would not call ifconfig on an interface that did not already
have  a kernel module loaded.

If you know something here that I do not, please share. :)

--Thanks!

--Dave H

>
> Best regards
>   Oliver
>
> --
> Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
> Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
> secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
> chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
>
> FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd
>
> "Unix gives you just enough rope to hang yourself --
> and then a couple of more feet, just to be sure."
>        -- Eric Allman
>



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