From: Eric Leblond Date: Mon, 26 Mar 2012 16:57:42 +0000 (+0200) Subject: Improve check of min requirement for AF_PACKET. X-Git-Tag: suricata-1.3beta1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac2d13d62b7d0c2bb54ef211ba8481176b25ff78;p=thirdparty%2Fsuricata.git Improve check of min requirement for AF_PACKET. As pointed out by #416, AF_PACKET detection support was not accurate enough. This patch improves the check by doing a verification of the availability of the feature level needed to build AF_PACKET. We need TPACKET_V2 which is available after 2.6.27. --- diff --git a/configure.in b/configure.in index fdf670e7ed..e0528a5b41 100644 --- a/configure.in +++ b/configure.in @@ -822,10 +822,11 @@ AC_INIT(configure.in) AS_HELP_STRING([--enable-af-packet], [Enable AF_PACKET support [default=yes]]), ,[enable_af_packet=yes]) AS_IF([test "x$enable_af_packet" = "xyes"], [ - AC_CHECK_DECL([AF_PACKET], + AC_CHECK_DECL([TPACKET_V2], AC_DEFINE([HAVE_AF_PACKET],[1],[AF_PACKET support is available]), - [enable_af_packet=no], - [[#include ]]) + [enable_af_packet="no"], + [[#include + #include ]]) AC_CHECK_DECL([PACKET_FANOUT], AC_DEFINE([HAVE_PACKET_FANOUT],[1],[Packet fanout support is available]), [],