From: Eric Leblond Date: Tue, 11 Jun 2019 14:53:28 +0000 (+0200) Subject: af-packet: some conditional fields X-Git-Tag: suricata-5.0.0-rc1~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa989a7445e6ca4186ae7d0ca4c0b8b249826e0d;p=thirdparty%2Fsuricata.git af-packet: some conditional fields --- diff --git a/src/source-af-packet.h b/src/source-af-packet.h index 88a277d9ac..e32d8756e4 100644 --- a/src/source-af-packet.h +++ b/src/source-af-packet.h @@ -149,11 +149,14 @@ typedef struct AFPPacketVars_ */ AFPPeer *mpeer; uint8_t copy_mode; +#ifdef HAVE_PACKET_EBPF int v4_map_fd; int v6_map_fd; unsigned int nr_cpus; +#endif } AFPPacketVars; +#ifdef HAVE_PACKET_EBPF #define AFPV_CLEANUP(afpv) do { \ (afpv)->relptr = NULL; \ (afpv)->copy_mode = 0; \ @@ -162,6 +165,14 @@ typedef struct AFPPacketVars_ (afpv)->v4_map_fd = -1; \ (afpv)->v6_map_fd = -1; \ } while(0) +#else +#define AFPV_CLEANUP(afpv) do { \ + (afpv)->relptr = NULL; \ + (afpv)->copy_mode = 0; \ + (afpv)->peer = NULL; \ + (afpv)->mpeer = NULL; \ +} while(0) +#endif /** * @}