mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-29 02:54:18 +01:00
Duplicate new checks in start/restart path
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@141 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
646a259f2e
commit
44e0821f66
@ -1692,10 +1692,16 @@ add_a_rule()
|
|||||||
case "$logtarget" in
|
case "$logtarget" in
|
||||||
REJECT)
|
REJECT)
|
||||||
target=reject
|
target=reject
|
||||||
|
[ -n "$servport" ] && \
|
||||||
|
fatal_error "Error: server port may not be specified in a REJECT rule;"\
|
||||||
|
"rule: \"$rule\""
|
||||||
;;
|
;;
|
||||||
REDIRECT)
|
REDIRECT)
|
||||||
[ -n "$serv" ] && startup_error "Error: REDIRECT rules cannot"\
|
[ -n "$serv" ] && startup_error "Error: REDIRECT rules cannot"\
|
||||||
" specify a server IP; rule: \"$rule\""
|
" specify a server IP; rule: \"$rule\""
|
||||||
|
[ -n "$servport" ] && \
|
||||||
|
startup_error "Error: server port may not be specified in an ACCEPT rule;" \
|
||||||
|
"rule: \"$rule\""
|
||||||
servport=${servport:=$port}
|
servport=${servport:=$port}
|
||||||
;;
|
;;
|
||||||
DNAT)
|
DNAT)
|
||||||
@ -1804,6 +1810,8 @@ process_rule() {
|
|||||||
else
|
else
|
||||||
clientzone="${clients%:*}"
|
clientzone="${clients%:*}"
|
||||||
clients="${clients#*:}"
|
clients="${clients#*:}"
|
||||||
|
[ -z "$clientzone" -o -z "$clients" ] && \
|
||||||
|
fatal_error "Error: Empty source zone or qualifier: rule \"$rule\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$clientzone" = "${clientzone%\!*}" ]; then
|
if [ "$clientzone" = "${clientzone%\!*}" ]; then
|
||||||
@ -1836,8 +1844,12 @@ process_rule() {
|
|||||||
if [ "$servers" != "${servers%:*}" ] ; then
|
if [ "$servers" != "${servers%:*}" ] ; then
|
||||||
serverport="${servers#*:}"
|
serverport="${servers#*:}"
|
||||||
servers="${servers%:*}"
|
servers="${servers%:*}"
|
||||||
|
[ -z "$serverzone" -o -z "$serverport" ] && \
|
||||||
|
fatal_error "Error: Empty destination zone or server port: rule \"$rule\""
|
||||||
else
|
else
|
||||||
serverport=
|
serverport=
|
||||||
|
[ -z "$serverzone" -o -z "$servers" ] && \
|
||||||
|
startup_error "Error: Empty destination zone or qualifier: rule \"$rule\""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user