Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Aug 2000 03:25:20 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Sheldon Hearn <sheldonh@uunet.co.za>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, brian@FreeBSD.ORG, current@FreeBSD.ORG, brian@Awfulhak.org, Ben Smithurst <ben@FreeBSD.ORG>
Subject:   Re: if_tun.ko seems broken 
Message-ID:  <200008070225.DAA18300@hak.lan.Awfulhak.org>
In-Reply-To: Message from Sheldon Hearn <sheldonh@uunet.co.za>  of "Thu, 27 Jul 2000 14:09:46 %2B0200." <63773.964699786@axl.ops.uunet.co.za> 

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry for the delay (I've been away for 2 weeks).

As Ben pointed out, the act of opening the /dev device is the key - 
specifically, the if_attach() called from tuncreate() called from 
tunopen() does some permanent damage^Wgood.

I don't think ifconfig really has a chance of doing the right thing 
here.  It simply kldload()s the module, but you can't tell kldload() 
what interface you're interested in, therefore tunattach() just adds 
the devsw and leaves it at that, not if_attach()ing any specific 
interfaces.  ifconfig then goes through the interfaces available and 
doesn't find what it was trying to load.

I don't think it's right for ifconfig() to know any more, and I don't 
think kldload() should know anything about unit numbers, so this 
magic isn't really possible AFAICT.

> On Thu, 27 Jul 2000 09:37:11 +0200, Poul-Henning Kamp wrote:
> 
> > >	ifconfig tun0 inet 10.0.0.1
> > 
> > I think you are seing the "interesting" side effect of the BSD
> > concept of "POINT2POINT" lines.
> 
> I think that's anotehr issue.  Once I'd read 0 bytes from /dev/tun0 with
> dd(1), I was able to do
> 
> 	ifconfig tun0 inet 10.0.0.1 10.0.0.1
> 
> which is actually what I wanted.
> 
> Ciao,
> Sheldon.

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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