From 272bf85b1e80530379bc053ad1b11fa558ff979e Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 31 Mar 2007 16:58:14 +0000 Subject: [PATCH] Don't classify source address 0.0.0.0 as a smurf git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5771 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Common.pm | 2 +- New/Shorewall/Rules.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/New/Shorewall/Common.pm b/New/Shorewall/Common.pm index 5dabe909b..29fcb5b67 100644 --- a/New/Shorewall/Common.pm +++ b/New/Shorewall/Common.pm @@ -106,7 +106,7 @@ sub emit ( $ ) { # # 'compile' as opposed to 'check' # - my $line = $_[0]; # This copy is necessary :-(. We modify the value below and we can't modify subroutine arguments. + my $line = $_[0]; # This copy is necessary because the actual arguments are almost always read-only. unless ( $line =~ /^\s*$/ ) { $line =~ s/^\n// if $lastlineblank; diff --git a/New/Shorewall/Rules.pm b/New/Shorewall/Rules.pm index 600c59f05..9aac1666b 100644 --- a/New/Shorewall/Rules.pm +++ b/New/Shorewall/Rules.pm @@ -491,6 +491,8 @@ sub add_common_rules() { if ( $capabilities{ADDRTYPE} ) { $chainref = new_standard_chain 'smurfs'; + 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 MULTICAST ', 'DROP', $config{SMURF_LOG_LEVEL} ;