From owner-freebsd-current Sun Aug 6 19:48: 5 2000 Delivered-To: freebsd-current@freebsd.org Received: from Awfulhak.org (tun.AwfulHak.org [194.242.139.173]) by hub.freebsd.org (Postfix) with ESMTP id 752BC37B5C2; Sun, 6 Aug 2000 19:47:59 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.awfulhak.org [172.16.0.12]) by Awfulhak.org (8.9.3/8.9.3) with ESMTP id DAA10751; Mon, 7 Aug 2000 03:25:01 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id DAA18300; Mon, 7 Aug 2000 03:25:21 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200008070225.DAA18300@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Sheldon Hearn Cc: Poul-Henning Kamp , brian@FreeBSD.ORG, current@FreeBSD.ORG, brian@Awfulhak.org, Ben Smithurst Subject: Re: if_tun.ko seems broken In-Reply-To: Message from Sheldon Hearn of "Thu, 27 Jul 2000 14:09:46 +0200." <63773.964699786@axl.ops.uunet.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 07 Aug 2000 03:25:20 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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