X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/blobdiff_plain/00851a0a72356001e40304879907b9ecec8ce588..12ac65a1e0d1d8083bdbf50154248a0c5110a2b2:/functions.m4 diff --git a/functions.m4 b/functions.m4 index 85afc10..680df6d 100644 --- a/functions.m4 +++ b/functions.m4 @@ -151,20 +151,20 @@ allowservices () { for svc; do case $svc in *:*) - n=2 + n=2 left=${svc%:*} right=${svc#*:} case $left in *[!0-9]*) eval left=\$port_$left ;; esac case $right in *[!0-9]*) eval right=\$port_$right ;; esac svc=$left:$right ;; *) - n=1 + n=1 case $svc in *[!0-9]*) eval svc=\$port_$svc ;; esac ;; esac case $svc in *: | :* | "" | *[!0-9:]*) - echo >&2 "Bad service name" + echo >&2 "Bad service name" exit 1 ;; esac @@ -183,7 +183,7 @@ allowservices () { run iptables -A $chain -p $proto -m multiport -j ACCEPT \ --destination-ports ${list#,} ;; - *) + *) run iptables -A $chain -p $proto -j ACCEPT \ --destination-port ${list#,} ;; @@ -291,7 +291,7 @@ defnetclass () { from=$(( $from + $bit )) done to=$(( ($netclassindex << $BIT_TO) + \ - (0xf << $BIT_FROM) + \ + (0xf << $BIT_FROM) + \ (1 << ($netclassindex + $BIT_MASK)) )) trace "from $name --> set $(printf %x $from)" trace " to $name --> and $(printf %x $from)"