From owner-freebsd-net@FreeBSD.ORG Sat Jul 14 19:21:41 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 938A316A402; Sat, 14 Jul 2007 19:21:41 +0000 (UTC) (envelope-from brian@Awfulhak.org) Received: from storm.uk.FreeBSD.org (storm.uk.FreeBSD.org [194.242.157.42]) by mx1.freebsd.org (Postfix) with ESMTP id 326EE13C48E; Sat, 14 Jul 2007 19:21:41 +0000 (UTC) (envelope-from brian@Awfulhak.org) Received: from store.lan.Awfulhak.org (store.lan.Awfulhak.org [172.16.0.35]) by storm.uk.FreeBSD.org (8.14.1/8.14.1) with ESMTP id l6EJLdTa020148; Sat, 14 Jul 2007 20:21:39 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 370D11957C7F; Sat, 14 Jul 2007 19:22:14 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Email Security Appliance) with ESMTP id 2160A1957C9C; Sat, 14 Jul 2007 19:22:10 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.1/8.14.1) with ESMTP id l6EJLXLS015959; Sat, 14 Jul 2007 12:21:34 -0700 (PDT) (envelope-from brian@Awfulhak.org) Date: Sat, 14 Jul 2007 12:21:32 -0700 From: Brian Somers To: Stefan Ehmann Message-ID: <20070714122132.0142f559@dev.lan.Awfulhak.org> In-Reply-To: <200704221318.50042.shoesoft@gmx.net> References: <200704221318.50042.shoesoft@gmx.net> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.13; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, "Bruce M. Simpson" Subject: Re: tun devices and vpnc in CURRENT 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: Sat, 14 Jul 2007 19:21:41 -0000 On Sun, 22 Apr 2007 13:18:49 +0200 Stefan Ehmann wrote: > On CURRENT, each time I stop/start vpnc a new tun device is created. > Since I restart vpnc every time I re-connect to the network, my ifconfig > output fills up with tun devices. > > On 6.2-RELEASE the tun0 device is reused each time I run vpnc. > > Reverting to src/sys/net/if_tun.c rev 1.162 shows the old behaviour. (It seems > I'm noticing this a bit late) > > Is this a bug in either CURRENT or vpnc? > > If I set sysctl net.link.tun.devfs_cloning=0, vpnc doesn't work at all: > # vpnc > vpnc version 0.4.0 > kldload: can't load if_tun: File exists > can't initialise tunnel interface: No such file or directory > > This is a CURRENT as of today. Please tell me if you need more info. It looks like the problem is in the vpnc-script destroy_tun_device() function, but even if I add FreeBSD to that, it creates the additional interfaces. Maybe this is because I'm passing it bogus data and the connection attempt doesn't cleanup properly either. Have you tried talking to the port writer or maintainer? -- Brian Somers Don't _EVER_ lose your sense of humour !