From: Dirk Brenken Date: Sat, 8 Jul 2023 17:51:52 +0000 (+0200) Subject: banip: update 0.8.9-3 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=88e64a2ae488e1cd8d4d539c6d976c9ccc728d2f;p=openwrt-packages.git banip: update 0.8.9-3 * prevent superflous etag function calls during start action (on start backups will be used anyway) * changed the ipthreat feed download URL (load a compressed file variant to save bandwidth) Signed-off-by: Dirk Brenken --- diff --git a/net/banip/Makefile b/net/banip/Makefile index 4be2afd69..ebc88007d 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip PKG_VERSION:=0.8.9 -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 1fa1578d6..ad642ee12 100644 --- a/net/banip/files/banip-functions.sh +++ b/net/banip/files/banip-functions.sh @@ -582,7 +582,7 @@ f_nftinit() { # handle downloads # f_down() { - local log_input log_forwardwan log_forwardlan start_ts end_ts tmp_raw tmp_load tmp_file split_file ruleset_raw handle rc etag_rc="0" + local log_input log_forwardwan log_forwardlan start_ts end_ts tmp_raw tmp_load tmp_file split_file ruleset_raw handle rc etag_rc local cnt_set cnt_dl restore_rc feed_direction feed_rc feed_log feed="${1}" proto="${2}" feed_url="${3}" feed_rule="${4}" feed_flag="${5}" start_ts="$(date +%s)" @@ -648,7 +648,8 @@ f_down() { # restore local backups # if { [ "${ban_action}" != "reload" ] || [ "${feed_url}" = "local" ] || [ -n "${ban_etagparm}" ]; } && [ "${feed%v*}" != "allowlist" ] && [ "${feed%v*}" != "blocklist" ]; then - if [ -n "${ban_etagparm}" ] && [ "${feed_url}" != "local" ]; then + if [ -n "${ban_etagparm}" ] && [ "${ban_action}" = "reload" ] && [ "${feed_url}" != "local" ]; then + etag_rc="0" if [ "${feed%v*}" = "country" ]; then for country in ${ban_country}; do f_etag "${feed}" "${feed_url}${country}-aggregated.zone" ".${country}" diff --git a/net/banip/files/banip.feeds b/net/banip/files/banip.feeds index d54f2de49..cfe1a70cc 100644 --- a/net/banip/files/banip.feeds +++ b/net/banip/files/banip.feeds @@ -158,9 +158,10 @@ "descr": "blackhole IP blocklist" }, "ipthreat":{ - "url_4": "https://lists.ipthreat.net/file/ipthreat-lists/threat/threat-30.txt", + "url_4": "https://lists.ipthreat.net/file/ipthreat-lists/threat/threat-30.txt.gz", "rule_4": "/^(([0-9]{1,3}\\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(\\/(1?[0-9]|2?[0-9]|3?[0-2]))?)[-[:space:]]?/{printf \"%s,\\n\",$1}", - "descr": "hacker and botnet IPs" + "descr": "hacker and botnet IPs", + "flag": "gz" }, "myip":{ "url_4": "https://myip.ms/files/blacklist/general/latest_blacklist.txt",