Subject: Re: mknod and tap_postinstall
To: None <netbsd-users@netbsd.org>
From: George Georgalis <george@galis.org>
List: netbsd-users
Date: 10/23/2005 23:24:57
On Sun, Oct 23, 2005 at 10:50:39PM -0400, George Georgalis wrote:
>On Mon, Oct 24, 2005 at 01:04:32AM +0200, Quentin Garnier wrote:
>>On Sun, Oct 23, 2005 at 06:50:50PM -0400, George Georgalis wrote:
>>> 
>>> But the message I have doesn't explain what $3 should be...
>>> 
>>>  The script /usr/pkg/sbin/tap_postinstall creates the relevant device
>>>  nodes in /dev, and can be used independently.
>>> 
>>> Any ideas?
>>
>>The major number.  See lkm.conf(5) and modload(8).  tap_postinstall is
>>really meant to be used with lkm.conf, though.
>
>sure enough, a reboot created the devices... and I was trying to
>figure out what major number to use!

*sigh* but I'm not able to bring up the device... eg

ifconfig tap0 192.168.255.254 netmask 255.255.255.255
ifconfig: SIOCGIFFLAGS tap0: Device not configured

 ls -l /dev/tun*
crw-------  1 root  wheel  40,  0 Oct 12 21:14 /dev/tun0
crw-------  1 root  wheel  40,  1 Oct 12 21:14 /dev/tun1
crw-------  1 root  wheel  40,  2 Oct 12 21:14 /dev/tun2
crw-------  1 root  wheel  40,  3 Oct 12 21:14 /dev/tun3
lrwx------  1 root  wheel       6 Oct 12 21:14 /dev/tuner -> tuner0
cr--r--r--  1 root  wheel  71, 16 Oct 12 21:14 /dev/tuner0
cr--r--r--  1 root  wheel  71, 17 Oct 12 21:14 /dev/tuner1


ixeon# uname -a
NetBSD ixeon 2.0 NetBSD 2.0 (GENERIC.MP) #0: Wed Dec  1 11:06:48 UTC 2004  builds@build:/big/builds/ab/netbsd-2-0-RELEASE/i386/200411300000Z-obj/big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/i386/compile/GENERIC.MP i386

ixeon# modload /usr/pkg/lkm/tap.o 
/usr/pkg/lkm/tap.o(.text+0x93d): In function `tap_dev_cloner':
: undefined reference to `fdclone'
/usr/pkg/lkm/tap.o(.text+0x187f): In function `tap_ether_sprintf':
: undefined reference to `hexdigits'
/usr/pkg/lkm/tap.o(.text+0x188e): In function `tap_ether_sprintf':
: undefined reference to `hexdigits'
/usr/pkg/lkm/tap.o(.data+0xac): undefined reference to `fnullop_fcntl'
/usr/pkg/lkm/tap.o(.data+0xb4): undefined reference to `fbadop_stat'
modload: can't prelink `/usr/pkg/lkm/tap.o' creating `/usr/pkg/lkm/tap'

looks like the build didn't work, it installed without errors.
===> Registering installation for netbsd-tap-20050610

Ideas? BTW this is to connect to an openvpn bridge. The auth seems
to work okay, then I get the message

Sun Oct 23 23:20:32 2005 us=927858 Sorry but you cannot use --dev tap and --ifconfig together on this OS because I have not yet been programmed to understand the appropriate ifconfig syntax to use for TAP-style devices on this OS.  Your best alternative is to use an --up script and do the ifconfig command manually.
Sun Oct 23 23:20:32 2005 us=927964 Exiting

I think that is a bad error because I am using an up script, but
the interface (even manually) is not coming up...

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org