]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: disable most code when not built in
authorEric Leblond <eric@regit.org>
Wed, 9 Mar 2016 15:57:29 +0000 (16:57 +0100)
committerEric Leblond <eric@regit.org>
Wed, 9 Mar 2016 15:58:52 +0000 (16:58 +0100)
When af-packet is not build we can avoid to build a large amount
of code.

src/runmode-af-packet.c
src/suricata.c

index cd98b229505cbd0dadf1c087ec53563c3ad4057b..3d3b6cdeca0ae4cda1bacea9abd06077e2e05eed 100644 (file)
@@ -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();
index e454b8b04319bee400a878148e6b110e4ac0bb72..cbdea55150b550add530fcf452e2c175d090117a 100644 (file)
@@ -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 */