mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 19:30:44 +01:00
Don't generate bogus logging rule if no MACLIST_LOG_LEVEL
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6105 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
7fe76f778c
commit
ef12a3c681
@ -746,7 +746,7 @@ sub setup_mac_lists( $ ) {
|
||||
my $chainref = $chain_table{$table}{( $config{MACLIST_TTL} ? macrecent_target $interface : mac_chain $interface )};
|
||||
my $chain = $chainref->{name};
|
||||
|
||||
if ( $config{MACLIST_LOG_LEVEL} || $config{MACLIST_DISPOSITION} ne 'ACCEPT' ) {
|
||||
if ( $config{MACLIST_LOG_LEVEL} ne '' || $config{MACLIST_DISPOSITION} ne 'ACCEPT' ) {
|
||||
my $variable = get_interface_addresses $interface;
|
||||
add_command $chainref, "for address in $variable; do";
|
||||
add_command $chainref, " echo \"-A $chainref->{name} -s \$address -m addrtype --dst-type BROADCAST -j RETURN\" >&3";
|
||||
@ -756,7 +756,7 @@ sub setup_mac_lists( $ ) {
|
||||
|
||||
add_file $chainref, 'maclog';
|
||||
|
||||
log_rule_limit $level, $chainref , $chain , $disposition, '', '', 'add', '';
|
||||
log_rule_limit $level, $chainref , $chain , $disposition, '', '', 'add', '' if $config{MACLIST_LOG_LEVEL} ne '';
|
||||
add_rule $chainref, "-j $target";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user