From: Eric Leblond Date: Sat, 8 Feb 2014 21:01:13 +0000 (+0100) Subject: af-packet: declare TP_STATUS_VLAN_VALID if needed X-Git-Tag: suricata-2.0rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b603ad62e56ae9aa8a18409a98abc2d2042573db;p=thirdparty%2Fsuricata.git af-packet: declare TP_STATUS_VLAN_VALID if needed Some old distribution don't ship recent enough linux header. This result in TP_STATUS_VLAN_VALID being undefined. This patch defines the constant and use it as it is used in backward compatible method in the code: the flag is not set by kernel and a test on vci value will be made. This should fix https://redmine.openinfosecfoundation.org/issues/1106 --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 02a67a7aeb..63d7051646 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -157,6 +157,10 @@ TmEcode NoAFPSupportExit(ThreadVars *tv, void *initdata, void **data) #define TP_STATUS_USER_BUSY (1 << 31) #endif +#ifndef TP_STATUS_VLAN_VALID +#define TP_STATUS_VLAN_VALID (1 << 4) +#endif + /** protect pfring_set_bpf_filter, as it is not thread safe */ static SCMutex afpacket_bpf_set_filter_lock = SCMUTEX_INITIALIZER;