summaryrefslogtreecommitdiffstats
path: root/src/runmode-pfring.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:40:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:40:16 +0000
commitf71a078c8abe5e11d23ef451a4a6bae6e3dad9fe (patch)
treed2bd79992fcea321b48cff207d2d44f98f4bdf57 /src/runmode-pfring.c
parentReleasing progress-linux version 1:7.0.3-1~progress7.99u1. (diff)
downloadsuricata-f71a078c8abe5e11d23ef451a4a6bae6e3dad9fe.tar.xz
suricata-f71a078c8abe5e11d23ef451a4a6bae6e3dad9fe.zip
Merging upstream version 1:7.0.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/runmode-pfring.c')
-rw-r--r--src/runmode-pfring.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runmode-pfring.c b/src/runmode-pfring.c
index b0af83b..7f1f74f 100644
--- a/src/runmode-pfring.c
+++ b/src/runmode-pfring.c
@@ -200,6 +200,7 @@ static void *ParsePfringConfig(const char *iface)
cluster_type default_ctype = CLUSTER_FLOW;
int getctype = 0;
int bool_val;
+ const char *active_runmode = RunmodeGetActive();
if (unlikely(pfconf == NULL)) {
return NULL;
@@ -244,7 +245,9 @@ static void *ParsePfringConfig(const char *iface)
if_default = NULL;
}
- if (ConfGetChildValueWithDefault(if_root, if_default, "threads", &threadsstr) != 1) {
+ if (active_runmode && !strcmp("single", active_runmode)) {
+ pfconf->threads = 1;
+ } else if (ConfGetChildValueWithDefault(if_root, if_default, "threads", &threadsstr) != 1) {
pfconf->threads = 1;
} else if (threadsstr != NULL) {
if (strcmp(threadsstr, "auto") == 0) {