NetBSD Problem Report #47505
From www@NetBSD.org Fri Jan 25 10:12:58 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 4F6D663C07C
for <gnats-bugs@gnats.NetBSD.org>; Fri, 25 Jan 2013 10:12:58 +0000 (UTC)
Message-Id: <20130125101257.958C963C07C@www.NetBSD.org>
Date: Fri, 25 Jan 2013 10:12:57 +0000 (UTC)
From: hsuenaga@iij.ad.jp
Reply-To: hsuenaga@iij.ad.jp
To: gnats-bugs@NetBSD.org
Subject: 'ping -s' generates wrong sized packets.
X-Send-Pr-Version: www-1.0
>Number: 47505
>Category: bin
>Synopsis: 'ping -s' generates wrong sized packets.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 25 10:15:01 +0000 2013
>Originator: SUENAGA Hiroki
>Release: 6.0
>Organization:
IIJ
>Environment:
NetBSD divi.tokyo.iiji.jp 6.0 NetBSD 6.0 (GENERIC) amd64
>Description:
manual page of ping(8) says:
-s packetsize
Specifies the number of data bytes to be sent. The default is
56, which translates into 64 ICMP data bytes when combined with
the 8 bytes of ICMP header data. The maximum allowed value is
65467 bytes.
but, the /sbin/ping -s 56 generates only 56 ICMP data bytes. 8 bytes are missing.
NetBSD-5.2 works fine.
>How-To-Repeat:
try ping command and dump the packet.
terminal1# ping -s 56 <any host>
terminal2# tcpdump -n -vvv -i <your interface> icmp
then you can see the wrong packet.
a) example of NetBSD-6.0 host: (ICMP header + data = 56)
19:08:21.069374 IP (tos 0x0, ttl 255, id 37506, offset 0, flags [none], proto ICMP (1), length 76)
192.168.167.144 > 192.168.167.145: ICMP echo request, id 43799, seq 0, length 56
b) example of NetBSD-5.2 host: (ICMP header + data = 64)
19:03:34.192919 IP (tos 0x0, ttl 255, id 24090, offset 0, flags [none], proto ICMP (1), length 84)
192.168.167.138 > 192.168.167.133: ICMP echo request, id 51505, seq 0, length 64
>Fix:
(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.