mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 17:28:35 +02:00
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:
parent
89bb721da4
commit
18cfd011c3
@ -1968,10 +1968,6 @@ add_a_rule()
|
|||||||
{
|
{
|
||||||
local natrule=
|
local natrule=
|
||||||
|
|
||||||
rule_error() {
|
|
||||||
fatal_error "Only DNAT and REDIRECT rules may specify port mapping; rule \"$rule\""
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set source variables
|
# Set source variables
|
||||||
|
|
||||||
cli=
|
cli=
|
||||||
@ -2099,9 +2095,9 @@ add_a_rule()
|
|||||||
# A specific server or server port given
|
# A specific server or server port given
|
||||||
|
|
||||||
if [ -n "$natrule" ]; then
|
if [ -n "$natrule" ]; then
|
||||||
add_nat_rule
|
add_nat_rule
|
||||||
elif [ -n "$addr" -a "$addr" != "$serv" ] || [ -n "$servport" -a "$servport" != "$port" ]; then
|
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
|
fi
|
||||||
|
|
||||||
if [ -z "$dnat_only" -a $chain != ${FW}2${FW} ]; then
|
if [ -z "$dnat_only" -a $chain != ${FW}2${FW} ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user