diff --git a/print-ppi.c b/print-ppi.c index ddf674d2..39571540 100644 --- a/print-ppi.c +++ b/print-ppi.c @@ -56,6 +56,7 @@ ppi_print(netdissect_options *ndo, uint16_t len; uint32_t dlt; uint32_t hdrlen; + struct pcap_pkthdr nhdr; if (caplen < sizeof(ppi_header_t)) { ND_PRINT((ndo, "[|ppi]")); @@ -86,7 +87,10 @@ ppi_print(netdissect_options *ndo, p += len; if ((printer = lookup_printer(dlt)) != NULL) { - hdrlen = printer(ndo, h, p); + nhdr = *h; + nhdr.caplen = caplen; + nhdr.len = length; + hdrlen = printer(ndo, &nhdr, p); } else { if (!ndo->ndo_eflag) ppi_header_print(ndo, (const u_char *)hdr, length + len);