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 - DEFAULTS -
?begin perl; ?if passed(@1)
?if @1 eq 'audit'
use strict; Invalid(A_ACCEPT)
use Shorewall::IPAddrs; ?else
use Shorewall::Config; ?error The first parameter to allowInvalid must be 'audit' or '-'
use Shorewall::Chains; ?endif
use Shorewall::Rules; ?else
Invalid(ACCEPT)
my $action = 'ACCEPT'; ?endif
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;

View File

@ -28,25 +28,14 @@
DEFAULTS - DEFAULTS -
?begin perl; DEFAULTS -
use strict; ?if passed(@1)
use Shorewall::IPAddrs; ?if @1 eq 'audit'
use Shorewall::Config; Invalid(A_DROP)
use Shorewall::Chains; ?else
use Shorewall::Rules; ?error The first parameter to dropInvalid must be 'audit' or '-'
?endif
my $action = 'DROP'; ?else
Invalid(DROP)
my ( $audit ) = get_action_params( 1 ); ?endif
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;