Re: if_tun.ko seems broken
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 [EMAIL PROTECTED]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 [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: if_tun.ko seems broken
On Wed, 26 Jul 2000 16:26:48 +0100, Ben Smithurst wrote: I think the device needs to be opened before you can do anything with it. PPP of course does this for you, but if you want to ifconfig it yourself you might try something like ``dd if=/dev/tun0 of=/dev/null count=0'' first. Ah, okay. Having said this to the person who swore that ifconfig tun0 worked for him, he now remembers that he doesn, in fact, use ppp(8). :-) Thanks, Sheldon. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: if_tun.ko seems broken
In message [EMAIL PROTECTED], Sheldon Hearn writes: On Wed, 26 Jul 2000 12:33:07 +0200, Sheldon Hearn wrote: Does this have anything to do with your recent change to if_tun.c? Nope. I've reverted rev 1.75 of if_tun.c and the behaviour persists. Someone locally insists that the ifconfig line ifconfig tun0 inet 10.0.0.1 should work. Any ideas? I think you are seing the "interesting" side effect of the BSD concept of "POINT2POINT" lines. I think we should loose that concept in favour of interfaces using a netmask of 255.255.255.255 and let programs like ppp install a hostroute to the other end when it is reachable. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: if_tun.ko seems broken
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. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
if_tun.ko seems broken
Hi Brian, Does this have anything to do with your recent change to if_tun.c? Ciao, Sheldon. Script started on Wed Jul 26 12:28:35 2000 # pwd /root # date Wed Jul 26 12:28:39 SAST 2000 # uname -a FreeBSD axl.ops.uunet.co.za 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Jul 26 12:01:00 SAST 2000 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/AXL i386 # ls -l /kernel /modules/if_tun.ko -r-xr-xr-x 1 root wheel 1632582 Jul 26 12:07 /kernel -r-xr-xr-x 1 root wheel14259 Jul 26 12:07 /modules/if_tun.ko # ifconfig fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 196.31.2.163 netmask 0xffe0 broadcast 196.31.2.191 ether 00:d0:b7:74:3c:12 media: autoselect (10baseT/UTP) status: active supported media: autoselect 100baseTX full-duplex 100baseTX 10baseT/UTP full-duplex 10baseT/UTP lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 # kldstat Id Refs AddressSize Name 15 0xc010 1a2634 kernel 21 0xc0c41000 5000 ccd.ko 31 0xc0d11000 1randomdev.ko 41 0xc0d29000 4e000nfs.ko 51 0xc0daa000 11000linux.ko # ifconfig tun0 inet 10.0.0.1 ifconfig: interface tun0 does not exist # kldstat Id Refs AddressSize Name 16 0xc010 1a2634 kernel 21 0xc0c41000 5000 ccd.ko 31 0xc0d11000 1randomdev.ko 41 0xc0d29000 4e000nfs.ko 51 0xc0daa000 11000linux.ko 61 0xc0e45000 4000 if_tun.ko # kldunload if_tun kldunload: can't unload file: Invalid argument Jul 26 12:29:36 axl /kernel: if_tun module unload - not possible for this module type # kldstat Id Refs AddressSize Name 16 0xc010 1a2634 kernel 21 0xc0c41000 5000 ccd.ko 31 0xc0d11000 1randomdev.ko 41 0xc0d29000 4e000nfs.ko 51 0xc0daa000 11000linux.ko 61 0xc0e45000 4000 if_tun.ko # exit Script done on Wed Jul 26 12:29:49 2000 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: if_tun.ko seems broken
On Wed, 26 Jul 2000 12:33:07 +0200, Sheldon Hearn wrote: Does this have anything to do with your recent change to if_tun.c? Nope. I've reverted rev 1.75 of if_tun.c and the behaviour persists. Someone locally insists that the ifconfig line ifconfig tun0 inet 10.0.0.1 should work. Any ideas? Ciao, Sheldon. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: if_tun.ko seems broken
Sheldon Hearn wrote: On Wed, 26 Jul 2000 12:33:07 +0200, Sheldon Hearn wrote: Does this have anything to do with your recent change to if_tun.c? Nope. I've reverted rev 1.75 of if_tun.c and the behaviour persists. Someone locally insists that the ifconfig line ifconfig tun0 inet 10.0.0.1 should work. Any ideas? I think the device needs to be opened before you can do anything with it. PPP of course does this for you, but if you want to ifconfig it yourself you might try something like ``dd if=/dev/tun0 of=/dev/null count=0'' first. That makes ifconfig work for me at least, I'm not sure if it's the "right" way. -- Ben Smithurst / [EMAIL PROTECTED] / PGP: 0x99392F7D FreeBSD Documentation Project / To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message