mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-22 23:53:30 +01:00
Remove embedded Perl from allowInvalid and dropInvalid
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
9ab2310dc8
commit
9f26c010ac
@ -28,25 +28,12 @@
|
||||
|
||||
DEFAULTS -
|
||||
|
||||
?begin perl;
|
||||
|
||||
use strict;
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
use Shorewall::Chains;
|
||||
use Shorewall::Rules;
|
||||
|
||||
my $action = 'ACCEPT';
|
||||
|
||||
my ( $audit ) = get_action_params( 1 );
|
||||
|
||||
if ( supplied $audit ) {
|
||||
fatal_error "Invalid parameter ($audit) to action allowInvalid" if $audit ne 'audit';
|
||||
$action = "A_ACCEPT";
|
||||
}
|
||||
|
||||
perl_action_helper( "Invalid($action)", '' );
|
||||
|
||||
1;
|
||||
|
||||
?end perl;
|
||||
?if passed(@1)
|
||||
?if @1 eq 'audit'
|
||||
Invalid(A_ACCEPT)
|
||||
?else
|
||||
?error The first parameter to allowInvalid must be 'audit' or '-'
|
||||
?endif
|
||||
?else
|
||||
Invalid(ACCEPT)
|
||||
?endif
|
||||
|
@ -28,25 +28,14 @@
|
||||
|
||||
DEFAULTS -
|
||||
|
||||
?begin perl;
|
||||
DEFAULTS -
|
||||
|
||||
use strict;
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
use Shorewall::Chains;
|
||||
use Shorewall::Rules;
|
||||
|
||||
my $action = 'DROP';
|
||||
|
||||
my ( $audit ) = get_action_params( 1 );
|
||||
|
||||
if ( supplied $audit ) {
|
||||
fatal_error "Invalid parameter ($audit) to action dropInvalid" if $audit ne 'audit';
|
||||
$action = "A_DROP";
|
||||
}
|
||||
|
||||
perl_action_helper( "Invalid($action)", '' );
|
||||
|
||||
1;
|
||||
|
||||
?end perl;
|
||||
?if passed(@1)
|
||||
?if @1 eq 'audit'
|
||||
Invalid(A_DROP)
|
||||
?else
|
||||
?error The first parameter to dropInvalid must be 'audit' or '-'
|
||||
?endif
|
||||
?else
|
||||
Invalid(DROP)
|
||||
?endif
|
||||
|
Loading…
Reference in New Issue
Block a user