mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-27 13:11:57 +02:00
Allow override of OPTIMIZE=1 wrt to rules that duplicate the policy
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4739 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
89416e731e
commit
ff5bf57261
@ -2249,6 +2249,9 @@ process_rule() # $1 = target
|
|||||||
process_userspec
|
process_userspec
|
||||||
|
|
||||||
case $target in
|
case $target in
|
||||||
|
*!)
|
||||||
|
target=${target%!}
|
||||||
|
;;
|
||||||
ACCEPT+|NONAT)
|
ACCEPT+|NONAT)
|
||||||
[ $SECTION = NEW ] || fatal_error "$target rules are not allowed in the $SECTION SECTION"
|
[ $SECTION = NEW ] || fatal_error "$target rules are not allowed in the $SECTION SECTION"
|
||||||
nonat=Yes
|
nonat=Yes
|
||||||
@ -2565,7 +2568,7 @@ process_macro() # $1 = target
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case ${mtarget%%:*} in
|
case ${mtarget%%:*} in
|
||||||
ACCEPT|ACCEPT+|NONAT|DROP|REJECT|DNAT|DNAT-|REDIRECT|REDIRECT-|LOG|CONTINUE|QUEUE|SAME|SAME-)
|
ACCEPT|ACCEPT!|ACCEPT+|NONAT|DROP|DROP!|REJECT|REJECT!|DNAT|DNAT-|REDIRECT|REDIRECT-|LOG|CONTINUE|QUEUE|SAME|SAME-)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if list_search ${mtarget%%:*} $ACTIONS; then
|
if list_search ${mtarget%%:*} $ACTIONS; then
|
||||||
@ -2743,7 +2746,7 @@ process_rules()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "${xtarget%%:*}" in
|
case "${xtarget%%:*}" in
|
||||||
ACCEPT|ACCEPT+|NONAT|DROP|REJECT|DNAT|DNAT-|REDIRECT|REDIRECT-|LOG|CONTINUE|QUEUE|SAME|SAME-)
|
ACCEPT|ACCEPT+|ACCEPT!|NONAT|DROP|DROP!|REJECT|REJECT!|DNAT|DNAT-|REDIRECT|REDIRECT-|LOG|CONTINUE|QUEUE|SAME|SAME-)
|
||||||
do_it No
|
do_it No
|
||||||
;;
|
;;
|
||||||
COMMENT)
|
COMMENT)
|
||||||
|
@ -134,6 +134,14 @@ Other Changes in 3.3.4.
|
|||||||
|
|
||||||
gateway:~
|
gateway:~
|
||||||
|
|
||||||
|
If you really want a rule that duplicates the policy, follow the
|
||||||
|
action with "!":
|
||||||
|
|
||||||
|
#ACTION SOURCE DEST PROTO DEST
|
||||||
|
# PORT(S)
|
||||||
|
...
|
||||||
|
ACCEPT! all all icmp 8
|
||||||
|
|
||||||
Migration Considerations:
|
Migration Considerations:
|
||||||
|
|
||||||
1) Shorewall supports the notion of "default actions". A default
|
1) Shorewall supports the notion of "default actions". A default
|
||||||
|
Loading…
x
Reference in New Issue
Block a user