mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 20:30:43 +01:00
Allow an empty parameter list in an action (e.g., "Action()")
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
44599530ea
commit
063e21e69f
@ -178,7 +178,8 @@ sub get_target_param( $ ) {
|
||||
my ( $target, $param ) = split '/', $_[0];
|
||||
|
||||
unless ( defined $param ) {
|
||||
( $target, $param ) = ( $1, $2 ) if $target =~ /^(.*?)[(](.*)[)]$/;
|
||||
$target =~ s/\(\)$//;
|
||||
( $target, $param ) = ( $1, $2 ) if $target =~ /^(.*?)[(](.+)[)]$/;
|
||||
}
|
||||
|
||||
( $target, $param );
|
||||
@ -332,7 +333,7 @@ sub process_a_policy() {
|
||||
if ( "\L$default" eq 'none' ) {
|
||||
$default = 'none';
|
||||
} elsif ( $actions{$def} ) {
|
||||
$default = supplied $param ? normalize_action( $def, 'none', $param ) : normalize_action_name $default;
|
||||
$default = supplied $param ? normalize_action( $def, 'none', $param ) : normalize_action_name $def;
|
||||
use_policy_action( $default );
|
||||
} else {
|
||||
fatal_error "Unknown Default Action ($default)";
|
||||
|
Loading…
Reference in New Issue
Block a user