]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2629 in SNORT/snort3 from ~MMATIRKO/snort3:active_fix to master
authorMasud Hasan (mashasan) <mashasan@cisco.com>
Wed, 25 Nov 2020 19:08:54 +0000 (19:08 +0000)
committerMasud Hasan (mashasan) <mashasan@cisco.com>
Wed, 25 Nov 2020 19:08:54 +0000 (19:08 +0000)
Squashed commit of the following:

commit 41c21f977ec4d6b040353937c7c2f5511a8975f2
Author: Michael Matirko <mmatirko@cisco.com>
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.

src/packet_io/active.cc

index de39b0e4b7045bab29b5a5131b9f6685bd79db40..df4b8923c5fc7b400547cf155b68add8ee6c876b 100644 (file)
@@ -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.");