From 30b1cf71537e1066a8b118edb708e4b0a76bad32 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 25 Oct 2006 15:13:49 +0000 Subject: [PATCH] Change COMBINE_JUMPS to OPTIMIZE and make its value numeric git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4731 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/changelog.txt | 2 ++ Shorewall/compiler | 2 +- Shorewall/lib.config | 10 ++++++++-- Shorewall/releasenotes.txt | 2 +- Shorewall/shorewall.conf | 6 +++--- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index a7d851c22..2ec799abb 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -8,6 +8,8 @@ Changes in 3.3.4 4) Add an output chain for each interface. +5) Rename COMBINE_JUMPS to OPTIMIZE and make its value numeric. + Changes in 3.3.3 1) Fix excluding in SUBNET column. diff --git a/Shorewall/compiler b/Shorewall/compiler index ba266257b..3e8a662ed 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -4279,7 +4279,7 @@ activate_rules() temp_zones= last_chain= - if [ -n "$COMBINE_JUMPS" ]; then + if [ $OPTIMIZE -gt 0 ]; then dest_zones= # diff --git a/Shorewall/lib.config b/Shorewall/lib.config index d616fa838..a8e7f68b7 100644 --- a/Shorewall/lib.config +++ b/Shorewall/lib.config @@ -1794,7 +1794,7 @@ do_initialize() { REJECT_DEFAULT= ACCEPT_DEFAULT= QUEUE_DEFAULT= - COMBINE_JUMPS= + OPTIMIZE= LOGLIMIT= LOGPARMS= @@ -2008,7 +2008,6 @@ do_initialize() { HIGH_ROUTE_MARKS=$(added_param_value_no HIGH_ROUTE_MARKS $HIGH_ROUTE_MARKS) TC_EXPERT=$(added_param_value_no TC_EXPERT $TC_EXPERT) USE_ACTIONS=$(added_param_value_yes USE_ACTIONS $USE_ACTIONS) - COMBINE_JUMPS=$(added_param_value_no COMBINE_JUMPS $COMBINE_JUMPS) [ -n "$USE_ACTIONS" ] && lib_load actions "USE_ACTIONS=Yes" [ -n "$XCONNMARK_MATCH" ] || XCONNMARK= @@ -2085,6 +2084,13 @@ do_initialize() { ;; esac + case "${OPTIMIZE:=0}" in + 0|1) + ;; + *) + fatal_error "Invalid OPTIMIZE value ($OPTIMIZE)" + ;; + esac # # Strip the files that we use often # diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index c74d85404..06ae93453 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -343,7 +343,7 @@ New Features: 0 0 wifi2all all -- * tun+ 0.0.0.0/0 0.0.0.0/0 policy match dir out pol none gateway:~ # - This redundancy may be eliminated by setting COMBINE_JUMPS=Yes in shorewall.conf. + This redundancy may be eliminated by setting OPTIMIZE=1 in shorewall.conf. gateway:~ # shorewall-lite show eth2_fwd Shorewall Lite 3.3.3 Chains eth2_fwd at gateway - Thu Oct 19 09:15:24 PDT 2006 diff --git a/Shorewall/shorewall.conf b/Shorewall/shorewall.conf index 20f280b12..e79d550bc 100644 --- a/Shorewall/shorewall.conf +++ b/Shorewall/shorewall.conf @@ -951,7 +951,7 @@ HIGH_ROUTE_MARKS=No USE_ACTIONS=Yes # -# Combine Jumps +# Optimize Ruleset # # Traditionally, Shorewall has created rules for the complete matrix of # Networks defined by the zones, interfaces and hosts files. Any traffic that @@ -959,10 +959,10 @@ USE_ACTIONS=Yes # built-in changes. When the matrix is sparse, this results in lots of # largely useless rules. # -# These extra rules can be eliminated by setting COMBINE_JUMPS=Yes +# These extra rules can be eliminated by setting OPTIMIZE=1 # -COMBINE_JUMPS=No +OPTIMIZE=0 ############################################################################### # P A C K E T D I S P O S I T I O N