From owner-freebsd-questions Wed Dec 6 17:25:50 2000 From owner-freebsd-questions@FreeBSD.ORG Wed Dec 6 17:25:48 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from xena.gsicomp.on.ca (cr677933-a.ktchnr1.on.wave.home.com [24.43.230.149]) by hub.freebsd.org (Postfix) with ESMTP id 662B437B400 for ; Wed, 6 Dec 2000 17:25:46 -0800 (PST) Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by xena.gsicomp.on.ca (8.9.3/8.9.3) with SMTP id UAA63421 for ; Wed, 6 Dec 2000 20:25:45 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <004d01c05fed$230c4b30$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: References: <200012061334.IAA27231@sjt-u10.cisco.com> <004a01c05fd7$b04fc8c0$0300a8c0@anime.ca> Subject: Re: PPPoE error messages & kernel modules Date: Wed, 6 Dec 2000 20:29:20 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I'm a FreeBSD rookie, so I'm not too experienced with kernel modules > > etc., but this looks a little weird to me. When I start pppoe, I get > > the following output dumped on the screen: > > > > (this is 4.2R by the way) > > > > sjt-bsd# ppp -background pppoe > > Working in background mode > > Using interface: tun0 > > module_register: module netgraph already exists! > > linker_file_sysinit "netgraph.ko" failed to register! 17 > > Dec 6 07:28:21 sjt-bsd /kernel: module_register: module netgraph already > exists! > > Dec 6 07:28:21 sjt-bsd /kernel: module_register: module netgraph already > exists! > > Dec 6 07:28:21 sjt-bsd /kernel: linker_file_sysinit "netgraph.ko" failed > to register! 17 > > Dec 6 07:28:21 sjt-bsd /kernel: linker_file_sysinit "netgraph.ko" failed > to register! 17 > > PPP enabled > > > > It appears to me that modules are being loaded for options that are > > already statically in my kernel. If anyone wants to see my kernel > > config or ppp.conf just ask. > > > > 1 - can anyone explain what is happening here? NETGRAPH, > > NETGRAPH_PPPOE, NETGRAPH_SOCKET, and the pseudo devices ether, tun, ppp > > (with option '1') are in my kernel, and my ethernet card is working > > fine. > > You also need NETGRAPH_ETHER. Not really. The only module that needs to be statically defined is NETGRAPH. All the others can be a mix of static (compiled into the kernel) or dynamic (loaded from /modules). (The base netgraph code is smart enough to use the static module if it exists, otherwise it will load the module dynamically.) [ Case in point - on a 4.1-R gatway machine I had NETGRAPH and NETGRAPH_PPPOE compiled static, but if it needed others (such as NETGRAPH_ETHER or NETGRAPH_SOCKET) it would just load them dynamically. Yes, this is silly, but that's just the way it was. ] > > 3 - can someone explain how one builds a module as opposed to a static > > option? In Linux it is straightforward, but there seems to be some > > stuff happening automagically here. > > I believe these modules are created either during 'make world' or during > kernel builds. To compile netgraph components statically, put the appropriate 'options NETGRAPH' or 'options NETGRAPH_option' lines in your kernel and rebuild. If those lines aren't present in the kernel, then when you build and install a kernel it will build the remaining modules into .ko files that can be dynamically loaded via kldload. As for your problems with ppp and pppoe, I can't really say what's causing them. I'd like to see the pppoe section of your ppp.conf, for starters. -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message