NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/47505: 'ping -s' generates wrong sized packets.

>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
NetBSD 6.0 NetBSD 6.0 (GENERIC) amd64
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 
NetBSD-5.2 works fine.
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) > 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) > ICMP echo request, id 51505, seq 0, 
length 64


Home | Main Index | Thread Index | Old Index