]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Include the metadata *and* link-layer header in the header length.
authorGuy Harris <[email protected]>
Tue, 14 Apr 2015 21:04:47 +0000 (14:04 -0700)
committerGuy Harris <[email protected]>
Tue, 14 Apr 2015 21:04:47 +0000 (14:04 -0700)
Otherwise, "-x" doesn't start printing at the link-layer payload.

print-pktap.c

index 2651cf8b5224fb3dd186d6ed51f98019ee07a147..9fa6b5634827a7490d7bc7b1e2c7dfa8e5780664 100644 (file)
@@ -140,7 +140,7 @@ pktap_if_print(netdissect_options *ndo,
 
        case PKT_REC_PACKET:
                if ((printer = lookup_printer(dlt)) != NULL) {
-                       printer(ndo, h, p);
+                       hdrlen += printer(ndo, h, p);
                } else {
                        if (!ndo->ndo_eflag)
                                pktap_header_print(ndo, (u_char *)hdr,