forked from extern/shorewall_code
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];
|
my ( $target, $param ) = split '/', $_[0];
|
||||||
|
|
||||||
unless ( defined $param ) {
|
unless ( defined $param ) {
|
||||||
( $target, $param ) = ( $1, $2 ) if $target =~ /^(.*?)[(](.*)[)]$/;
|
$target =~ s/\(\)$//;
|
||||||
|
( $target, $param ) = ( $1, $2 ) if $target =~ /^(.*?)[(](.+)[)]$/;
|
||||||
}
|
}
|
||||||
|
|
||||||
( $target, $param );
|
( $target, $param );
|
||||||
@ -332,7 +333,7 @@ sub process_a_policy() {
|
|||||||
if ( "\L$default" eq 'none' ) {
|
if ( "\L$default" eq 'none' ) {
|
||||||
$default = 'none';
|
$default = 'none';
|
||||||
} elsif ( $actions{$def} ) {
|
} 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 );
|
use_policy_action( $default );
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Unknown Default Action ($default)";
|
fatal_error "Unknown Default Action ($default)";
|
||||||
|
Loading…
Reference in New Issue
Block a user