From owner-freebsd-net@FreeBSD.ORG Wed Mar 18 15:18:27 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 790C41065670 for ; Wed, 18 Mar 2009 15:18:27 +0000 (UTC) (envelope-from dhorn2000@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id 30B388FC0A for ; Wed, 18 Mar 2009 15:18:26 +0000 (UTC) (envelope-from dhorn2000@gmail.com) Received: by an-out-0708.google.com with SMTP id d11so63949and.13 for ; Wed, 18 Mar 2009 08:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=cw/tkdOiVwdAaYklc518tDguAMHvFFjyfA9XXW2Hr6Q=; b=GspNS+MeHIkx8tFUj1QocQMxuhwJaowfWOiy4jApWjGFzrxwFF2SYIGHPOHh/P1PXf pB23OrLrdzQz93OA6PbhOrndpVzXBDr5r+lrLVrG/tRp3KmMDpOct1xQEHKgj5AERj3t bgnfVkfsJ8NGds5T3wq2QNqy6oRVSlaospq9k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ntT5SAO/i4M36xwiSB2I+6jvGL69d7JyjNTqf6JhJdvCYfDGkik7Crkxgy3mbbImqA BKM8L9M4frotHjYVfcwznytQyRxYM5y4ZjzbKJhJMitBHTf1M1tmRBSXUz+pQD5nxohb +TZJ3zQXHztGgJMZnsPsDbdA1SLQY2PrAs5GE= MIME-Version: 1.0 Received: by 10.231.32.70 with SMTP id b6mr468710ibd.52.1237389505147; Wed, 18 Mar 2009 08:18:25 -0700 (PDT) In-Reply-To: <200903180937.n2I9btPQ036563@lurza.secnetix.de> References: <25ff90d60903171427y4032d11es516d7b757fc3b8e0@mail.gmail.com> <200903180937.n2I9btPQ036563@lurza.secnetix.de> Date: Wed, 18 Mar 2009 11:18:25 -0400 Message-ID: <25ff90d60903180818j16996fd5vf9dda27a1ebd0d0f@mail.gmail.com> From: David Horn To: freebsd-net@freebsd.org, dhorn2000@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Dynamic loading of network kernel modules? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 15:18:27 -0000 On Wed, Mar 18, 2009 at 5:37 AM, Oliver Fromme wro= te: > David Horn wrote: > =A0> I made a minor change to ifconfig to try kldloading the interface na= me > =A0> specified on the create wlandev XXXX (ifconfig already tries for > =A0> normal invocations, just needed to try with the wlandev interface) > =A0> [...] > =A0> This works nicely, however at startup, I still do not get the > =A0> interface up, or the kernel module loaded, so a second patch is > =A0> needed. > > I don't understand why you have to patch anything. =A0It > seems to work for me out of the box. =A0For 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=3D"up" > cloned_interfaces=3D"vlan103 vlan105" > ifconfig_vlan103=3D"inet 10.103.0.20/16 vlan 103 vlandev bge0" > ifconfig_vlan105=3D"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 > =A0 Oliver > > -- > Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. > Handelsregister: Registergericht Muenchen, HRA 74606, =A0Gesch=E4ftsfuehr= ung: > secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M=FC= n- > chen, HRB 125758, =A0Gesch=E4ftsf=FChrer: Maik Bachmann, Olaf Erb, Ralf G= ebhart > > FreeBSD-Dienstleistungen, -Produkte und mehr: =A0http://www.secnetix.de/b= sd > > "Unix gives you just enough rope to hang yourself -- > and then a couple of more feet, just to be sure." > =A0 =A0 =A0 =A0-- Eric Allman >