]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
config/pf-ring: Recognize and set add'l cluster types
authorJeff Lucovsky <jlucovsky@oisf.net>
Sun, 16 Apr 2023 12:37:09 +0000 (08:37 -0400)
committerVictor Julien <vjulien@oisf.net>
Thu, 4 May 2023 13:47:54 +0000 (15:47 +0200)
This commit extends the pf-ring config parser to recognize the
additional cluster types:
- cluster_inner_flow
- cluster_inner_flow_2_tuple
- cluster_inner_flow_4_tuple
- cluster_inner_flow_5_tuple

Issue: 5975
(cherry picked from commit b21a4ded6e2a90ae8a5f4371fa9973c033275067)

src/runmode-pfring.c

index f3cef34c9cffe2cfa7f0edf6bf816c07774acf9b..d9f6186cbd62e545ddfde7021139665f0a128404 100644 (file)
@@ -344,6 +344,21 @@ static void *ParsePfringConfig(const char *iface)
             SCLogInfo("Using flow cluster mode for PF_RING (iface %s)",
                     pfconf->iface);
             pfconf->ctype = CLUSTER_FLOW;
+        } else if (strcmp(tmpctype, "cluster_inner_flow") == 0) {
+            SCLogInfo("Using flow cluster mode inner mode for PF_RING (iface %s)", pfconf->iface);
+            pfconf->ctype = CLUSTER_INNER_FLOW;
+        } else if (strcmp(tmpctype, "cluster_inner_flow_2_tuple") == 0) {
+            SCLogInfo(
+                    "Using flow cluster inner 2 tuple mode for PF_RING (iface %s)", pfconf->iface);
+            pfconf->ctype = CLUSTER_INNER_FLOW_2_TUPLE;
+        } else if (strcmp(tmpctype, "cluster_inner_flow_4_tuple") == 0) {
+            SCLogInfo(
+                    "Using flow cluster inner 4 tuple mode for PF_RING (iface %s)", pfconf->iface);
+            pfconf->ctype = CLUSTER_INNER_FLOW_4_TUPLE;
+        } else if (strcmp(tmpctype, "cluster_inner_flow_5_tuple") == 0) {
+            SCLogInfo(
+                    "Using flow cluster inner 5 tuple mode for PF_RING (iface %s)", pfconf->iface);
+            pfconf->ctype = CLUSTER_INNER_FLOW_5_TUPLE;
         } else {
             SCLogError(SC_ERR_INVALID_CLUSTER_TYPE,
                        "invalid cluster-type %s",