Browse Source

Merge pull request #9003 from dibdot/banip

banip: update 0.1.1
lilik-openwrt-22.03
Dirk Brenken 6 years ago
committed by GitHub
parent
commit
79a48ce391
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions
  1. +1
    -1
      net/banip/Makefile
  2. +1
    -1
      net/banip/files/banip.conf
  3. +5
    -5
      net/banip/files/banip.sh

+ 1
- 1
net/banip/Makefile View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=banip PKG_NAME:=banip
PKG_VERSION:=0.1.0
PKG_VERSION:=0.1.1
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+ PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>


+ 1
- 1
net/banip/files/banip.conf View File

@ -10,7 +10,7 @@ config banip 'global'
config banip 'extra' config banip 'extra'
option ban_debug '0' option ban_debug '0'
option ban_backup '0' option ban_backup '0'
option ban_maxqueue '8'
option ban_maxqueue '4'
config source 'whitelist' config source 'whitelist'
option ban_src '/etc/banip/banip.whitelist' option ban_src '/etc/banip/banip.whitelist'


+ 5
- 5
net/banip/files/banip.sh View File

@ -10,7 +10,7 @@
# #
LC_ALL=C LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin" PATH="/usr/sbin:/usr/bin:/sbin:/bin"
ban_ver="0.1.0"
ban_ver="0.1.1"
ban_sysver="unknown" ban_sysver="unknown"
ban_enabled=0 ban_enabled=0
ban_automatic="1" ban_automatic="1"
@ -19,7 +19,7 @@ ban_debug=0
ban_backup=0 ban_backup=0
ban_backupboot=0 ban_backupboot=0
ban_backupdir="/mnt" ban_backupdir="/mnt"
ban_maxqueue=8
ban_maxqueue=4
ban_fetchutil="uclient-fetch" ban_fetchutil="uclient-fetch"
ban_ip="$(command -v ip)" ban_ip="$(command -v ip)"
ban_ipt="$(command -v iptables)" ban_ipt="$(command -v iptables)"
@ -257,7 +257,7 @@ f_iptrule()
rc="$("${ban_ipt6}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})" rc="$("${ban_ipt6}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \ if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \
|| ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
|| ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
then then
"${ban_ipt6}" "${timeout}" "${action}" ${rule} "${ban_ipt6}" "${timeout}" "${action}" ${rule}
fi fi
@ -265,7 +265,7 @@ f_iptrule()
rc="$("${ban_ipt}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})" rc="$("${ban_ipt}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \ if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \
|| ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
|| ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
then then
"${ban_ipt}" "${timeout}" "${action}" ${rule} "${ban_ipt}" "${timeout}" "${action}" ${rule}
fi fi
@ -678,7 +678,7 @@ f_main()
if [ ${ban_rc} -eq 0 ] if [ ${ban_rc} -eq 0 ]
then then
awk "${src_rset}" "${tmp_load}" 2>/dev/null | sort -u > "${tmp_file}"
awk "${src_rset}" "${tmp_load}" 2>/dev/null > "${tmp_file}"
ban_rc=${?} ban_rc=${?}
if [ ${ban_rc} -eq 0 ] if [ ${ban_rc} -eq 0 ]
then then


Loading…
Cancel
Save