From: Guy Harris Date: Sat, 3 Jun 2017 03:10:49 +0000 (-0700) Subject: Don't set ndo_snaplen, either. X-Git-Tag: tcpdump-4.99-bp~2051 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/0a515812de2fc5a46675bef11f4a19e957dad770 Don't set ndo_snaplen, either. It's *not* the length of the captured data in the packet, it's the snapshot length for the live capture or the savefile - the length of the captured data in the packet could be less. --- diff --git a/print-icmp.c b/print-icmp.c index 17e7a752..10772213 100644 --- a/print-icmp.c +++ b/print-icmp.c @@ -580,7 +580,6 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen, const u_char * bp += 8; ND_PRINT((ndo, "\n\t")); ip = (const struct ip *)bp; - ndo->ndo_snaplen = ndo->ndo_snapend - bp; snapend_save = ndo->ndo_snapend; ip_print(ndo, bp, EXTRACT_16BITS(&ip->ip_len)); ndo->ndo_snapend = snapend_save;