banip: update 0.8.9-3
authorDirk Brenken <dev@brenken.org>
Sat, 8 Jul 2023 17:51:52 +0000 (19:51 +0200)
committerDirk Brenken <dev@brenken.org>
Sat, 8 Jul 2023 17:51:52 +0000 (19:51 +0200)
* 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 <dev@brenken.org>
net/banip/Makefile
net/banip/files/banip-functions.sh
net/banip/files/banip.feeds

index 4be2afd6955192ae63d78a2f0cbb07e3970abbb3..ebc88007d572d041435126bc8227783107214925 100644 (file)
@@ -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 <dev@brenken.org>
 
index 1fa1578d65cf3045337c054a78c52404e8b1ad62..ad642ee129586ecb726a725d7794f3cfbc85021d 100644 (file)
@@ -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}"
index d54f2de498a5b7f795cb4fc6ebc45dcac8f4176a..cfe1a70cc690f4ed7f89433f4def2ec9226b5dfc 100644 (file)
                "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",