mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 14:48:51 +01:00
Don't delete options that are to be ignored from %options
- specifying some options can have side-effects that cause $interfaceref->{options}{$option} to be accessed Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
38de9c1732
commit
229c47ac6c
@ -1412,9 +1412,9 @@ sub process_interface( $$ ) {
|
||||
|
||||
for my $option ( keys %options ) {
|
||||
if ( $root ) {
|
||||
warning_message( "The '$option' option is ignored when used with a wildcard physical name" ), delete $options{$option} if $physwild && $procinterfaceoptions{$option};
|
||||
warning_message( "The '$option' option is ignored when used with a wildcard physical name" ) if $physwild && $procinterfaceoptions{$option};
|
||||
} else {
|
||||
warning_message( "The '$option' option is ignored when used with interface name '+'" ), delete $options{$option} unless $validinterfaceoptions{$option} & IF_OPTION_WILDOK;
|
||||
warning_message( "The '$option' option is ignored when used with interface name '+'" ) unless $validinterfaceoptions{$option} & IF_OPTION_WILDOK;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1876,7 +1876,8 @@ sub find_interfaces_by_option( $;$ ) {
|
||||
for my $interface ( @interfaces ) {
|
||||
my $interfaceref = $interfaces{$interface};
|
||||
|
||||
next unless $interfaceref->{root};
|
||||
next unless $interfaceref->{root}; # Don't return '+' interface
|
||||
next if $procinterfaceoptions{$option} && $interfaceref->{physwild}; # Ignore /proc options on wildcard interface
|
||||
|
||||
my $optionsref = $interfaceref->{options};
|
||||
if ( $nonzero ) {
|
||||
|
Loading…
Reference in New Issue
Block a user