From 9e096dda4e0c7d1ebcb3607daea1181c29bc0137 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 26 Jan 2022 16:38:22 -0600 Subject: [PATCH] windows: exit early if live capture requested without npcap --- src/suricata.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/suricata.c b/src/suricata.c index 47cadf3d5f..5632846515 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -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) { -- 2.47.2