Subject: bin/24714: Bug report
To: None <>
From: Panu Rissanen <>
List: netbsd-bugs
Date: 03/09/2004 12:09:39
>Number:         24714
>Category:       bin
>Synopsis:       Ping tries to resolve host address by the default
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 09 12:10:00 UTC 2004
>Originator:     Charlie Root
>Release:        NetBSD 1.6.2
	Panu Rissanen 
System: NetBSD foobar 1.6.2 NetBSD 1.6.2 (GENERIC) #0: Tue Feb 10 21:53:10 UTC 2004 i386
Architecture: i386
Machine: i386
Ping tries to resolve target host name before sending out any icmp packets
even if the target is an IP-address.

In a normal situation, where DNS is working, this is causing no problems
at all. However, in case of partial network failure, when the DNS server
is unreachable, failure to execute ping command can cause strage
results (especially to the people who know Unix well but have little
experience with NetBSD). Because ping doesn't send any packets before DNS    
timeout, the host doesn't ask for ARP. People, like me, break off the ping 
after waiting for 10 secs and start up to look for network problems 
with arp -n, which in this case, naturally, doesn't show anything.

It is possible to ping also when DNS server is unreachable by using -n
flag (or simply wait for the DNS timeout). Let's look at what the manual
says about the ping parameters

     -n      Numeric output only.  No attempt will be made to look up symbolic
             names for host addresses.

".. for the host addresses" refers to the hosts which are replying to your
ping packets. If fact, preventing DNS lookup at the startup is undocumented

You may think this a feature, not a bug. But in case of feature, why is this
implemented only in the NetBSD? At least FreeBSD, Solaris, Linux and
even Windows are always trying to ping without reverse lookup, unless
you order host to do it.

	Make a false entry to your resolv.conf for the nameserver and try
	to ping one of your hosts in your local network.
	Update to the ping.c