]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
netmap: Avoid HW errors when using pipes
authorJeff Lucovsky <jeff.lucovsky@corelight.com>
Thu, 7 Mar 2024 20:24:36 +0000 (15:24 -0500)
committerVictor Julien <victor@inliniac.net>
Fri, 8 Mar 2024 21:01:29 +0000 (22:01 +0100)
Issue: 6837

When using netmap pipes (with lb, for example), avoid direct hardware
related IOCTLs that will fail (not supported with pipes).

src/runmode-netmap.c

index 927dc718856c65ac54e63cb0d3a3bee31e2a9571..e207cf06300fb9a37c9041e205f9c216f63a8f3d 100644 (file)
@@ -344,7 +344,9 @@ static void *ParseNetmapConfig(const char *iface_name)
         }
     }
 
-    int ring_count = NetmapGetRSSCount(aconf->iface_name);
+    int ring_count = 0;
+    if (aconf->in.real)
+        ring_count = NetmapGetRSSCount(aconf->iface_name);
     if (strlen(aconf->iface_name) > 0 &&
             (aconf->iface_name[strlen(aconf->iface_name) - 1] == '^' ||
                     aconf->iface_name[strlen(aconf->iface_name) - 1] == '*')) {