From 94086440b88851ddd5a1bd33176dfff464912f16 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 5 May 2007 14:42:30 +0000 Subject: [PATCH] Suppress creation of jumps to unused TOS chains git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6249 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Rules.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 0e25eb896..e7bbba973 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -82,8 +82,8 @@ sub process_tos() { if ( $first_entry ) { progress_message2 "$doing $fn..."; - mark_referenced( $pretosref = ensure_chain 'mangle' , $chain ); - mark_referenced( $outtosref = ensure_chain 'mangle' , 'outtos' ); + $pretosref = ensure_chain 'mangle' , $chain; + $outtosref = ensure_chain 'mangle' , 'outtos'; $first_entry = 0; } @@ -126,8 +126,8 @@ sub process_tos() { } unless ( $first_entry ) { - add_rule $mangle_table->{$stdchain}, "-j $chain"; - add_rule $mangle_table->{OUTPUT}, "-j outtos"; + add_rule $mangle_table->{$stdchain}, "-j $chain" if $pretosref->{referenced}; + add_rule $mangle_table->{OUTPUT}, "-j outtos" if $outtosref->{referenced}; } } }