From 4356180197a7a32236a05b332eebf6cf1329cb25 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Mon, 4 Mar 2024 21:26:44 +0100 Subject: [PATCH] banip: update 0.9.4-3 * fix another logical glitch in the logfile monitor Signed-off-by: Dirk Brenken --- net/banip/Makefile | 2 +- net/banip/files/banip-functions.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/banip/Makefile b/net/banip/Makefile index 531a343ef2..64426e5907 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 cd5fd4f2bb..5de6501716 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##* }" -- 2.30.2