]> The Tcpdump Group git mirrors - tcpdump/commit
ICMP: Update the snapend for some nested IP packets
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 24 Jan 2021 09:52:50 +0000 (10:52 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 25 Jan 2021 10:17:37 +0000 (11:17 +0100)
commita29cd3e75e78bab784e906d6a4978d05510613c8
treeec45819c5ad5086c396f1e737796f18112a73fbe
parent2e8a5d23a1b10594befd9091e179b02b487b9a96
ICMP: Update the snapend for some nested IP packets

Update the snapend because extensions (MPLS, ...) may be present
after the IP packet. In this case the current (outer) packet's
snapend is not what ip_print() needs to decode an IP packet nested
in the middle of an ICMP payload.

This prevents that, in ip_print(), for the nested IP packet, the
remaining length < remaining caplen.

Moreover:
Reduce the scope of a variable.
Fix spaces
CHANGES
print-icmp.c