X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/99c91c3aec40b691641374f58e798bd8d6b657bd..d7b497cac78b6e22a66a6bae9bdec60a8044f67a:/print-nflog.c diff --git a/print-nflog.c b/print-nflog.c index 222d5c3f..622743bf 100644 --- a/print-nflog.c +++ b/print-nflog.c @@ -25,6 +25,8 @@ * DAMAGE. */ +/* \summary: DLT_NFLOG printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -38,9 +40,9 @@ static const struct tok nflog_values[] = { { AF_INET, "IPv4" }, -#ifdef INET6 +#ifdef AF_INET6 { AF_INET6, "IPv6" }, -#endif /*INET6*/ +#endif /*AF_INET6*/ { 0, NULL } }; @@ -75,12 +77,12 @@ nflog_if_print(netdissect_options *ndo, u_int caplen = h->caplen; u_int length = h->len; - if (caplen < (int) sizeof(nflog_hdr_t) || length < (int) sizeof(nflog_hdr_t)) { + if (caplen < sizeof(nflog_hdr_t) || length < sizeof(nflog_hdr_t)) { ND_PRINT((ndo, "[|nflog]")); return h_size; } - if (!(hdr->nflog_version) == 0) { + if (hdr->nflog_version != 0) { ND_PRINT((ndo, "version %u (unknown)", hdr->nflog_version)); return h_size; }