forked from extern/shorewall_code
Update modules to use passed() for parameter testing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
eb9dd3e485
commit
65ce6ed226
@ -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 $@;
|
||||
|
@ -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
|
||||
#
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
#
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
DEFAULTS -
|
||||
|
||||
?if @1 ne '' && @1 ne '-'
|
||||
?if passed(@1)
|
||||
?if @1 eq 'audit'
|
||||
?set tcpflags_action 'A_DROP'
|
||||
?else
|
||||
|
Loading…
Reference in New Issue
Block a user