From f3054a90ea75dbe94c68716d1e316daa70c184b1 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Mon, 8 May 2023 09:17:07 +0200 Subject: [PATCH] banip: release 0.8.5-2 * fixed a log parser regression introduced in latest 0.8.4 update Signed-off-by: Dirk Brenken --- net/banip/Makefile | 2 +- net/banip/files/banip-service.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/banip/Makefile b/net/banip/Makefile index 07bad22134..fe74a723d3 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip PKG_VERSION:=0.8.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/banip/files/banip-service.sh b/net/banip/files/banip-service.sh index aadeae380e..b67c5a0aac 100755 --- a/net/banip/files/banip-service.sh +++ b/net/banip/files/banip-service.sh @@ -192,7 +192,7 @@ if [ -x "${ban_logreadcmd}" ] && [ -n "${ban_logterm%%??}" ] && [ "${ban_loglimi if [ -n "${proto}" ] && ! "${ban_nftcmd}" get element inet banIP blocklist"${proto}" "{ ${ip} }" >/dev/null 2>&1; then f_log "info" "suspicious IP${proto} '${ip}'" log_raw="$("${ban_logreadcmd}" -l "${ban_loglimit}" 2>/dev/null)" - log_count="$(printf "%s\n" "${log_raw}" | grep -c "found '${ip}'")" + log_count="$(printf "%s\n" "${log_raw}" | grep -c "suspicious IP${proto} '${ip}'")" if [ "${log_count}" -ge "${ban_logcount}" ]; then if "${ban_nftcmd}" add element inet banIP "blocklist${proto}" "{ ${ip} ${nft_expiry} }" >/dev/null 2>&1; then f_log "info" "add IP${proto} '${ip}' (expiry: ${nft_expiry:-"-"}) to blocklist${proto} set" -- 2.30.2