diff --git a/Shorewall/Perl/Shorewall/Proc.pm b/Shorewall/Perl/Shorewall/Proc.pm index facd1e916..edc0581f6 100644 --- a/Shorewall/Perl/Shorewall/Proc.pm +++ b/Shorewall/Perl/Shorewall/Proc.pm @@ -146,8 +146,9 @@ sub setup_martian_logging() { emit ( 'for file in /proc/sys/net/ipv4/conf/*; do', " [ -f \$file/log_martians ] && echo $val > \$file/log_martians", 'done', - '' , - 'echo 0 > /proc/sys/net/ipv4/conf/all/log_martians' ); + '' ); + + emit( 'echo 0 > /proc/sys/net/ipv4/conf/all/log_martians','' ) if $val == 1; } for my $interface ( @$interfaces ) { @@ -170,14 +171,12 @@ sub setup_martian_logging() { sub setup_source_routing( $ ) { my $family = shift; - save_progress_message 'Setting up Accept Source Routing...'; - my $interfaces = find_interfaces_by_option 'sourceroute'; if ( @$interfaces ) { progress_message2 "$doing Accept Source Routing..."; - save_progress_message 'Setting up Source Routing...'; + save_progress_message 'Setting up Accept Source Routing...'; for my $interface ( @$interfaces ) { my $file = "/proc/sys/net/ipv$family/conf/$interface/accept_source_route"; diff --git a/manpages/shorewall.conf.xml b/manpages/shorewall.conf.xml index ce9e5247d..5b02e9212 100644 --- a/manpages/shorewall.conf.xml +++ b/manpages/shorewall.conf.xml @@ -769,20 +769,18 @@ net all DROP infothen the chain name is 'net2all' If set to Yes or yes, sets - /proc/sys/net/ipv4/conf/all/log_martians and - /proc/sys/net/ipv4/conf/default/log_martians to 1. In Shorewall - versions prior to 4.1.5, the default is No which sets both of the above to zero. In - Shorewall 4.1.5, the default value was chaned to /proc/sys/net/ipv4/conf/*/log_martians to 1 + with the exception of + /proc/sys/net/ipv4/conf/all/log_martians which is set to + 0. The default value is Yes which sets both of the above to one. If you do not enable martian logging for all interfaces, you may still enable it for individual interfaces using the logmartians interface option in shorewall-interfaces(5). - The value Keep is only - allowed under Shorewall-perl. It causes Shorewall to ignore the - option. If the option is set to The value Keep causes + Shorewall to ignore the option. If the option is set to Yes, then martians are logged on all interfaces. If the option is set to No, then martian logging is disabled on all