diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 7e218ea51..99db425d8 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1479,10 +1479,12 @@ sub split_list1( $$ ) { fatal_error "Invalid $type list ($list)" if $count > 1; push @list2 , $_; } else { + s/\(//; $element = $_; } } elsif ( ( $count = tr/)/)/ ) > 0 ) { fatal_error "Invalid $type list ($list)" unless $element && $count == 1; + s/\)//; push @list2, join ',', $element, $_; $element = ''; } elsif ( $element ) { diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index c561a27d3..2fe4c983c 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -929,10 +929,6 @@ sub process_interface( $$ ) { } elsif ( $type == IPLIST_IF_OPTION ) { fatal_error "The '$option' option requires a value" unless defined $value; # - # Remove parentheses from address list if present - # - $value =~ s/\)$// if $value =~ s/^\(//; - # # Add all IP to the front of a list if the list begins with '!' # $value = join ',' , ALLIP , $value if $value =~ /^!/; @@ -965,7 +961,7 @@ sub process_interface( $$ ) { fatal_error "The '$option' option requires a value" unless defined $value; if ( $option eq 'physical' ) { - fatal_error "Invalid Physical interface name ($value)" unless $value && $value =~ /^[\w.@%-]*\+?$/; + fatal_error "Invalid Physical interface name ($value)" unless $value && $value !~ /%/; fatal_error "Duplicate physical interface name ($value)" if ( $physical{$value} && ! $port );