NetBSD Problem Report #41111

From www@NetBSD.org  Tue Mar 31 19:27:05 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id B23E063B946
	for <gnats-bugs@gnats.netbsd.org>; Tue, 31 Mar 2009 19:27:05 +0000 (UTC)
Message-Id: <20090331192705.58F7363B8C8@www.NetBSD.org>
Date: Tue, 31 Mar 2009 19:27:05 +0000 (UTC)
From: eravin@panix.com
Reply-To: eravin@panix.com
To: gnats-bugs@NetBSD.org
Subject: ping -R gives misleading error when remote side doesn't support record route
X-Send-Pr-Version: www-1.0

>Number:         41111
>Category:       bin
>Synopsis:       ping -R gives misleading error when remote side doesn't support record route
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 31 19:30:00 +0000 2009
>Closed-Date:    Wed Aug 05 06:47:35 +0000 2009
>Last-Modified:  Wed Aug 05 06:47:35 +0000 2009
>Originator:     Ed Ravin
>Release:        5.0RC2
>Organization:
Public Access Networks
>Environment:
NetBSD panix5.panix.com 5.0_RC2 NetBSD 5.0_RC2 (PANIX-XEN3U-USER-pae) #1: Sat Feb 21 20:24:11 EST 2009  root@juggler.panix.com:/misc1/obj/misc2/devel/netbsd/5.0-RC2/src/sys/arch/i386/compile/PANIX-XEN3U-USER-pae i386
>Description:
"ping -R" adds a 40 byte field to the ICMP echo request packet.

Some hosts do not support record route.  Some of those non-supporting hosts will still answer the ICMP echo request with the appropriate ICMP echo reply, but they delete the 40 byte field before replying.

When that happens, the NetBDS ping command issues this error:

$ ping -R -c 2 google.com
PING google.com (74.125.45.100): 56 data bytes
64 bytes from 74.125.45.100: icmp_seq=0 ttl=242 time=214.877 ms
wrong total length 84 instead of 124
64 bytes from 74.125.45.100: icmp_seq=1 ttl=242 time=44.624 ms
wrong total length 84 instead of 124

----google.com PING Statistics----
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 44.624/129.750/214.877/120.387 ms

This message is confusing.  ping is doing a simple length check when it receives the packet and issues the mismatch error without consideration as to why the lengths are different.  In this case, there's nothing "wrong" about the returned length - it's just an indication that record route isn't supported along the path being pinged.  Users not familiar with the intricates of IP and ICMP might think there is a networking fault at the IP address in question because it responds with "wrong" packets.
>How-To-Repeat:

>Fix:
Fix the error message to explain the length mismatch without any pejorative terms (e.g. "expected N byte response, received M bytes")
or perhaps decode the response to see which part(s) of it differ.

>Release-Note:

>Audit-Trail:
From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41111 CVS commit: [netbsd-5] src/sbin/ping
Date: Sun, 3 May 2009 22:32:12 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Sun May  3 22:32:12 UTC 2009

 Modified Files:
 	src/sbin/ping [netbsd-5]: ping.c

 Log Message:
 Pull up following revision(s) (requested by christos in ticket #636):
 	sbin/ping/ping.c: revision 1.88
 PR/41111: Ed Ravin: ping -R gives misleading error when remote side doesn't
 support record route
 Deal with source route and record route specially giving a meaningful error
 message.


 To generate a diff of this commit:
 cvs rdiff -u -r1.87 -r1.87.10.1 src/sbin/ping/ping.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 06 May 2009 23:06:58 +0000
State-Changed-Why:
Fixed?


From: Ed Ravin <eravin@panix.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/41111 CVS commit: [netbsd-5] src/sbin/ping
Date: Wed, 5 Aug 2009 01:22:16 -0400

 Thank you!

 On Sun, May 03, 2009 at 10:35:01PM +0000, Soren Jacobsen wrote:
 > The following reply was made to PR bin/41111; it has been noted by GNATS.
 > 
 > From: Soren Jacobsen <snj@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc: 
 > Subject: PR/41111 CVS commit: [netbsd-5] src/sbin/ping
 > Date: Sun, 3 May 2009 22:32:12 +0000
 > 
 >  Module Name:	src
 >  Committed By:	snj
 >  Date:		Sun May  3 22:32:12 UTC 2009
 >  
 >  Modified Files:
 >  	src/sbin/ping [netbsd-5]: ping.c
 >  
 >  Log Message:
 >  Pull up following revision(s) (requested by christos in ticket #636):
 >  	sbin/ping/ping.c: revision 1.88
 >  PR/41111: Ed Ravin: ping -R gives misleading error when remote side doesn't
 >  support record route
 >  Deal with source route and record route specially giving a meaningful error
 >  message.
 >  
 >  
 >  To generate a diff of this commit:
 >  cvs rdiff -u -r1.87 -r1.87.10.1 src/sbin/ping/ping.c
 >  
 >  Please note that diffs are not public domain; they are subject to the
 >  copyright notices on the relevant files.
 >  
 > 

 -- 
 Ed Ravin                   |  Warning - this email may contain rhetorical
                            |  devices, metaphors, analogies, typographical
 eravin@                    |  errors, or just plain snarkiness.  A sense of
 panix.com                  |  humor may be required for proper interpretation.

State-Changed-From-To: feedback->closed
State-Changed-By: dsl@NetBSD.org
State-Changed-When: Wed, 05 Aug 2009 06:47:35 +0000
State-Changed-Why:
thanked...


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.