forked from extern/shorewall_code
Correct physwild/wildcard usage
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
9e6aec7687
commit
2166251b97
@ -178,7 +178,8 @@ our %reservedName = ( all => 1,
|
|||||||
# number => <ordinal position in the interfaces file>
|
# number => <ordinal position in the interfaces file>
|
||||||
# physical => <physical interface name>
|
# physical => <physical interface name>
|
||||||
# base => <shell variable base representing this interface>
|
# base => <shell variable base representing this interface>
|
||||||
# wildcard => undef|1 # Wildcard Name
|
# wildcard => undef|1 # Wildcard Logical Name
|
||||||
|
# physwild => undef|1 # Wildcard Physical Name
|
||||||
# zones => { zone1 => 1, ... }
|
# zones => { zone1 => 1, ... }
|
||||||
# origin => <where defined>
|
# origin => <where defined>
|
||||||
# }
|
# }
|
||||||
@ -1491,7 +1492,7 @@ sub process_interface( $$ ) {
|
|||||||
|
|
||||||
if ( $options{bridge} ) {
|
if ( $options{bridge} ) {
|
||||||
require_capability( 'PHYSDEV_MATCH', 'The "bridge" option', 's');
|
require_capability( 'PHYSDEV_MATCH', 'The "bridge" option', 's');
|
||||||
fatal_error "Bridges may not have wildcard names" if $wildcard;
|
fatal_error "Bridges may not have wildcard names" if $physwild;
|
||||||
$hostoptions{routeback} = $options{routeback} = 1 unless supplied $options{routeback};
|
$hostoptions{routeback} = $options{routeback} = 1 unless supplied $options{routeback};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1540,7 +1541,7 @@ sub process_interface( $$ ) {
|
|||||||
zones => {},
|
zones => {},
|
||||||
origin => shortlineinfo( '' ),
|
origin => shortlineinfo( '' ),
|
||||||
wildcard => $wildcard,
|
wildcard => $wildcard,
|
||||||
physwild => $physwild, #Currently unused
|
physwild => $physwild,
|
||||||
};
|
};
|
||||||
|
|
||||||
$interfaces{$physical} = $interfaceref if $physical ne $interface;
|
$interfaces{$physical} = $interfaceref if $physical ne $interface;
|
||||||
@ -1721,6 +1722,7 @@ sub known_interface($)
|
|||||||
physical => $physical ,
|
physical => $physical ,
|
||||||
base => $interfaceref->{base} ,
|
base => $interfaceref->{base} ,
|
||||||
wildcard => $interfaceref->{wildcard} ,
|
wildcard => $interfaceref->{wildcard} ,
|
||||||
|
physwild => $interfaceref->{physwild} ,
|
||||||
zones => $interfaceref->{zones} ,
|
zones => $interfaceref->{zones} ,
|
||||||
};
|
};
|
||||||
return $interfaceref;
|
return $interfaceref;
|
||||||
@ -1941,7 +1943,7 @@ sub find_interfaces_by_option( $;$ ) {
|
|||||||
my $interfaceref = $interfaces{$interface};
|
my $interfaceref = $interfaces{$interface};
|
||||||
|
|
||||||
next unless $interfaceref->{root}; # Don't return '+' interface
|
next unless $interfaceref->{root}; # Don't return '+' interface
|
||||||
next if $procinterfaceoptions{$option} && $interfaceref->{wildcard}; # Ignore /proc options on wildcard interface
|
next if $procinterfaceoptions{$option} && $interfaceref->{physwild}; # Ignore /proc options on wildcard interface
|
||||||
|
|
||||||
my $optionsref = $interfaceref->{options};
|
my $optionsref = $interfaceref->{options};
|
||||||
if ( $nonzero ) {
|
if ( $nonzero ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user