On Thu, Dec 13, 2007 at 02:43:31PM +0000, Ian Jackson wrote:
> thule:~# ping -w 120 -c 1 thule-3
> PING thule-3 (***.37.54) 56(84) bytes of data.
> >From thule.uk.xensource.com (***.33.107) icmp_seq=1 Destination Host 
> >Unreachable
> >From thule.uk.xensource.com (***.33.107) icmp_seq=2 Destination Host 
> >Unreachable
> >From thule.uk.xensource.com (***.33.107) icmp_seq=3 Destination Host 
> >Unreachable
> 
> --- thule-3 ping statistics ---
> 3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2009ms
> , pipe 3
> thule:~# echo $? 
> 1
> thule:~#
> 
> This is a less than helpful behaviour, particularly with modern
> kernels which send host unreachable when the host is not replying to
> arp.  It makes -w useless in most of the situations where you might
> want it.

Hi Ian.  I'm having a tough time responding to this bug because I keep
changing my mind about what the response should be.  On one hand, ping
is behaving as documented.  From the description of -w from the man
page, ping "waits either for deadline expire or until count probes are
answered or for some error notification from network."  But then again,
as you suggest, maybe Host Unreachables generated by the local host
should not be counted.  I'm going to experiment with some changes to the
code and see how I like different behaviors.

noah

Attachment: signature.asc
Description: Digital signature

Reply via email to