Merge pull request #15168 from dibdot/banIP

banip: update 0.7.5-3
This commit is contained in:
Dirk Brenken 2021-03-19 22:19:29 +01:00 committed by GitHub
commit 1e0eaa1f4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 32 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=banip
PKG_VERSION:=0.7.5
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View File

@ -678,16 +678,19 @@ f_ipset()
"initial")
for proto in "4" "6"
do
if [ "${proto}" = "4" ]
if [ "${proto}" = "4" ] && [ "${ban_proto4_enabled}" = "1" ]
then
ipt_cmd="${ban_ipt4_cmd}"
chainsets="${ban_lan_inputchains_4} ${ban_lan_forwardchains_4} ${ban_wan_inputchains_4} ${ban_wan_forwardchains_4}"
elif [ "${proto}" = "6" ]
elif [ "${proto}" = "6" ] && [ "${ban_proto6_enabled}" = "1" ]
then
ipt_cmd="${ban_ipt6_cmd}"
chainsets="${ban_lan_inputchains_6} ${ban_lan_forwardchains_6} ${ban_wan_inputchains_6} ${ban_wan_forwardchains_6}"
fi
if { [ "${proto}" = "4" ] && [ "${ban_proto4_enabled}" = "1" ]; } || \
{ [ "${proto}" = "6" ] && [ "${ban_proto6_enabled}" = "1" ]; }
then
if [ -z "$("${ipt_cmd}" "${timeout}" -nL "${ban_chain}" 2>/dev/null)" ]
then
"${ipt_cmd}" "${timeout}" -N "${ban_chain}" 2>/dev/null
@ -734,6 +737,7 @@ f_ipset()
fi
f_log "debug" "f_ipset ::: name: initial, mode: ${mode:-"-"}, logchain_dst: ${ban_logchain_dst:-"-"}, out_rc: ${out_rc}"
fi
fi
done
out_rc="${out_rc:-"${in_rc}"}"
f_log "debug" "f_ipset ::: name: ${src_name:-"-"}, mode: ${mode:-"-"}, out_rc: ${out_rc}"