diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index b1b33b6fa..9fc4c682d 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -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 $_; diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 966e24670..36fb000be 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -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'; }