aboutsummaryrefslogtreecommitdiff
path: root/net/snort3
diff options
context:
space:
mode:
authorEric Fahlgren <ericfahlgren@gmail.com>2024-04-12 14:21:15 -0700
committerTianling Shen <cnsztl@gmail.com>2024-04-13 13:22:40 +0800
commit4ce2d741c6d7619cd66539668fa148bc16aa78d9 (patch)
tree632b2766ae76f533bc406746f9ed3abb74659db6 /net/snort3
parent50810923da4373c9a6e997e2c2ce7b1d453f5ac9 (diff)
snort3: fix issue caused by ucode semantics change
A recent change in the ucode interpeter caused a failure when using the 'in' operator. https://github.com/jow-/ucode/commit/be767ae197babd656d4f5d9c2d5013e39ddbe656 Reported in a forum post by @graysky2. https://forum.openwrt.org/t/194218/28 Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Diffstat (limited to 'net/snort3')
-rw-r--r--net/snort3/Makefile2
-rw-r--r--net/snort3/files/main.uc4
2 files changed, 5 insertions, 1 deletions
diff --git a/net/snort3/Makefile b/net/snort3/Makefile
index e895399ef..907154464 100644
--- a/net/snort3/Makefile
+++ b/net/snort3/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=snort3
PKG_VERSION:=3.1.82.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/snort3/snort3/archive/refs/tags/
diff --git a/net/snort3/files/main.uc b/net/snort3/files/main.uc
index 8e33f9e5d..33361f2b1 100644
--- a/net/snort3/files/main.uc
+++ b/net/snort3/files/main.uc
@@ -76,6 +76,10 @@ function config_item(type, values, def) {
wrn(`Invalid item type '${type}', must be one of "enum", "range", "path" or "str".`);
return;
}
+ if (type == "enum") {
+ // Convert values to strings, so 'in' works in 'contains'.
+ values = map(values, function(i) { return "" + i; });
+ }
if (type == "range" && (length(values) != 2 || values[0] > values[1])) {
wrn(`A 'range' type item must have exactly 2 values in ascending order.`);
return;