mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +01:00
Remove redundant test
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6086 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
716d370e9b
commit
1fa2cb7904
@ -496,19 +496,15 @@ sub add_common_rules() {
|
|||||||
|
|
||||||
$list = find_hosts_by_option 'nosmurfs';
|
$list = find_hosts_by_option 'nosmurfs';
|
||||||
|
|
||||||
if ( $capabilities{ADDRTYPE} ) {
|
$chainref = new_standard_chain 'smurfs';
|
||||||
$chainref = new_standard_chain 'smurfs';
|
|
||||||
|
|
||||||
add_rule $chainref , '-s 0.0.0.0 -j RETURN';
|
add_rule $chainref , '-s 0.0.0.0 -j RETURN';
|
||||||
|
|
||||||
add_rule_pair $chainref, '-m addrtype --src-type BROADCAST ', 'DROP', $config{SMURF_LOG_LEVEL} ;
|
add_rule_pair $chainref, '-m addrtype --src-type BROADCAST ', 'DROP', $config{SMURF_LOG_LEVEL} ;
|
||||||
add_rule_pair $chainref, '-m addrtype --src-type MULTICAST ', 'DROP', $config{SMURF_LOG_LEVEL} ;
|
add_rule_pair $chainref, '-m addrtype --src-type MULTICAST ', 'DROP', $config{SMURF_LOG_LEVEL} ;
|
||||||
|
|
||||||
add_rule $rejectref , '-m addrtype --src-type BROADCAST -j DROP';
|
add_rule $rejectref , '-m addrtype --src-type BROADCAST -j DROP';
|
||||||
add_rule $rejectref , '-m addrtype --src-type MULTICAST -j DROP';
|
add_rule $rejectref , '-m addrtype --src-type MULTICAST -j DROP';
|
||||||
} elsif ( @$list ) {
|
|
||||||
fatal_error "The nosmurfs option requires Address Type Match in your kernel and iptables";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( @$list ) {
|
if ( @$list ) {
|
||||||
progress_message2 'Adding Anti-smurf Rules';
|
progress_message2 'Adding Anti-smurf Rules';
|
||||||
|
Loading…
Reference in New Issue
Block a user