Correct tcrules update

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-08-13 13:21:51 -07:00
parent af2b7910bd
commit f5c6a6fe82

View File

@ -3252,7 +3252,10 @@ sub setup_tc( $ ) {
close $mangle, directive_callback( 0 ) if $tcrules;
} elsif ( $tcrules && -f ( my $fn = find_file( 'tcrules' ) ) ) {
} elsif ( $tcrules ) {
close $mangle, directive_callback( 0 ) if $tcrules;
if ( -f ( my $fn = find_file( 'tcrules' ) ) ) {
if ( unlink $fn ) {
warning_message "Empty tcrules file ($fn) removed";
} else {
@ -3260,6 +3263,7 @@ sub setup_tc( $ ) {
}
}
}
}
if ( my $fn = open_file( 'mangle', 1, 1 ) ) {