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
This commit is contained in:
teastep 2007-05-05 14:42:30 +00:00
parent 0980d11157
commit 94086440b8

View File

@ -82,8 +82,8 @@ sub process_tos() {
if ( $first_entry ) { if ( $first_entry ) {
progress_message2 "$doing $fn..."; progress_message2 "$doing $fn...";
mark_referenced( $pretosref = ensure_chain 'mangle' , $chain ); $pretosref = ensure_chain 'mangle' , $chain;
mark_referenced( $outtosref = ensure_chain 'mangle' , 'outtos' ); $outtosref = ensure_chain 'mangle' , 'outtos';
$first_entry = 0; $first_entry = 0;
} }
@ -126,8 +126,8 @@ sub process_tos() {
} }
unless ( $first_entry ) { unless ( $first_entry ) {
add_rule $mangle_table->{$stdchain}, "-j $chain"; add_rule $mangle_table->{$stdchain}, "-j $chain" if $pretosref->{referenced};
add_rule $mangle_table->{OUTPUT}, "-j outtos"; add_rule $mangle_table->{OUTPUT}, "-j outtos" if $outtosref->{referenced};
} }
} }
} }