]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
afpacket/netmap: warn about mixed ips, ids/tap deprecation
authorJason Ish <jason.ish@oisf.net>
Wed, 19 Oct 2022 19:07:56 +0000 (13:07 -0600)
committerVictor Julien <vjulien@oisf.net>
Fri, 25 Nov 2022 19:12:07 +0000 (20:12 +0100)
Suricata already logs if AF_PACKET or Netmap are running in a mixed IPS
and IDS/TAP mode.  As the behavior is undefined when these modes are
mixed, it is best to deprecate and to not allow this behavior. For now
warn that it will be unsupported and fail in Suricata 8.

Ticket: 5587
(cherry picked from commit 0c00f28ebcf168e4712f23d49c27508c27f6e774)

src/runmode-af-packet.c
src/runmode-netmap.c

index 4af254927f74b5239bd3245b616e1386fb8f133c..12bfbfb659110b453cdfb5186aafe03dd47f9008 100644 (file)
@@ -764,7 +764,9 @@ int AFPRunModeIsIPS()
     }
 
     if (has_ids && has_ips) {
-        SCLogInfo("AF_PACKET mode using IPS and IDS mode");
+        SCLogWarning(SC_ERR_INVALID_ARGUMENT,
+                "AF_PACKET using both IPS and TAP/IDS mode, this will not "
+                "be allowed in Suricata 8 due to undefined behavior. See ticket #5588.");
         for (ldev = 0; ldev < nlive; ldev++) {
             const char *live_dev = LiveGetDeviceName(ldev);
             if (live_dev == NULL) {
index 2450fba094afc86a1c9b0b168fc3a77fc2a3bf51..9e31b08b20ef614cc26aa1e7fc45d272f9cb7ac1 100644 (file)
@@ -420,7 +420,9 @@ int NetmapRunModeIsIPS()
     }
 
     if (has_ids && has_ips) {
-        SCLogInfo("Netmap mode using IPS and IDS mode");
+        SCLogWarning(SC_ERR_INVALID_ARGUMENT,
+                "Netmap using both IPS and TAP/IDS mode, this will not be "
+                "allowed in Suricata 8 due to undefined behavior. See ticket #5588.");
         for (ldev = 0; ldev < nlive; ldev++) {
             const char *live_dev = LiveGetDeviceName(ldev);
             if (live_dev == NULL) {