mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-26 17:43:15 +01:00
Allow zero-valued options on multi-zoned interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d949824f94
commit
4c4c5a436a
@ -1208,18 +1208,20 @@ sub process_interface( $$ ) {
|
||||
|
||||
fatal_error "Invalid Interface option ($option)" unless my $type = $validinterfaceoptions{$option};
|
||||
|
||||
if ( $zone ) {
|
||||
fatal_error qq(The "$option" option may not be specified for a Vserver zone") if $zoneref->{type} & VSERVER && ! ( $type & IF_OPTION_VSERVER );
|
||||
} else {
|
||||
fatal_error "The \"$option\" option may not be specified on a multi-zone interface" if $type & IF_OPTION_ZONEONLY;
|
||||
}
|
||||
|
||||
my $hostopt = $type & IF_OPTION_HOST;
|
||||
|
||||
fatal_error "The \"$option\" option is not allowed on a bridge port" if $port && ! $hostopt;
|
||||
|
||||
$type &= MASK_IF_OPTION;
|
||||
|
||||
unless ( $type == BINARY_IF_OPTION && defined $value && $value eq '0' ) {
|
||||
if ( $zone ) {
|
||||
fatal_error qq(The "$option" option may not be specified for a Vserver zone") if $zoneref->{type} & VSERVER && ! ( $type & IF_OPTION_VSERVER );
|
||||
} else {
|
||||
fatal_error "The \"$option\" option may not be specified on a multi-zone interface" if $type & IF_OPTION_ZONEONLY;
|
||||
}
|
||||
}
|
||||
|
||||
fatal_error "The \"$option\" option is not allowed on a bridge port" if $port && ! $hostopt;
|
||||
|
||||
if ( $type == SIMPLE_IF_OPTION ) {
|
||||
fatal_error "Option $option does not take a value" if defined $value;
|
||||
if ( $option eq 'blacklist' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user