]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
windows: exit early if live capture requested without npcap 6870/head
authorJason Ish <jason.ish@oisf.net>
Wed, 26 Jan 2022 22:38:22 +0000 (16:38 -0600)
committerVictor Julien <vjulien@oisf.net>
Thu, 27 Jan 2022 06:50:04 +0000 (07:50 +0100)
src/suricata.c

index 47cadf3d5f236448102f3950b516585c999436d1..5632846515c5df67151c88bcbb1db2cb344c8e76 100644 (file)
@@ -1212,6 +1212,11 @@ static int ParseCommandLineDpdk(SCInstance *suri, const char *in_arg)
 
 static int ParseCommandLinePcapLive(SCInstance *suri, const char *in_arg)
 {
+#if defined(OS_WIN32) && !defined(HAVE_LIBWPCAP)
+    /* If running on Windows without Npcap, bail early as live capture is not supported. */
+    FatalError(SC_ERR_FATAL,
+            "Live capture not available. To support live capture compile against Npcap.");
+#endif
     memset(suri->pcap_dev, 0, sizeof(suri->pcap_dev));
 
     if (in_arg != NULL) {