Add 'wildcard' member to the interface table

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2014-08-11 08:30:44 -07:00
parent e545329eb9
commit 6f777098d7
2 changed files with 6 additions and 3 deletions

View File

@ -469,7 +469,7 @@ sub process_a_provider( $ ) {
#
# The logical interface name was specified
#
$physical = get_physical $interface;
$physical = $interfaceref->{physical};
} else {
#
# A Physical name was specified
@ -478,7 +478,7 @@ sub process_a_provider( $ ) {
#
# Switch to the logical name unless it is a wildcard
#
$interface = $interfaceref->{name} unless $interfaceref->{name} =~ /\+$/;
$interface = $interfaceref->{name} unless $interfaceref->{wildcard};
}
my $gatewaycase = '';

View File

@ -193,6 +193,7 @@ our %reservedName = ( all => 1,
# physical => <physical interface name>
# base => <shell variable base representing this interface>
# provider => <Provider Name, if interface is associated with a provider>
# wildcard => undef|1 # Wildcard Name
# zones => { zone1 => 1, ... }
# }
# }
@ -1375,6 +1376,7 @@ sub process_interface( $$ ) {
base => var_base( $physical ),
zones => {},
origin => shortlineinfo(''),
wildcard => $wildcard,
};
if ( $zone ) {
@ -1531,6 +1533,7 @@ sub known_interface($)
number => $interfaceref->{number} ,
physical => $physical ,
base => var_base( $physical ) ,
wildcard => $interfaceref->{wildcard} ,
zones => $interfaceref->{zones} ,
};
}
@ -1768,7 +1771,7 @@ sub find_interfaces_by_option1( $ ) {
my $optionsref = $interfaceref->{options};
if ( $optionsref && defined $optionsref->{$option} ) {
$wild ||= ( $interfaceref->{physical} =~ /\+$/ );
$wild ||= $interfaceref->{wildcard};
push @ints , $interface
}
}