mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Insure that the mapping to base names is deterministic
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
be0231578f
commit
d94f2cc86d
@ -155,9 +155,13 @@ our %reservedName = ( all => 1,
|
|||||||
# broadcasts => 'none', 'detect' or [ <addr1>, <addr2>, ... ]
|
# broadcasts => 'none', 'detect' or [ <addr1>, <addr2>, ... ]
|
||||||
# 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>
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
|
# The purpose of the 'base' member is to ensure that the base names associated with the physical interfaces are assigned in
|
||||||
|
# the same order as the interfaces are encountered in the configuration files.
|
||||||
|
#
|
||||||
our @interfaces;
|
our @interfaces;
|
||||||
our %interfaces;
|
our %interfaces;
|
||||||
our @bport_zones;
|
our @bport_zones;
|
||||||
@ -1051,7 +1055,8 @@ sub process_interface( $$ ) {
|
|||||||
broadcasts => $broadcasts ,
|
broadcasts => $broadcasts ,
|
||||||
options => \%options ,
|
options => \%options ,
|
||||||
zone => '',
|
zone => '',
|
||||||
physical => $physical
|
physical => $physical ,
|
||||||
|
base => chain_base( $physical )
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( $zone ) {
|
if ( $zone ) {
|
||||||
@ -1163,11 +1168,14 @@ sub known_interface($)
|
|||||||
#
|
#
|
||||||
# Cache this result for future reference. We set the 'name' to the name of the entry that appears in /etc/shorewall/interfaces and we do not set the root;
|
# Cache this result for future reference. We set the 'name' to the name of the entry that appears in /etc/shorewall/interfaces and we do not set the root;
|
||||||
#
|
#
|
||||||
|
my $physical = map_physical( $interface, $interfaceref );
|
||||||
|
|
||||||
return $interfaces{$interface} = { options => $interfaceref->{options},
|
return $interfaces{$interface} = { options => $interfaceref->{options},
|
||||||
bridge => $interfaceref->{bridge} ,
|
bridge => $interfaceref->{bridge} ,
|
||||||
name => $i ,
|
name => $i ,
|
||||||
number => $interfaceref->{number} ,
|
number => $interfaceref->{number} ,
|
||||||
physical => map_physical( $interface, $interfaceref )
|
physical => $physical,
|
||||||
|
base => chain_base( $physical ),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user