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:
teastep 2007-07-26 16:57:47 +00:00
parent 984cee781d
commit a7786b5a2f
2 changed files with 7 additions and 7 deletions

View File

@ -1856,23 +1856,23 @@ sub emit_comment() {
sub set_global_variables() {
for ( values %interfaceaddr ) {
emit_comment;
emit_comment unless $emitted_comment;
emit $_;
}
for ( values %interfaceaddrs ) {
emit_comment;
emit_comment unless $emitted_comment;
emit $_;
}
for ( values %interfacenets ) {
emit_comment;
emit_comment unless $emitted_comment;
emit $_;
}
unless ( $capabilities{ADDRTYPE} ) {
emit_comment;
emit 'ALL_BCASTS="255.255.255.255 $(get_all_bcasts)"';
emit_comment unless $emitted_comment;
emit 'ALL_BCASTS="$(get_all_bcasts) 255.255.255.255"';
for ( values %interfacebcasts ) {
emit $_;

View File

@ -534,8 +534,8 @@ sub add_common_rules() {
} else {
add_command $chainref, 'for address in $ALL_BCASTS; do';
push_cmd_mode $chainref;
log_rule( $config{SMURF_LOG_LEVEL} , $chainref, 'DROP', '-d $address ' );
add_rule $chainref, '-d $address -j DROP';
log_rule( $config{SMURF_LOG_LEVEL} , $chainref, 'DROP', '-s $address ' );
add_rule $chainref, '-s $address -j DROP';
pop_cmd_mode $chainref;
add_command $chainref, 'done';
}