From owner-freebsd-current@FreeBSD.ORG Wed Nov 5 14:25:10 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3075916A4CE for ; Wed, 5 Nov 2003 14:25:10 -0800 (PST) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48E2C43FE1 for ; Wed, 5 Nov 2003 14:25:09 -0800 (PST) (envelope-from blynn42@comcast.net) Received: from ted.wyld.stallyns (c-24-3-157-79.client.comcast.net[24.3.157.79]) by comcast.net (sccrmhc11) with ESMTP id <2003110522250801100pjb13e>; Wed, 5 Nov 2003 22:25:08 +0000 Received: from ted.wyld.stallyns (localhost.wyld.stallyns [127.0.0.1]) by ted.wyld.stallyns (8.12.9p2/8.12.9) with ESMTP id hA5MP7ml072789; Wed, 5 Nov 2003 17:25:07 -0500 (EST) (envelope-from blynn42@comcast.net) Message-Id: <200311052225.hA5MP7ml072789@ted.wyld.stallyns> To: Michael Nottebrock From: blynn42@comcast.net (Brian Lynn) In-reply-to: Your message of "Wed, 05 Nov 2003 18:37:30 +0100." <200311051837.37313.michaelnottebrock@gmx.net> Date: Wed, 05 Nov 2003 17:25:07 -0500 cc: Antoine Jacoutot cc: current@freebsd.org Subject: Re: if_tun failed to register X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2003 22:25:10 -0000 On Wed, 05 Nov 2003 18:37 Michael Nottebrock wrote: > On Tuesday 04 November 2003 15:32, Antoine Jacoutot wrote: > > Matteo Riondato wrote: > > >>Well, it did not change anything :( > > >>What is really strange is that "tun" is compiled in the kernel, but the > > >>module is started anyway ??? > > > > > > I had the same problem last year and solved it by removing > > > device tun > > > from the kernel configuration file. > > > > Yes, I though about it. But still, it is a strange bug and I cannot > > believe I (well, and you :) ) am the only one seeing this. > > It's been there for quite a while, I see that behaviour in 5.1-RELEASE, too. > > =2D-=20 > ,_, | Michael Nottebrock | lofi@freebsd.org > (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org > \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org > This looks like the opposite of a problem on STABLE. On CURRENT ifconfig checks for 'tun' in the kernel when you do e.g. 'ifconfig tun0' [1], but the driver is registered as 'if_tun'. At the moment I don't have any 5-* boxes, so I can't check this for sure, but it looks like ifconfig will be run at startup if you have any ifconfig_tun* lines in rc.conf. You can see if ifconfig is the culprit by booting single-user and doing ifconfig tun0 (it is only the first attempt that gives the error message in question). If so, the following (Untested!) patch would presumably fix it: Index: sys/net/if_tun.c =================================================================== RCS file: /home/ncvs/src/sys/net/if_tun.c,v retrieving revision 1.129 diff -u -r1.129 if_tun.c --- sys/net/if_tun.c 31 Oct 2003 18:32:08 -0000 1.129 +++ sys/net/if_tun.c 5 Nov 2003 21:59:10 -0000 @@ -200,7 +200,7 @@ 0 }; -DECLARE_MODULE(if_tun, tun_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +DECLARE_MODULE(tun, tun_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); static void tunstart(struct ifnet *ifp) =================================================================== A similar change would likely work for if_ppp.c. Assuming I am right about this (hah :) a pr would seem to be in order. Brian [1] Per this commit: mdodd 2003/04/14 23:25:58 PDT FreeBSD src repository Modified files: sbin/ifconfig ifconfig.c Log: Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.) Revision Changes Path 1.89 +1 -1 src/sbin/ifconfig/ifconfig.c