mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-30 19:43:45 +01:00
Fix smurf problem
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6967 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
984cee781d
commit
a7786b5a2f
@ -1856,23 +1856,23 @@ sub emit_comment() {
|
|||||||
sub set_global_variables() {
|
sub set_global_variables() {
|
||||||
|
|
||||||
for ( values %interfaceaddr ) {
|
for ( values %interfaceaddr ) {
|
||||||
emit_comment;
|
emit_comment unless $emitted_comment;
|
||||||
emit $_;
|
emit $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( values %interfaceaddrs ) {
|
for ( values %interfaceaddrs ) {
|
||||||
emit_comment;
|
emit_comment unless $emitted_comment;
|
||||||
emit $_;
|
emit $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( values %interfacenets ) {
|
for ( values %interfacenets ) {
|
||||||
emit_comment;
|
emit_comment unless $emitted_comment;
|
||||||
emit $_;
|
emit $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
unless ( $capabilities{ADDRTYPE} ) {
|
unless ( $capabilities{ADDRTYPE} ) {
|
||||||
emit_comment;
|
emit_comment unless $emitted_comment;
|
||||||
emit 'ALL_BCASTS="255.255.255.255 $(get_all_bcasts)"';
|
emit 'ALL_BCASTS="$(get_all_bcasts) 255.255.255.255"';
|
||||||
|
|
||||||
for ( values %interfacebcasts ) {
|
for ( values %interfacebcasts ) {
|
||||||
emit $_;
|
emit $_;
|
||||||
|
@ -534,8 +534,8 @@ sub add_common_rules() {
|
|||||||
} else {
|
} else {
|
||||||
add_command $chainref, 'for address in $ALL_BCASTS; do';
|
add_command $chainref, 'for address in $ALL_BCASTS; do';
|
||||||
push_cmd_mode $chainref;
|
push_cmd_mode $chainref;
|
||||||
log_rule( $config{SMURF_LOG_LEVEL} , $chainref, 'DROP', '-d $address ' );
|
log_rule( $config{SMURF_LOG_LEVEL} , $chainref, 'DROP', '-s $address ' );
|
||||||
add_rule $chainref, '-d $address -j DROP';
|
add_rule $chainref, '-s $address -j DROP';
|
||||||
pop_cmd_mode $chainref;
|
pop_cmd_mode $chainref;
|
||||||
add_command $chainref, 'done';
|
add_command $chainref, 'done';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user