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() { 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 $_;

View File

@ -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';
} }