mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 11:20:53 +01:00
split_list1 removes ()
This commit is contained in:
parent
c2558af9c8
commit
2a54e8cd24
@ -1479,10 +1479,12 @@ sub split_list1( $$ ) {
|
|||||||
fatal_error "Invalid $type list ($list)" if $count > 1;
|
fatal_error "Invalid $type list ($list)" if $count > 1;
|
||||||
push @list2 , $_;
|
push @list2 , $_;
|
||||||
} else {
|
} else {
|
||||||
|
s/\(//;
|
||||||
$element = $_;
|
$element = $_;
|
||||||
}
|
}
|
||||||
} elsif ( ( $count = tr/)/)/ ) > 0 ) {
|
} elsif ( ( $count = tr/)/)/ ) > 0 ) {
|
||||||
fatal_error "Invalid $type list ($list)" unless $element && $count == 1;
|
fatal_error "Invalid $type list ($list)" unless $element && $count == 1;
|
||||||
|
s/\)//;
|
||||||
push @list2, join ',', $element, $_;
|
push @list2, join ',', $element, $_;
|
||||||
$element = '';
|
$element = '';
|
||||||
} elsif ( $element ) {
|
} elsif ( $element ) {
|
||||||
|
@ -929,10 +929,6 @@ sub process_interface( $$ ) {
|
|||||||
} elsif ( $type == IPLIST_IF_OPTION ) {
|
} elsif ( $type == IPLIST_IF_OPTION ) {
|
||||||
fatal_error "The '$option' option requires a value" unless defined $value;
|
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 '!'
|
# Add all IP to the front of a list if the list begins with '!'
|
||||||
#
|
#
|
||||||
$value = join ',' , ALLIP , $value if $value =~ /^!/;
|
$value = join ',' , ALLIP , $value if $value =~ /^!/;
|
||||||
@ -965,7 +961,7 @@ sub process_interface( $$ ) {
|
|||||||
fatal_error "The '$option' option requires a value" unless defined $value;
|
fatal_error "The '$option' option requires a value" unless defined $value;
|
||||||
|
|
||||||
if ( $option eq 'physical' ) {
|
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 );
|
fatal_error "Duplicate physical interface name ($value)" if ( $physical{$value} && ! $port );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user