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
> > 
> > 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
> which is actually what I wanted.
> Ciao,
> Sheldon.

Brian <[EMAIL PROTECTED]>                        <brian@[uk.]>
      <>                   <brian@[uk.]>
Don't _EVER_ lose your sense of humour !

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to