forked from extern/shorewall_code
Initialize the 'id' member of reserved tables after .conf has been read.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
61e21de41b
commit
792a19bf4b
@ -104,7 +104,9 @@ sub initialize( $ ) {
|
||||
$first_fallback_route = 1;
|
||||
$maxload = 0;
|
||||
$tproxies = 0;
|
||||
|
||||
#
|
||||
# The 'id' member is initialized in process_providers(), after the .conf file has been processed
|
||||
#
|
||||
%providers = ( local => { provider => 'local', number => LOCAL_TABLE , mark => 0 , optional => 0 ,routes => [], rules => [] , routedests => {} } ,
|
||||
main => { provider => 'main', number => MAIN_TABLE , mark => 0 , optional => 0 ,routes => [], rules => [] , routedests => {} } ,
|
||||
default => { provider => 'default', number => DEFAULT_TABLE , mark => 0 , optional => 0 ,routes => [], rules => [] , routedests => {} } ,
|
||||
@ -112,15 +114,6 @@ sub initialize( $ ) {
|
||||
unspec => { provider => 'unspec', number => UNSPEC_TABLE , mark => 0 , optional => 0 ,routes => [], rules => [] , routedests => {} } );
|
||||
@providers = ();
|
||||
|
||||
unless ( $config{USE_RT_NAMES} ) {
|
||||
for ( values %providers ) {
|
||||
$_->{id} = $_->{number};
|
||||
}
|
||||
} else {
|
||||
for ( values %providers ) {
|
||||
$_->{id} = $_->{provider};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
@ -1347,6 +1340,16 @@ sub process_providers( $ ) {
|
||||
our $providers = 0;
|
||||
our $pseudoproviders = 0;
|
||||
|
||||
unless ( $config{USE_RT_NAMES} ) {
|
||||
for ( values %providers ) {
|
||||
$_->{id} = $_->{number};
|
||||
}
|
||||
} else {
|
||||
for ( values %providers ) {
|
||||
$_->{id} = $_->{provider};
|
||||
}
|
||||
}
|
||||
|
||||
$lastmark = 0;
|
||||
|
||||
if ( my $fn = open_file 'providers' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user