From: Masud Hasan (mashasan) Date: Wed, 25 Nov 2020 19:08:54 +0000 (+0000) Subject: Merge pull request #2629 in SNORT/snort3 from ~MMATIRKO/snort3:active_fix to master X-Git-Tag: 3.0.3-6~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38e5bf308d68d62756f5dcbca47f3883e832edbd;p=thirdparty%2Fsnort3.git Merge pull request #2629 in SNORT/snort3 from ~MMATIRKO/snort3:active_fix to master Squashed commit of the following: commit 41c21f977ec4d6b040353937c7c2f5511a8975f2 Author: Michael Matirko Date: Fri Nov 20 09:36:58 2020 -0500 active: Fix falling back on using raw IP for active responses when no device is specified This only takes effect when the DAQ module does not support injection. --- diff --git a/src/packet_io/active.cc b/src/packet_io/active.cc index de39b0e4b..df4b8923c 100644 --- a/src/packet_io/active.cc +++ b/src/packet_io/active.cc @@ -188,7 +188,8 @@ bool Active::thread_init(const SnortConfig* sc) if ( sc->is_active_enabled() && (!SFDAQ::can_inject() || !sc->respond_device.empty()) ) { - if ( sc->read_mode() || !open(sc->respond_device.c_str()) ) + if ( sc->read_mode() || + !open(sc->respond_device.empty() ? nullptr : sc->respond_device.c_str()) ) { ParseWarning(WARN_DAQ, "active responses disabled since DAQ " "can't inject packets.");