Remove embedded Perl from allowInvalid and dropInvalid

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-03-17 08:59:29 -07:00
parent 9ab2310dc8
commit 9f26c010ac
2 changed files with 19 additions and 43 deletions

View File

@ -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

View File

@ -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