Subject: bin/24714: Bug report
To: None <firstname.lastname@example.org>
From: Panu Rissanen <email@example.com>
Date: 03/09/2004 12:09:39
>Synopsis: Ping tries to resolve host address by the default
>Arrival-Date: Tue Mar 09 12:10:00 UTC 2004
>Originator: Charlie Root
>Release: NetBSD 1.6.2
System: NetBSD foobar 1.6.2 NetBSD 1.6.2 (GENERIC) #0: Tue Feb 10 21:53:10 UTC 2004 firstname.lastname@example.org:/autobuild/netbsd-1-6-PATCH002/i386/OBJ/autobuild/netbsd-1-6-PATCH002/src/sys/arch/i386/compile/GENERIC 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