mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 14:20:40 +01:00
Allow zero-valued options on multi-zoned interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
73c8b563a1
commit
88f9a3e255
@ -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