Allow icmp-type in tcrules and more whitespace

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2711 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2005-09-19 14:43:22 +00:00
parent 09773c6c65
commit 1a5852b7c9

View File

@ -3192,15 +3192,22 @@ process_tc_rule()
multiport=
if [ "x$proto" = xipp2p ]; then
[ "x$port" = "x-" ] && port="ipp2p"
r="${r}-p tcp -m ipp2p --${port} "
else
[ "x$proto" = "x-" ] && proto=all
[ "x$proto" = "x" ] && proto=all
[ "$proto" = "all" ] || r="${r}-p $proto "
[ "x$port" = "x-" ] || r="${r}--dport $port "
fi
case $proto in
ipp2p|IPP2P)
[ "x$port" = "x-" ] && port="ipp2p"
r="${r}-p tcp -m ipp2p --${port} "
          ;;
icmp|ICMP|1)
r="${r}-p icmp "
[ "x$port"   = "x-" ] || r="${r}--icmp-type $port"
;;
*)
[ "x$proto"  = "x-"  ] && proto=all
[ "x$proto"  = "x"   ] && proto=all
[ "$proto"   = "all" ] || r="${r}-p $proto "
[ "x$port"   = "x-"  ] || r="${r}--dport $port "
;;
esac
[ "x$sport" = "x-" ] || r="${r}--sport $sport "