A small cleanup of the rules parsing code

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@580 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2003-06-01 16:51:34 +00:00
parent 89bb721da4
commit 18cfd011c3

View File

@ -1968,10 +1968,6 @@ add_a_rule()
{
local natrule=
rule_error() {
fatal_error "Only DNAT and REDIRECT rules may specify port mapping; rule \"$rule\""
}
# Set source variables
cli=
@ -2099,9 +2095,9 @@ add_a_rule()
# A specific server or server port given
if [ -n "$natrule" ]; then
add_nat_rule
add_nat_rule
elif [ -n "$addr" -a "$addr" != "$serv" ] || [ -n "$servport" -a "$servport" != "$port" ]; then
rule_error
fatal_error "Only DNAT and REDIRECT rules may specify port mapping; rule \"$rule\""
fi
if [ -z "$dnat_only" -a $chain != ${FW}2${FW} ]; then