From: Jason Ish Date: Wed, 26 Jan 2022 22:38:22 +0000 (-0600) Subject: windows: exit early if live capture requested without npcap X-Git-Tag: suricata-7.0.0-beta1~971 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e096dda4e0c7d1ebcb3607daea1181c29bc0137;p=thirdparty%2Fsuricata.git windows: exit early if live capture requested without npcap --- 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) {