X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/5b52e5fa194e55e49b978fefe3cac7820579a60d..c39d40a767a1ae36171e5bcbf6f157ff3e80fb6c:/print-nflog.c diff --git a/print-nflog.c b/print-nflog.c index 77f52f50..1e75561b 100644 --- a/print-nflog.c +++ b/print-nflog.c @@ -105,9 +105,7 @@ typedef struct nflog_timestamp { static const struct tok nflog_values[] = { { AF_INET, "IPv4" }, -#ifdef AF_INET6 { AF_INET6, "IPv6" }, -#endif /*AF_INET6*/ { 0, NULL } }; @@ -144,10 +142,11 @@ nflog_if_print(netdissect_options *ndo, ndo->ndo_protocol = "nflog"; if (caplen < NFLOG_HDR_LEN) { - ndo->ndo_ll_header_length += caplen; + nd_print_trunc(ndo); + ndo->ndo_ll_hdr_len += caplen; return; } - ndo->ndo_ll_header_length += NFLOG_HDR_LEN; + ndo->ndo_ll_hdr_len += NFLOG_HDR_LEN; ND_TCHECK_SIZE(hdr); if (GET_U_1(hdr->nflog_version) != 0) { @@ -208,11 +207,9 @@ nflog_if_print(netdissect_options *ndo, ip_print(ndo, p, length); break; -#ifdef AF_INET6 case AF_INET6: ip6_print(ndo, p, length); break; -#endif /* AF_INET6 */ default: if (!ndo->ndo_eflag) @@ -224,12 +221,11 @@ nflog_if_print(netdissect_options *ndo, break; } - ndo->ndo_ll_header_length += h_size - NFLOG_HDR_LEN; + ndo->ndo_ll_hdr_len += h_size - NFLOG_HDR_LEN; return; trunc: nd_print_trunc(ndo); - ndo->ndo_ll_header_length += h_size - NFLOG_HDR_LEN; - return; + ndo->ndo_ll_hdr_len += h_size - NFLOG_HDR_LEN; } #endif /* DLT_NFLOG */