split_list1 removes ()

This commit is contained in:
Tom Eastep 2010-08-28 13:37:19 -07:00
parent c2558af9c8
commit 2a54e8cd24
2 changed files with 3 additions and 5 deletions

View File

@ -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 ) {

View File

@ -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 );