aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2019-05-16 11:16:03 +0200
committerDirk Brenken <dev@brenken.org>2019-05-16 11:16:03 +0200
commitf3ece9653d4d5372e2b110f1040de8986687caa9 (patch)
tree976678e92cfd885364a58289dded49f8d3d33ac5 /net
parent6d6bceed8cf6d38a98d6464cdb62a513ba6554f9 (diff)
banip: update 0.1.1
* remove needless sort step to reduce system load * change maxqueue default in backend and LuCI frontend to '4' to reduce (default) system load * cosmetics Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'net')
-rw-r--r--net/banip/Makefile2
-rw-r--r--net/banip/files/banip.conf2
-rwxr-xr-xnet/banip/files/banip.sh10
3 files changed, 7 insertions, 7 deletions
diff --git a/net/banip/Makefile b/net/banip/Makefile
index 612825cbc..5cf2127c3 100644
--- a/net/banip/Makefile
+++ b/net/banip/Makefile
@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=banip
-PKG_VERSION:=0.1.0
+PKG_VERSION:=0.1.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
diff --git a/net/banip/files/banip.conf b/net/banip/files/banip.conf
index 7de03e8af..f658c445b 100644
--- a/net/banip/files/banip.conf
+++ b/net/banip/files/banip.conf
@@ -10,7 +10,7 @@ config banip 'global'
config banip 'extra'
option ban_debug '0'
option ban_backup '0'
- option ban_maxqueue '8'
+ option ban_maxqueue '4'
config source 'whitelist'
option ban_src '/etc/banip/banip.whitelist'
diff --git a/net/banip/files/banip.sh b/net/banip/files/banip.sh
index b12aed6b1..a55db3e02 100755
--- a/net/banip/files/banip.sh
+++ b/net/banip/files/banip.sh
@@ -10,7 +10,7 @@
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-ban_ver="0.1.0"
+ban_ver="0.1.1"
ban_sysver="unknown"
ban_enabled=0
ban_automatic="1"
@@ -19,7 +19,7 @@ ban_debug=0
ban_backup=0
ban_backupboot=0
ban_backupdir="/mnt"
-ban_maxqueue=8
+ban_maxqueue=4
ban_fetchutil="uclient-fetch"
ban_ip="$(command -v ip)"
ban_ipt="$(command -v iptables)"
@@ -257,7 +257,7 @@ f_iptrule()
rc="$("${ban_ipt6}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \
- || ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
+ || ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
then
"${ban_ipt6}" "${timeout}" "${action}" ${rule}
fi
@@ -265,7 +265,7 @@ f_iptrule()
rc="$("${ban_ipt}" "${timeout}" -C ${rule} 2>/dev/null; printf '%u' ${?})"
if ([ ${rc} -ne 0 ] && ([ "${action}" = "-A" ] || [ "${action}" = "-I" ])) \
- || ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
+ || ([ ${rc} -eq 0 ] && [ "${action}" = "-D" ])
then
"${ban_ipt}" "${timeout}" "${action}" ${rule}
fi
@@ -678,7 +678,7 @@ f_main()
if [ ${ban_rc} -eq 0 ]
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=${?}
if [ ${ban_rc} -eq 0 ]
then