From b603ad62e56ae9aa8a18409a98abc2d2042573db Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sat, 8 Feb 2014 22:01:13 +0100 Subject: [PATCH] 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 --- src/source-af-packet.c | 4 ++++ 1 file changed, 4 insertions(+) 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;