banip: update 0.9.6-3
authorDirk Brenken <dev@brenken.org>
Sat, 1 Jun 2024 14:06:59 +0000 (16:06 +0200)
committerDirk Brenken <dev@brenken.org>
Sat, 1 Jun 2024 14:06:59 +0000 (16:06 +0200)
* fixed concurrent, too high nft loads during feed processing (seen in LuCI frontend)

Signed-off-by: Dirk Brenken <dev@brenken.org>
net/banip/Makefile
net/banip/files/banip-functions.sh

index 29da8a2bed5e410db201382d7da8660265f7e949..8b120e06cbec28a00f08a7d59309f7e56c82e966 100644 (file)
@@ -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 <dev@brenken.org>
 
index 08b4b10f174b6cd761c97493b54dcbbeadab10a3..74dcc5fa3ccac30f679a64c13dc37cbe4b78f9c8 100644 (file)
@@ -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