Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2007 06:41:03 -0700
From:      Brian Somers <brian@Awfulhak.org>
To:        Stefan Ehmann <shoesoft@gmx.net>
Cc:        freebsd-net@freebsd.org, "Bruce M. Simpson" <bms@freebsd.org>
Subject:   Re: tun devices and vpnc in CURRENT
Message-ID:  <20070715064103.31694e40@dev.lan.Awfulhak.org>
In-Reply-To: <200707151104.18848.shoesoft@gmx.net>
References:  <200704221318.50042.shoesoft@gmx.net> <20070714122132.0142f559@dev.lan.Awfulhak.org> <200707151104.18848.shoesoft@gmx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 15 Jul 2007 11:04:18 +0200 Stefan Ehmann <shoesoft@gmx.net> wrote:
> On Saturday 14 July 2007 21:21:32 Brian Somers wrote:
> > On Sun, 22 Apr 2007 13:18:49 +0200 Stefan Ehmann <shoesoft@gmx.net> 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?
> 
> No.
> 
> I haven't checked if a "ifconfig tunX destroy" works on the commandline. That 
> should reveal the source of the problem.
> 
> If this works, the problem shouldn't be it if_tun code. Unfortunately, I have 
> no working CURRENT setup ATM, so I can't test it.

Well, I can confirm that 'ifconfig tunN destroy' works ok and
has done for some time now.  I can also demonstrate that vpnc
itself is opening the lowest available tun device by running
it with garbage values.

Perhaps the author should be told that FreeBSD can destroy
interfaces and they'll take it from there?

-- 
Brian Somers                                          <brian@Awfulhak.org>
Don't _EVER_ lose your sense of humour !               <brian@FreeBSD.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070715064103.31694e40>