diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 19ebf1cbe..81acaec13 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2596,7 +2596,8 @@ sub evaluate_expression( $$$$ ) { $val = eval qq(package Shorewall::User; use strict; use Shorewall::Config \(qw/supplied/\); - # line $linenumber "$filename"\n$expression); + # line $linenumber "$filename" + $expression); unless ( $val ) { directive_error( "Couldn't parse expression ($expression): $@" , $filename, $linenumber ) if $@; diff --git a/Shorewall/action.Drop b/Shorewall/action.Drop index 8894c12c1..c7972eccb 100644 --- a/Shorewall/action.Drop +++ b/Shorewall/action.Drop @@ -29,7 +29,7 @@ # ############################################################################### -?if @1 ne '' && @1 ne '-' +?if passed(@1) ?if @1 eq 'audit' DEFAULTS -,-,A_DROP,A_ACCEPT,A_DROP ?else @@ -47,7 +47,7 @@ COUNT # # Special Handling for Auth # -?if @2 ne '-' +?if passed(@2) Auth(@2) ?endif # diff --git a/Shorewall/action.GlusterFS b/Shorewall/action.GlusterFS index bfb2c87b0..ffa3bf11c 100644 --- a/Shorewall/action.GlusterFS +++ b/Shorewall/action.GlusterFS @@ -12,9 +12,9 @@ DEFAULTS 2,0 ?if @1 !~ /^\d+/ || ! @1 || @1 > 1024 -?error Invalid value for Bricks (@1) + ?error Invalid value for Bricks (@1) ?elsif @2 !~ /^[01]$/ -?error Invalid value for IB (@2) + ?error Invalid value for IB (@2) ?endif #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS SWITCH HELPER diff --git a/Shorewall/action.Reject b/Shorewall/action.Reject index 4fedb10d2..3ce7c6218 100644 --- a/Shorewall/action.Reject +++ b/Shorewall/action.Reject @@ -28,7 +28,7 @@ # IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!! ############################################################################### -?if @1 ne '' && @1 ne '-' +?if passed(@1) ?if @1 eq 'audit' DEFAULTS -,-,A_REJECT,A_ACCEPT,A_DROP ?else @@ -46,7 +46,7 @@ COUNT # # Special handling for Auth # -?if @2 ne '-' +?if passed(@2) Auth(@2) ?endif # diff --git a/Shorewall/action.TCPFlags b/Shorewall/action.TCPFlags index 4cbdbdc17..6b9fb6283 100644 --- a/Shorewall/action.TCPFlags +++ b/Shorewall/action.TCPFlags @@ -12,7 +12,7 @@ DEFAULTS - -?if @1 ne '' && @1 ne '-' +?if passed(@1) ?if @1 eq 'audit' ?set tcpflags_action 'A_DROP' ?else