When printing IP datagrams included in ICMP errors
(enabled with -v) the UDP source/destination ports
don't always print out, since the entire UDP header is
required to print out more than just the IP addresses
and the default packet capture length may not capture
the entire UDP header if IP options are present in the
original packet or ICMP error packet.
The attached patch will print out the UDP source/dest
port if the first 4 bytes of the UDP header were
captured; it also does a better job with partial UDP
headers on IPv6 or IPSEC encapsulation.
patch to tcpdump/print-udp.c
Logged In: YES
user_id=109593
Committed (slightly modified), thanks!
Administrators of the "tcpdump" SourceForge project have superseded this tracker item (formerly artifact 579811, now patch 7) with issue 164 of the "tcpdump" GitHub project.