From ajacoutot@lphp.org  Tue Feb 17 07:42:29 2004
Return-Path: <ajacoutot@lphp.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 89B1C16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Feb 2004 07:42:29 -0800 (PST)
Received: from mcp.lphp.org (APastourelles-107-1-20-20.w81-49.abo.wanadoo.fr [81.49.209.20])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C230B43D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Feb 2004 07:42:28 -0800 (PST)
	(envelope-from ajacoutot@lphp.org)
Received: from admin.dioranews.local (ATuileries-108-2-1-179.w217-128.abo.wanadoo.fr [217.128.152.179])
	by mcp.lphp.org (8.12.10/8.12.10) with ESMTP id i1HFhBL0048448
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Feb 2004 16:43:12 +0100 (CET)
	(envelope-from ajacoutot@lphp.org)
Message-Id: <1077032557.0@admin.dioranews.local>
Date: Tue, 17 Feb 2004 16:42:37 +0100
From: "Antoine Jacoutot" <ajacoutot@lphp.org>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: Module if_tun failed to register
X-Send-Pr-Version: gtk-send-pr 0.3.3 
X-GNATS-Notify:

>Number:         62968
>Category:       kern
>Synopsis:       Module if_tun failed to register
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 17 07:50:14 PST 2004
>Closed-Date:    Fri Jul 23 17:38:14 GMT 2004
>Last-Modified:  Fri Jul 23 17:38:14 GMT 2004
>Originator:     Antoine Jacoutot
>Release:        FreeBSD 5.2.1-RC2 i386
>Organization:
none 
>Environment:


System: FreeBSD 5.2.1-RC2 #0: Mon Feb 16 13:05:11 CET 2004
    ajacoutot@mcp.lphp.org:/usr/obj/usr/src/sys/MCP



>Description:


I've been having the same error for months now under FreeBSD-5.x (5.1, 5.2,
5.2.1-RC2, 5-CURRENT).
It works anyway, but I'm concerned about this error...
When I boot, ppp is started automatically with rc.conf and I get the following
error on the console:

kernel: module_register: module if_tun already exists!
kernel: Module if_tun failed to register: 17
kernel: can't re-use a leaf (if_tun_debug)

"device tun" is compiled into my kernel but also loaded as a module !!! :

$ kldstat
Id Refs Address    Size     Name
 1    6 0xc0400000 376afc   kernel
 2    1 0xc0777000 4d978    acpi.ko
 3    1 0xc4670000 4000     logo_saver.ko
 4    1 0xc470f000 4000     if_tun.ko

As I said, everything works, but still, this error is strange.
Note that I use kern_securelevel="1".


>How-To-Repeat:


Compiled "device tun" into your kernel and enable ppp on boot in rc.conf.


>Fix:





>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brooks 
State-Changed-When: Fri Jul 23 17:35:41 GMT 2004 
State-Changed-Why:  
You can't load modules with securelevel=1. You should not use 
securelevels unless you understand all the implications. I agree the 
error message sucks, but that's a known issue with no easy solution. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62968 
>Unformatted:
