From 9b886a99af9e0c232bc00b01225b7f2023bc0476 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 31 Aug 2015 11:19:42 -0700 Subject: [PATCH] Fix $convert/$tcrules mess Signed-off-by: Tom Eastep Conflicts: Shorewall/Perl/Shorewall/Tc.pm --- Shorewall/Perl/Shorewall/Tc.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index 4586b9dc9..2535a111f 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -135,7 +135,7 @@ our %restrictions = ( tcpre => PREROUTE_RESTRICT , our $family; -our $tcrules; +our $convert; our $mangle; @@ -3246,7 +3246,7 @@ EOF # Process the mangle file and setup traffic shaping # sub setup_tc( $ ) { - $tcrules = $_[0]; + $convert = $_[0]; if ( $config{MANGLE_ENABLED} ) { ensure_mangle_chain 'tcpre'; @@ -3296,7 +3296,7 @@ sub setup_tc( $ ) { if ( $config{MANGLE_ENABLED} ) { - if ( $tcrules ) { + if ( $convert ) { my $have_tcrules; my $fn; @@ -3331,9 +3331,9 @@ sub setup_tc( $ ) { convert_tos( $mangle, $fn1 ); - close $mangle, directive_callback( 0 ) if $tcrules; + close $mangle, directive_callback( 0 ); - } elsif ( $tcrules ) { + } elsif ( $convert ) { if ( -f ( my $fn = find_file( 'tcrules' ) ) ) { if ( unlink $fn ) { warning_message "Empty tcrules file ($fn) removed";