From: Dirk Brenken Date: Mon, 4 Mar 2024 20:26:44 +0000 (+0100) Subject: banip: update 0.9.4-3 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=4356180197a7a32236a05b332eebf6cf1329cb25;p=openwrt-packages.git banip: update 0.9.4-3 * fix another logical glitch in the logfile monitor Signed-off-by: Dirk Brenken --- diff --git a/net/banip/Makefile b/net/banip/Makefile index 531a343ef..64426e590 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip PKG_VERSION:=0.9.4 -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 cd5fd4f2b..5de650171 100644 --- a/net/banip/files/banip-functions.sh +++ b/net/banip/files/banip-functions.sh @@ -1581,7 +1581,10 @@ f_monitor() { while read -r line; do proto="" : >"${ban_rdapfile}" - [ -z "${daemon}" ] && daemon="$(printf "%s" "${line}" | "${ban_awkcmd}" 'BEGIN{RS="dropbear"}{if(!seen[RT]++)printf "%s",RT}')" || daemon="sshd" + if [ -z "${daemon}" ]; then + daemon="$(printf "%s" "${line}" | "${ban_awkcmd}" 'BEGIN{RS="dropbear"}{if(!seen[RT]++)printf "%s",RT}')" + [ -z "${daemon}" ] && daemon="sshd" + fi ip="$(printf "%s" "${line}" | "${ban_awkcmd}" 'BEGIN{RS="(([0-9]{1,3}\\.){3}[0-9]{1,3})+"}{if(!seen[RT]++)printf "%s ",RT}')" ip="$(f_trim "${ip}")" ip="${ip##* }"