]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: sync header with latest features
authorEric Leblond <eric@regit.org>
Fri, 19 Jun 2015 10:05:05 +0000 (12:05 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 21 Jul 2015 21:37:34 +0000 (23:37 +0200)
Sync the replacement define with the latest Linux code.
This patch also updates the detection part in configure.ac
to do a declaration of all fields if the newest features are
not present.

configure.ac
src/source-af-packet.h

index fb3c363a3cce11abc0b9c540ff7615202bd1be26..f796b06a281a90d83570f127f6b21234b0993204 100644 (file)
             [enable_af_packet="no"],
             [[#include <sys/socket.h>
               #include <linux/if_packet.h>]])
-        AC_CHECK_DECL([PACKET_FANOUT],
-            AC_DEFINE([HAVE_PACKET_FANOUT],[1],[Packet fanout support is available]),
+        AC_CHECK_DECL([PACKET_FANOUT_QM],
+            AC_DEFINE([HAVE_PACKET_FANOUT],[1],[Recent packet fanout support is available]),
             [],
             [[#include <linux/if_packet.h>]])
     ])
index e65a1f2a7a96f781b918d0d8f7a5d4f967a45844..61f4e69ea0bc4dd926eaf4d59c0bc4ea30892f7a 100644 (file)
 #define PACKET_FANOUT_HASH             0
 #define PACKET_FANOUT_LB               1
 #define PACKET_FANOUT_CPU              2
+#define PACKET_FANOUT_ROLLOVER         3
+#define PACKET_FANOUT_RND              4
+#define PACKET_FANOUT_QM               5
+
+#define PACKET_FANOUT_FLAG_ROLLOVER       0x1000
 #define PACKET_FANOUT_FLAG_DEFRAG      0x8000
 #else /* HAVE_PACKET_FANOUT */
 #include <linux/if_packet.h>