Correct handling of +set[n]

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-01-26 07:53:41 -08:00
parent a2b8069ee3
commit 40104d0c86

View File

@ -5510,7 +5510,7 @@ sub get_set_flags( $$ ) {
my $rest = '';
if ( $setname =~ /^(.*)\[([1-6])(?:,(.*))\]$/ ) {
if ( $setname =~ /^(.*)\[([1-6])(?:,(.+))?\]$/ ) {
$setname = $1;
my $count = $2;
$rest = $3;
@ -5535,7 +5535,7 @@ sub get_set_flags( $$ ) {
}
}
if ( $rest ) {
if ( supplied $rest ) {
my @extensions = split_list($rest, 'ipset option');
for ( @extensions ) {