Subject: kern/7818: ICMP protocol packets are not handled for localhost
To: None <gnats-bugs@gnats.netbsd.org>
From: None <darrenr@pobox.com>
List: netbsd-bugs
Date: 06/20/1999 02:22:49
>Number:         7818
>Category:       kern
>Synopsis:       ICMP protocol packets are not handled for localhost
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 20 02:20:01 1999
>Last-Modified:
>Originator:     Darren Reed
>Organization:
>Release:        NetBSD-1.4
>Environment:
System: NetBSD merlin.reed.wattle.id.au 1.4 NetBSD 1.4 (MERLIN) #3: Sun May 23 19:58:14 EST 1999 darrenr@merlin.reed.wattle.id.au:/usr/src/sys/arch/arm32/compile/MERLIN arm32


>Description:
	ICMP protocol packets on the localhost interface (i.e. lo0) are not
handled/delivered and get counted as unknown protocol packets.
>How-To-Repeat:
	A good example is to:
1. ensure that named is not running on the machine;
2. the "hosts:" entry in /etc/nsswitch.conf reads "dns files"
3. run tcpdump with "tcpdump -i lo0";
4. remove/rename /etc/resolv.conf so that it attempts to use the local box
   for DNS;
5.  "netstat -s > /root/netstat.1" (safely save netstat output to a file)
6. "telnet localhost"
7. observe from tcpdump that udp packets are generated in an attempt to
   lookup the hostname for 127.0.0.1 and the resulting ICMP errors due to
   there being no named running (port unreachables);
8. "netstat -s > /root/netstat.2" (safely save netstat output to a file)
9. observe differences in /root/netstat.[12], including increased unknown
   protocol count.
A hack to print out the protocol number and source/destination pairs was
used to identify that this is actually a problem in raw_ip.c.
>Fix:
	
>Audit-Trail:
>Unformatted: