NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/47775: dhcpcd(8) doesn't check if bpf(4) is available



>Number:         47775
>Category:       bin
>Synopsis:       dhcpcd(8) doesn't check if bpf(4) is available
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 28 05:50:00 +0000 2013
>Originator:     Izumi Tsutsui
>Release:        NetBSD 6.1_RC3
>Organization:
>Environment:
System: NetBSD 6.1_RC3
Architecture: MI
Machine: checked on x68k but affects all ports
>Description:
dhcpcd(8) seems doesn't check if /dev/bpf exists
or bpf(4) is properly configured in kernel.

If installation kernel or ramdisk lacks bpf(4),
dhcpcd(8) fails to get an IP and fallback to
link-local address without proper warnings,
at least on sysinst ramdisk environmet.
(syslog(3) in distrib/utils/libhack is broken?)

---
version 5.6.2 starting
ne0: using hwaddr 02:00:00:11:22:33
ne0: executing `/libexec/dhcpcd-run-hooks', reson PREINIT
ne0: executing `/libexec/dhcpcd-run-hooks', reson CARRIER
ne0: sending IPv6 Router Solicitation
ne0: sendmsg: m
ne0: broadcasting for a lease
ne0: sending DISCOVER (xid 0xa262f5c5), next in 4.12 seconds
ne0: open_socket: m
ne0: executing `/libexec/dhcpcd-run-hooks', reason FAIL
ne0: sending IPv6 Router Solicitation
ne0: sending IPv6 Router Solicitation
ne0: sending IPv6 Router Solicitation
ne0: no IPv6 Routers available
timed out
allowing 8 seconds for IPv4LL timeout
 :
---
(typed from screen)

>How-To-Repeat:
Remove /dev/bpf* and run dhcpcd(8) on installation ramdisk?

>Fix:
Check return values of open_socket() in all callers
and print propoer warnings (or explicitly bailout)?

---



Home | Main Index | Thread Index | Old Index