From 994bc15c2a42230cc4493f6a9df33db13764c32b Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Wed, 9 Mar 2016 16:57:29 +0100 Subject: [PATCH] af-packet: disable most code when not built in When af-packet is not build we can avoid to build a large amount of code. --- src/runmode-af-packet.c | 6 ++++++ src/suricata.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index cd98b22950..3d3b6cdeca 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -83,6 +83,9 @@ void RunModeIdsAFPRegister(void) return; } + +#ifdef HAVE_AF_PACKET + void AFPDerefConfig(void *conf) { AFPIfaceConfig *pfp = (AFPIfaceConfig *)conf; @@ -475,6 +478,9 @@ int AFPRunModeIsIPS() return has_ips; } +#endif + + int RunModeIdsAFPAutoFp(void) { SCEnter(); diff --git a/src/suricata.c b/src/suricata.c index e454b8b043..cbdea55150 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -984,6 +984,7 @@ static TmEcode ParseInterfacesList(int run_mode, char *pcap_dev) /* not an error condition if we have a 1.0 config */ LiveBuildDeviceList("pfring"); } +#ifdef HAVE_AF_PACKET } else if (run_mode == RUNMODE_AFP_DEV) { /* iface has been set on command line */ if (strlen(pcap_dev)) { @@ -1002,6 +1003,7 @@ static TmEcode ParseInterfacesList(int run_mode, char *pcap_dev) EngineModeSetIPS(); } } +#endif #ifdef HAVE_NETMAP } else if (run_mode == RUNMODE_NETMAP) { /* iface has been set on command line */ -- 2.47.2