From owner-freebsd-current@FreeBSD.ORG Mon Sep 5 15:01:30 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 27DC116A41F for ; Mon, 5 Sep 2005 15:01:30 +0000 (GMT) (envelope-from dandee@volny.cz) Received: from pipa.profix.cz (ruprt.hosting4u.cz [82.208.25.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D98843D53 for ; Mon, 5 Sep 2005 15:01:27 +0000 (GMT) (envelope-from dandee@volny.cz) Received: from localhost (localhost [127.0.0.1]) by pipa.profix.cz (Postfix) with ESMTP id D2A0D4E705 for ; Mon, 5 Sep 2005 17:01:29 +0200 (CEST) Received: from pipa.profix.cz ([127.0.0.1]) by localhost (pipa [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17633-09 for ; Mon, 5 Sep 2005 17:01:29 +0200 (CEST) Received: from gandalf (unknown [80.95.121.105]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by pipa.profix.cz (Postfix) with ESMTP id 414784E704 for ; Mon, 5 Sep 2005 17:01:29 +0200 (CEST) From: "Stay d" To: Date: Mon, 5 Sep 2005 17:01:19 +0200 MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcWyKqxDEkkX+U0bQsuIFPaQ5kMJog== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Message-Id: <20050905150129.414784E704@pipa.profix.cz> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at profix.cz X-Mailman-Approved-At: Tue, 06 Sep 2005 11:39:21 +0000 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ifconfig tun(N) destroy does not work ! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dandee@volny.cz List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2005 15:01:30 -0000 Hi all, =20 maybe I haven=B4t read something what I souhld read it, and if it is = true I am sorry for anoying you. =20 Let me ask you for tun devices. =20 roztyly# ifconfig tun1 destroy ifconfig: SIOCIFDESTROY: Invalid argument I found out from manual page tun(4) that: =20 "These network interfaces persist until the if_tun.ko module is unloaded = (if tun is built into your kernel, the network interfaces cannot be = removed)." =20 Of course the generic kernel defines "device tun", so I commented the = line and recompiled the kernel. =20 After that, I tried again "destroy command" and with no changes. =20 I tried "create command" and the same error message happens. =20 roztyly# kldstat Id Refs Address Size Name 1 9 0xc0400000 5bb9fc kernel 2 16 0xc09bc000 63f04 acpi.ko 3 1 0xc1848000 23000 nfsserver.ko 4 1 0xc18b0000 1a000 linux.ko 6 1 0xc2926000 5000 if_gif.ko roztyly# ifconfig tun10 create ifconfig: SIOCIFCREATE: Invalid argument roztyly# kldstat Id Refs Address Size Name 1 10 0xc0400000 5bb9fc kernel 2 16 0xc09bc000 63f04 acpi.ko 3 1 0xc1848000 23000 nfsserver.ko 4 1 0xc18b0000 1a000 linux.ko 6 1 0xc2926000 5000 if_gif.ko 7 1 0xc2910000 5000 if_tun.ko =20 It seems automatic loading if_tun.ko and if_gif.ko works well. =20 Opposite to tun device is gif device which works fine: =20 roztyly# kldstat Id Refs Address Size Name 1 10 0xc0400000 5bb9fc kernel 2 16 0xc09bc000 63f04 acpi.ko 3 1 0xc1848000 23000 nfsserver.ko 4 1 0xc18b0000 1a000 linux.ko 6 1 0xc2926000 5000 if_gif.ko 7 1 0xc2910000 5000 if_tun.ko roztyly# kldunload -v -i 6 Unloading if_gif.ko, id=3D6 roztyly# kldunload -v -i 7 Unloading if_tun.ko, id=3D7 roztyly# kldstat Id Refs Address Size Name 1 8 0xc0400000 5bb9fc kernel 2 16 0xc09bc000 63f04 acpi.ko 3 1 0xc1848000 23000 nfsserver.ko 4 1 0xc18b0000 1a000 linux.ko roztyly# ifconfig gif0 create roztyly# ifconfig gif0 gif0: flags=3D8010 mtu 1280 roztyly# ifconfig gif0 destroy roztyly# ifconfig gif0 ifconfig: interface gif0 does not exist roztyly# kldstat Id Refs Address Size Name 1 9 0xc0400000 5bb9fc kernel 2 16 0xc09bc000 63f04 acpi.ko 3 1 0xc1848000 23000 nfsserver.ko 4 1 0xc18b0000 1a000 linux.ko 7 1 0xc2910000 5000 if_gif.ko roztyly# ifconfig tun0 create ifconfig: SIOCIFCREATE: Invalid argument roztyly# kldstat Id Refs Address Size Name 1 10 0xc0400000 5bb9fc kernel 2 16 0xc09bc000 63f04 acpi.ko 3 1 0xc1848000 23000 nfsserver.ko 4 1 0xc18b0000 1a000 linux.ko 7 1 0xc2910000 5000 if_gif.ko 8 1 0xc2926000 5000 if_tun.ko roztyly# ifconfig tun0 destroy ifconfig: interface tun0 does not exist roztyly# kldstat Id Refs Address Size Name 1 10 0xc0400000 5bb9fc kernel 2 16 0xc09bc000 63f04 acpi.ko 3 1 0xc1848000 23000 nfsserver.ko 4 1 0xc18b0000 1a000 linux.ko 7 1 0xc2910000 5000 if_gif.ko 8 1 0xc2926000 5000 if_tun.ko roztyly# I use tspc2 (freenet6) port, and of course the starting/stopping scripts deos not work as you and me expect. :( =20 Dan =20 Bye