mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 03:54:34 +04:00
snort3: clean up ucode usage
- Add missing 'ucode' package dependency - Proto-ify the ConfigItem objects - Fix indentation and tab usage Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
This commit is contained in:
committed by
Tianling Shen
parent
aec4766913
commit
db58c9cd81
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=snort3
|
PKG_NAME:=snort3
|
||||||
PKG_VERSION:=3.1.78.0
|
PKG_VERSION:=3.1.78.0
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/snort3/snort3/archive/refs/tags/
|
PKG_SOURCE_URL:=https://github.com/snort3/snort3/archive/refs/tags/
|
||||||
@@ -25,7 +25,8 @@ define Package/snort3
|
|||||||
SUBMENU:=Firewall
|
SUBMENU:=Firewall
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc @HAS_LUAJIT_ARCH +luajit +libatomic +kmod-nft-queue +liblzma
|
DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc @HAS_LUAJIT_ARCH +luajit +libatomic +kmod-nft-queue +liblzma \
|
||||||
|
+ucode +ucode-mod-fs +ucode-mod-uci
|
||||||
TITLE:=Lightweight Network Intrusion Detection System
|
TITLE:=Lightweight Network Intrusion Detection System
|
||||||
URL:=http://www.snort.org/
|
URL:=http://www.snort.org/
|
||||||
MENU:=1
|
MENU:=1
|
||||||
|
|||||||
@@ -39,23 +39,7 @@ function rpad(str, fill, len)
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
function config_item(type, values, def) {
|
const ConfigItem = {
|
||||||
// If no default value is provided explicity, then values[0] is used as default.
|
|
||||||
if (! type in [ "enum", "range", "path", "str" ]) {
|
|
||||||
wrn(`Invalid item type '${type}', must be one of "enum", "range", "path" or "str".`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (type == "range" && (length(values) != 2 || values[0] > values[1])) {
|
|
||||||
wrn(`A 'range' type item must have exactly 2 values in ascending order.`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Maybe check paths for existence???
|
|
||||||
|
|
||||||
return {
|
|
||||||
type: type,
|
|
||||||
values: values,
|
|
||||||
default: def ?? values[0],
|
|
||||||
|
|
||||||
contains: function(value) {
|
contains: function(value) {
|
||||||
// Check if the value is contained in the listed values,
|
// Check if the value is contained in the listed values,
|
||||||
// depending on the item type.
|
// depending on the item type.
|
||||||
@@ -84,7 +68,25 @@ function config_item(type, values, def) {
|
|||||||
return "???";
|
return "???";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
function config_item(type, values, def) {
|
||||||
|
// If no default value is provided explicity, then values[0] is used as default.
|
||||||
|
if (! type in [ "enum", "range", "path", "str" ]) {
|
||||||
|
wrn(`Invalid item type '${type}', must be one of "enum", "range", "path" or "str".`);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (type == "range" && (length(values) != 2 || values[0] > values[1])) {
|
||||||
|
wrn(`A 'range' type item must have exactly 2 values in ascending order.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Maybe check 'path' values for existence???
|
||||||
|
|
||||||
|
return proto({
|
||||||
|
type: type,
|
||||||
|
values: values,
|
||||||
|
default: def ?? values[0],
|
||||||
|
}, ConfigItem);
|
||||||
};
|
};
|
||||||
|
|
||||||
const snort_config = {
|
const snort_config = {
|
||||||
|
|||||||
Reference in New Issue
Block a user