NetBSD-Bugs archive

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

bin/56057: 'ping6 -p' does not seem to set the data



>Number:         56057
>Category:       bin
>Synopsis:       'ping6 -p' does not seem to set the data
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 15 14:35:00 +0000 2021
>Originator:     Jan Schaumann
>Release:        NetBSD 9.99.78
>Organization:
	
>Environment:
	
	
System: NetBSD ip-10-10-0-47.ec2.internal 9.99.78 NetBSD 9.99.78 (GENERIC) #0: Fri Jan 22 00:44:55 UTC 2021  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

Per RFC4443, the ICMP6 "echo request" / "echo reply" messages have a "data"
field, allowing the sender to send "Zero or more octets of arbitrary data.",
which the receiver has to echo back.

Per the manual page, the '-p' flag can be used to set the data, but while this
works for IPv4 ping(1), ping6(1) appears to not set this data correctly.

>How-To-Repeat:

$ tcpdump -w /tmp/icmp6 'icmp6[icmp6type] == icmp6-echo' >/dev/null 2>&1 &
$ ping6 -p 0123456789 -c 1 www.netbsd.org
$ fg
^C
$ tcpdump -n -t -X -r /tmp/icmp6
IP6 2600:1f18:400c:b800:bc3c:63cc:7e5d:1f96 > 2001:470:a085:999::80: ICMP6, echo request, seq 0, length 16
        0x0000:  6000 0000 0010 3aff 2600 1f18 400c b800  `.....:.&...@...
        0x0010:  bc3c 63cc 7e5d 1f96 2001 0470 a085 0999  .<c.~].....p....
        0x0020:  0000 0000 0000 0080 8000 dff1 57a7 0000  ............W...
        0x0030:  604f 6c53 000c b13b                      `OlS...;^M

Note that the octets in the last line here are not the data that we set.

On a Linux system, for example, I'm seeing:

IP6 2600:1f18:400c:b800:f5ba:e5ca:d7c3:c6e8 > 2001:470:a085:999::80: ICMP6, echo request, seq 1, length 64
        0x0000:  600e 3651 0040 3aff 2600 1f18 400c b800  `.6Q.@:.&...@...
        0x0010:  f5ba e5ca d7c3 c6e8 2001 0470 a085 0999  ...........p....
        0x0020:  0000 0000 0000 0080 8000 77a0 083e 0001  ..........w..>..
        0x0030:  e76f 4f60 0000 0000 cc04 0d00 0000 0000  .oO`............
        0x0040:  2345 6789 0123 4567 8901 2345 6789 0123  #Eg..#Eg..#Eg..#
        0x0050:  4567 8901 2345 6789 0123 4567 8901 2345  Eg..#Eg..#Eg..#E
        0x0060:  6789 0123 4567 8901  

showing the padding data at the end as requested.

>Fix:
	

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index