From 3584187f69f954e0e70dc86ffcf7d46d0df37452 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sat, 1 Jun 2024 16:06:59 +0200 Subject: [PATCH] banip: update 0.9.6-3 * fixed concurrent, too high nft loads during feed processing (seen in LuCI frontend) Signed-off-by: Dirk Brenken --- net/banip/Makefile | 2 +- net/banip/files/banip-functions.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/banip/Makefile b/net/banip/Makefile index 29da8a2bed..8b120e06cb 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip PKG_VERSION:=0.9.6 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/banip/files/banip-functions.sh b/net/banip/files/banip-functions.sh index 08b4b10f17..74dcc5fa3c 100644 --- a/net/banip/files/banip-functions.sh +++ b/net/banip/files/banip-functions.sh @@ -332,7 +332,7 @@ f_conf() { f_actual() { local nft monitor ppid pids pid - if "${ban_nftcmd}" list chain inet banIP pre-routing >/dev/null 2>&1; then + if "${ban_nftcmd}" -t list set inet banIP allowlistv4MAC >/dev/null 2>&1; then nft="$(f_char "1")" else nft="$(f_char "0")" @@ -632,7 +632,7 @@ f_nftinit() { # nft header (tables and chains) # printf "%s\n\n" "#!/usr/sbin/nft -f" - if "${ban_nftcmd}" list chain inet banIP pre-routing >/dev/null 2>&1; then + if "${ban_nftcmd}" -t list set inet banIP allowlistv4MAC >/dev/null 2>&1; then printf "%s\n" "delete table inet banIP" fi printf "%s\n" "add table inet banIP" @@ -1292,7 +1292,7 @@ f_getstatus() { else json_get_var value "${key}" >/dev/null 2>&1 if [ "${key}" = "status" ]; then - value="${value} ($(f_actual))" + [ "${value}" = "active" ] && value="${value} ($(f_actual))" || value="${value}" fi fi if [ "${key}" != "wan_interfaces" ] && [ "${key}" != "vlan_allow" ] && [ "${key}" != "vlan_block" ]; then -- 2.30.2