mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 09:47:51 +02:00
Different way to catch empty parameter lists
This commit is contained in:
parent
014d0eb607
commit
e3c16b8233
@ -135,7 +135,7 @@ 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, $param ) = ( $1, $2 ) if $target =~ /^(.*?)[(](.*)[)]$/;
|
||||||
}
|
}
|
||||||
|
|
||||||
( $target, $param );
|
( $target, $param );
|
||||||
@ -1006,6 +1006,11 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action = $basictarget; # Remove params, if any, from $action.
|
$action = $basictarget; # Remove params, if any, from $action.
|
||||||
|
} else {
|
||||||
|
#
|
||||||
|
# Catch empty parameter list
|
||||||
|
#
|
||||||
|
fatal_error "The $basictarget TARGET does not accept parameters" if $action =~ s/\(\)$//;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $inaction ) {
|
if ( $inaction ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user