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= multiport=
if [ "x$proto" = xipp2p ]; then case $proto in
ipp2p|IPP2P)
[ "x$port" = "x-" ] && port="ipp2p" [ "x$port" = "x-" ] && port="ipp2p"
r="${r}-p tcp -m ipp2p --${port} " r="${r}-p tcp -m ipp2p --${port} "
else           ;;
[ "x$proto" = "x-" ] && proto=all icmp|ICMP|1)
[ "x$proto" = "x" ] && proto=all r="${r}-p icmp "
[ "$proto" = "all" ] || r="${r}-p $proto " [ "x$port"   = "x-" ] || r="${r}--icmp-type $port"
[ "x$port" = "x-" ] || r="${r}--dport $port " ;;
fi *)
[ "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 " [ "x$sport" = "x-" ] || r="${r}--sport $sport "