Subject: Re: NetBSD 3.0 dhclient
To: None <port-cobalt@NetBSD.org>
From: Pete Rushmere <pete@rushmere.org>
List: port-cobalt
Date: 03/12/2006 13:16:19
>Can you run ktrace ("cd /tmp ; ktrace dhclient ; kdump >x ; vi x")
>and see what happens right before it prints that message (start at the 
>bottom and scroll up)?
>
>Just for kicks, postint output of
>  * uname -a
>  * sysctl machdep.booted_kernel
>  * cd / ; config -x `sysctl -n machdep.booted_kernel` | grep bpfilt
>  * ls -l /dev/bpf*
>here may be worthwhile, just to make sure


ktrace output...

607 dhclient RET   ioctl 0
607 dhclient CALL  open(0x474060,2,0)
607 dhclient NAMI  "/dev/bpf"
607 dhclient RET   open -1 errno 2 No such file or directory
607 dhclient CALL  gettimeofday(0x7fffc3b0,0)
607 dhclient RET   gettimeofday 0
607 dhclient CALL  sendto(3,0x7fffc410,0x69,0,0,0)
607 dhclient GIO   fd 3 wrote 105 bytes
        "<27>Mar 12 13:02:50 dhclient: No bpf devices.   Please read the 
README\
          section for your operating system."

So, /dev/bpf does not exist, which is substantiated below...


# uname -a
NetBSD  3.0 NetBSD 3.0 (GENERIC) #0: Sun Dec 18 22:39:34 UTC 
2005  builds@b3.net
bsd.org:/home/builds/ab/netbsd-3-0-RELEASE/cobalt/200512182024Z-obj/home/builds/
ab/netbsd-3-0-RELEASE/src/sys/arch/cobalt/compile/GENERIC cobalt

# cd / ; config -x `sysctl -n machdep.booted_kernel` | grep bpfilt

sysctl: second level name 'booted_kernel' in 'machdep.booted_kernel' is invalid
pseudo-device   bpfilter        8               # Berkeley packet filter

# ls -l /dev/bpf*
crw-------  1 root  wheel  18, 0 Mar 12 12:28 /dev/bpf0
crw-------  1 root  wheel  18, 1 Mar 12 12:28 /dev/bpf1
crw-------  1 root  wheel  18, 2 Mar 12 12:28 /dev/bpf2
crw-------  1 root  wheel  18, 3 Mar 12 12:28 /dev/bpf3
crw-------  1 root  wheel  18, 4 Mar 12 12:28 /dev/bpf4
crw-------  1 root  wheel  18, 5 Mar 12 12:28 /dev/bpf5
crw-------  1 root  wheel  18, 6 Mar 12 12:28 /dev/bpf6
crw-------  1 root  wheel  18, 7 Mar 12 12:28 /dev/bpf7
#


Now we start playing around and create a bpf device

# cd /dev
# rm bpf*
# ./MAKEDEV bpf
# ls -l b*
crw-------  1 root  wheel  18, 0 Mar 12 12:33 bpf
lrwx------  1 root  wheel      3 Mar 12 12:33 bpf0 -> bpf
#

After a reboot, dhclient works OK.

It's starting to look like a config script problem on the restore cd?

Kind Regards,
Pete.