aboutsummaryrefslogtreecommitdiff
path: root/contrib/qos
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-02 19:48:08 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-04 19:35:25 +0300
commit1ac454a3844b9b8389de0f660fa9455c0efa7140 (patch)
tree25912907998366914c0e0328eb53e214e35af13c /contrib/qos
parent6c21a801f3df4942d09d5a33d3dab04807f7bb37 (diff)
downloadbitcoin-1ac454a3844b9b8389de0f660fa9455c0efa7140.tar.xz
Enable ShellCheck rules
Enabled ShellCheck rules: SC1087 SC2001 SC2004 SC2005 SC2006 SC2016 SC2028 SC2048 SC2066 (note that IFS already contains only a line feed) SC2116 SC2166 SC2181 SC2206 SC2207 SC2230 SC2236
Diffstat (limited to 'contrib/qos')
-rw-r--r--contrib/qos/tc.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh
index 5f9b87d9b2..ccb0f4f895 100644
--- a/contrib/qos/tc.sh
+++ b/contrib/qos/tc.sh
@@ -33,7 +33,7 @@ tc class add dev ${IF} parent 1:1 classid 1:11 htb rate ${LIMIT} ceil ${LIMIT} p
tc filter add dev ${IF} parent 1: protocol ip prio 1 handle 1 fw classid 1:10
tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
-if [ ! -z "${LOCALNET_V6}" ] ; then
+if [ -n "${LOCALNET_V6}" ] ; then
# v6 cannot have the same priority value as v4
tc filter add dev ${IF} parent 1: protocol ipv6 prio 3 handle 1 fw classid 1:10
tc filter add dev ${IF} parent 1: protocol ipv6 prio 4 handle 2 fw classid 1:11
@@ -56,7 +56,7 @@ fi
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
-if [ ! -z "${LOCALNET_V6}" ] ; then
+if [ -n "${LOCALNET_V6}" ] ; then
ip6tables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
ip6tables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
fi