]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nflog.c
CVE-2017-5485/add the test case
[tcpdump] / print-nflog.c
index b096e9ec2fc5312c3f967ad00b08682248a1ae7e..41cbf788fd9c00437e624fa13552c7c8f2272dc2 100644 (file)
  * DAMAGE.
  */
 
+/* \summary: DLT_NFLOG printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
 #include "netdissect.h"
 
@@ -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 }
 };
 
@@ -80,7 +82,7 @@ nflog_if_print(netdissect_options *ndo,
                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;
        }