]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print.c
Print the full packet with -x/-X options when truncated
[tcpdump] / print.c
diff --git a/print.c b/print.c
index 864e9ddde2920e50d2fa20e4b52844e2634d6876..823cea6ad54c414f1e3f8e54e710c219c3b8831c 100644 (file)
--- a/print.c
+++ b/print.c
@@ -406,6 +406,8 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h,
        case ND_TRUNCATED:
                /* A printer quit because the packet was truncated; report it */
                nd_print_trunc(ndo);
+               /* Print the full packet */
+               ndo->ndo_ll_hdr_len = 0;
                break;
        }
        hdrlen = ndo->ndo_ll_hdr_len;