Correct convert_blacklist()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-08-13 13:22:14 -07:00
parent 4cc7a1b87d
commit ea2a35415e

View File

@ -254,16 +254,12 @@ sub convert_blacklist() {
my $zones1 = find_zones_by_option 'blacklist', 'out'; my $zones1 = find_zones_by_option 'blacklist', 'out';
my ( $level, $disposition ) = @config{'BLACKLIST_LOG_LEVEL', 'BLACKLIST_DISPOSITION' }; my ( $level, $disposition ) = @config{'BLACKLIST_LOG_LEVEL', 'BLACKLIST_DISPOSITION' };
my $audit = $disposition =~ /^A_/; my $audit = $disposition =~ /^A_/;
my $target = $disposition eq 'REJECT' ? 'reject' : $disposition; my $target = $disposition;
my $orig_target = $target; my $orig_target = $target;
my @rules; my @rules;
if ( @$zones || @$zones1 ) { if ( @$zones || @$zones1 ) {
if ( supplied $level ) { $target = "$target:$level" if supplied $level;
$target = 'blacklog';
} elsif ( $audit ) {
$target = verify_audit( $disposition );
}
my $fn = open_file( 'blacklist' ); my $fn = open_file( 'blacklist' );
@ -313,8 +309,6 @@ sub convert_blacklist() {
} else { } else {
warning_message "Duplicate 'audit' option ignored" if $auditone > 1; warning_message "Duplicate 'audit' option ignored" if $auditone > 1;
} }
$tgt = verify_audit( 'A_' . $target, $orig_target, $target );
} }
for ( @options ) { for ( @options ) {