HomeFreeBSD

ping: Print the IP options of the original packet

Description

ping: Print the IP options of the original packet

When an ICMP packet contains an IP packet in its payload, and that
original IP packet contains options, these options were not displayed
accordingly in pr_iph().

pr_iph() is a function that prints the original "quoted packet" IP
header, with only an IP struct as an argument. The IP struct does not
contain IP options, and it is not guaranteed that the options will be
contiguous in memory to the IP struct after
d9cacf605e2ac0f704e1ce76357cbfbe6cb63d52.

Pass the raw ICMP data along with the IP struct, in order to print the
options, if any.

Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38469

Details

Provenance
jlduran_gmail.comAuthored on Feb 9 2023, 3:47 PM
markjCommitted on Mar 19 2023, 4:23 PM
Reviewer
markj
Differential Revision
D38469: ping: Print the IP options of the original packet
Parents
rGce7b20e5129c: stress2: Added more FFS tests
Branches
Unknown
Tags
Unknown