From 40104d0c8691067355e36272a1619f133d2d5aaf Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 26 Jan 2015 07:53:41 -0800 Subject: [PATCH] Correct handling of +set[n] Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 8e7604c79..627eada69 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -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 ) {