From: Eric Leblond Date: Fri, 19 Jun 2015 10:05:05 +0000 (+0200) Subject: af-packet: sync header with latest features X-Git-Tag: suricata-3.0RC1~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=851fcef9627e11f62b9cd0fe78a1ec7775204093;p=thirdparty%2Fsuricata.git af-packet: sync header with latest features 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. --- diff --git a/configure.ac b/configure.ac index fb3c363a3c..f796b06a28 100644 --- a/configure.ac +++ b/configure.ac @@ -1054,8 +1054,8 @@ [enable_af_packet="no"], [[#include #include ]]) - 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 ]]) ]) diff --git a/src/source-af-packet.h b/src/source-af-packet.h index e65a1f2a7a..61f4e69ea0 100644 --- a/src/source-af-packet.h +++ b/src/source-af-packet.h @@ -32,6 +32,11 @@ #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