NetBSD-Bugs archive

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

bin/40036: rc.d/network doesn't check IPv6 properly with new ifconfig(8)



>Number:         40036
>Category:       bin
>Synopsis:       rc.d/network doesn't check IPv6 properly with new ifconfig(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 26 14:55:00 +0000 2008
>Originator:     Izumi Tsutsui
>Release:        NetBSD 5.0_BETA
>Organization:
>Environment:
System: NetBSD 5.0_BETA from NetBSD-daily/netbsd-5/200811190002Z
Architecture: sun2
Machine: m68000
>Description:
/etc/rc.d/network has the following line to check if kernel has IPv6 support:

---
        if /sbin/ifconfig lo0 inet6 >/dev/null 2>&1; then
                # We have IPv6 support in kernel.
---

But recently revised ifconfig(8) doesn't return error on that test
even if a kernel doesn't have inet6 support:

---
# sysctl -a | grep inet6
# ifconfig lo0 inet6 > /dev/null 2>&1 && echo true
true
# 
---

so rc.d/network causes a lot of errors on boot:

---
 :
Starting network.
/etc/rc: WARNING: $hostname not set.
usage: ifconfig [-h] [-m] [-v] [-z] [-L] interface
        [ af [ address [ dest_addr ] ] [ netmask mask ] [ prefixlen n ]
                [ alias | -alias ] ]
        [ up ] [ down ] [ metric n ] [ mtu n ]
        [ vlan n vlanif i ]
        [ [ af ] tunnel src_addr dest_addr ] [ deletetunnel ]
        [ media type ] [ mediaopt opts ] [ -mediaopt opts ] [ instance minst ]
        [ nwid network_id ] [ nwkey network_key | -nwkey ]
        [ list scan ]
        [ powersave | -powersave ] [ powersavesleep duration ]
        [ hidessid | -hidessid ] [ apbridge | -apbridge ]
        [ agrport i ] [ -agrport i ]
        [ anycast | -anycast ] [ deprecated | -deprecated ]
        [ tentative | -tentative ] [ pltime n ] [ vltime n ] [ eui64 ]
        [ advbase n ] [ advskew n ] [ carpdev iface ] [ pass passphrase ] [ 
state state ] [ vhid n ]
        [ arp | -arp ]
        [ preference n ]
        [ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ]
       ifconfig -a [-b] [-d] [-h] [-m] [-u] [-v] [-z] [ af ]
       ifconfig -l [-b] [-d] [-s] [-u]
       ifconfig -C
       ifconfig interface create
       ifconfig interface destroy
route: writing to routing socket: Network is unreachable
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
route: writing to routing socket: not in table
sysctl: second level name 'inet6' in 'net.inet6.ip6.forwarding' is invalid
sysctl: second level name 'inet6' in 'net.inet6.ip6.accept_rtadv' is invalid
IPv6 mode: host
Configuring network interfaces: ie0.
Adding interface aliases:.
usage: sleep seconds
Building databases: dev, utmp, utmpx done

 :
---


>How-To-Repeat:
Build kernel without options INET6 and boot it to multiuser,
or try the above commands.

>Fix:
Fix ifconfig(8) as the previous behavior, or
fix rc.d/network to use sysctl(8) for inet6 check?

---
Izumi Tsutsui



Home | Main Index | Thread Index | Old Index