mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-22 07:33:43 +01:00
Pass the state name to perl_action_helper() from the state actions.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b9e504683e
commit
b3caaaf707
@ -41,7 +41,7 @@ use Shorewall::Rules;
|
||||
my ( $action ) = get_action_params( 1 );
|
||||
|
||||
if ( my $check = check_state( 'ESTABLISHED' ) ) {
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} ESTABLISHED" : '', 1 );
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} ESTABLISHED" : '', 'ESTABLISHED' );
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -46,7 +46,7 @@ if ( supplied $audit ) {
|
||||
}
|
||||
|
||||
if ( my $check = check_state( 'INVALID' ) ) {
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} INVALID" : '' , 1 );
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} INVALID" : '' , 'INVALID' );
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -41,7 +41,7 @@ use Shorewall::Rules;
|
||||
my ( $action ) = get_action_params( 1 );
|
||||
|
||||
if ( my $check = check_state( 'NEW' ) ) {
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} NEW" : '' );
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} NEW" : '' , 'NEW' );
|
||||
}
|
||||
|
||||
allow_optimize( get_action_chain );
|
||||
|
@ -42,7 +42,7 @@ use Shorewall::Rules;
|
||||
my ( $action ) = get_action_params( 1 );
|
||||
|
||||
if ( my $check = check_state( 'RELATED' ) ) {
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} RELATED" : '', 1 );
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} RELATED" : '', 'RELATED' );
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -41,7 +41,7 @@ use Shorewall::Rules;
|
||||
my ( $action ) = get_action_params( 1 );
|
||||
|
||||
if ( my $check = check_state( 'UNTRACKED' ) ) {
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} UNTRACKED" : '' , 1 );
|
||||
perl_action_helper( $action, $check == 1 ? "$globals{STATEMATCH} UNTRACKED" : '' , 'UNTRACKED' );
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user