Subject: kern/1228: odd ifconfig behavior
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: None <uhenric@mcl.ucsb.edu>
List: netbsd-bugs
Date: 07/14/1995 10:20:06
>Number:         1228
>Category:       kern
>Synopsis:       ifconfig & uninitialized sl0 acts strangely
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 14 10:20:02 1995
>Originator:     Henric Jungheim
>Organization:
	
>Release:        July 12th <NetBSD-current source date>
>Environment:
	
System: NetBSD blurg.blurg.ucsb.edu 1.0A NetBSD 1.0A (HENRIC) #27: Wed Jul 12 13:04:00 PDT 1995 henric@blurg.blurg.ucsb.edu:/usr/src/sys/arch/amiga/compile/HENRIC amiga
gcc2.4.5 kernel, gcc2.7.0 for other stuff

>Description:
	

When sl0 is not initialzied properly, it seem to do something rather
strange to the list of available interfaces.  I have 2 slip and 2
ppp interfaces configured in my kernel, but when I do an "ifconfig
sl0 down" on an uninitialized sl0, ifconfig first tells me about
interface "sl0" and then it tries to tell me about interface ""
(i.e., an empty string).  See the "How-To-Repeat" section for more
details.

If inetd recieves a "HUP" while the interface table is in this condition,
it exits.  Trying to restart inetd fails.  Here is the tail of the output
of 'inetd -D':
...
ADD : time proto=udp, wait.max=0.40, user.group=root.(null) builtin=63c2 server=
internal
ADD : rstatd rpcprog=-1, rpcvers = 3/1, proto=rpc/udp, wait.max=1.40, user.group
=root.(null) builtin=0 server=/usr/libexec/rpc.rstatd
pmap_set: 100001 1 17 1027
get_myaddress: ioctl: Device not configured
blurg:~henric#

>How-To-Repeat:
	
Here is a transcript (sl0 has not been referenced at all before this):
blurg:~henric#ifconfig -a
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST>
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST>
ppp0: flags=10<POINTOPOINT>
        inet 10.0.2.15 --> 0.0.0.0 netmask 0xff000000
ppp1: flags=10<POINTOPOINT>
lo0: flags=8009<UP,LOOPBACK,MULTICAST>
        inet 127.0.0.1 netmask 0xff000000
tun0: flags=10<POINTOPOINT>
tun1: flags=10<POINTOPOINT>
blurg:~henric#ifconfig sl0 down
blurg:~henric#ifconfig -a
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST>
        inet 0.0.0.0 --> 0.0.0.0 netmask 0x0
ifconfig: SIOCGIFFLAGS: Device not configured
blurg:~henric#

>Fix:
	
>Audit-Trail:
>Unformatted: