Fix LOG_MARTIANS=Yes

Signed-off-by: Tom Eastep <teastep@shorewall.net>

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9784 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2009-04-02 16:33:56 +00:00
parent 180925173b
commit 8a9af0acf5
3 changed files with 9 additions and 9 deletions

View File

@ -145,7 +145,9 @@ sub setup_martian_logging() {
emit ( 'for file in /proc/sys/net/ipv4/conf/*; do', emit ( 'for file in /proc/sys/net/ipv4/conf/*; do',
" [ -f \$file/log_martians ] && echo $val > \$file/log_martians", " [ -f \$file/log_martians ] && echo $val > \$file/log_martians",
'done' ); 'done',
'' ,
'echo 0 > /proc/sys/net/ipv4/conf/all/log_martians' );
} }
for my $interface ( @$interfaces ) { for my $interface ( @$interfaces ) {
@ -159,14 +161,6 @@ sub setup_martian_logging() {
" error_message \"WARNING: Cannot set Martian logging on $interface\"") unless interface_is_optional( $interface); " error_message \"WARNING: Cannot set Martian logging on $interface\"") unless interface_is_optional( $interface);
emit "fi\n"; emit "fi\n";
} }
if ( $config{LOG_MARTIANS} eq 'on' ) {
emit 'echo 1 > /proc/sys/net/ipv4/conf/all/log_martians';
emit 'echo 1 > /proc/sys/net/ipv4/conf/default/log_martians';
} elsif ( $config{LOG_MARTIANS} eq 'off' ) {
emit 'echo 0 > /proc/sys/net/ipv4/conf/all/log_martians';
emit 'echo 0 > /proc/sys/net/ipv4/conf/default/log_martians';
}
} }
} }

View File

@ -18,6 +18,8 @@ Changes in Shorewall 4.3.8
9) Allow 'compile' without a pathname. 9) Allow 'compile' without a pathname.
10) Fix LOG_MARTIANS=Yes.
Changes in Shorewall 4.3.7 Changes in Shorewall 4.3.7
1) Fix forward treatment of interface options. 1) Fix forward treatment of interface options.

View File

@ -55,6 +55,10 @@ released late in 2009.
2) The swping program was not purging the interface status files when 2) The swping program was not purging the interface status files when
it first started. it first started.
3) When LOG_MARTIANS=Yes with Shorewall-perl, setting logmartians=0 in
an entry in /etc/shorewall/interface failed to suppress martian
logging on the interface.
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
K N O W N P R O B L E M S R E M A I N I N G K N O W N P R O B L E M S R E M A I N I N G
---------------------------------------------------------------------------- ----------------------------------------------------------------------------