Apply initialization fix to master branch

This commit is contained in:
Tom Eastep 2009-09-03 14:54:47 -07:00
parent 015d4f58ce
commit df5291e119
2 changed files with 4 additions and 4 deletions

View File

@ -71,6 +71,7 @@ our %EXPORT_TAGS = (
ALL_COMMANDS
NOT_RESTORE
initialize_chain_table
add_commands
move_rules
insert_rule1
@ -295,7 +296,6 @@ our %builtin_target = ( ACCEPT => 1,
NFQUEUE => 1,
REDIRECT => 1 );
sub initialize_chain_table();
#
# Rather than initializing globals in an INIT block or during declaration,
# we initialize them in a function. This is done for two reasons:
@ -356,8 +356,6 @@ sub initialize( $ ) {
$global_variables = 0;
$idiotcount = 0;
initialize_chain_table;
}
#
@ -1016,7 +1014,7 @@ sub ensure_manual_chain($) {
}
#
# Add all builtin chains to the chain table -- it is separate from initialize() for purely historical reasons.
# Add all builtin chains to the chain table -- it is separate from initialize() because it depends on capabilities and configuration.
# The function also initializes the target table with the pre-defined targets available for the specfied address family.
#
#

View File

@ -591,6 +591,8 @@ sub compiler {
report_capabilities;
initialize_chain_table;
require_capability( 'MULTIPORT' , "Shorewall $globals{VERSION}" , 's' );
require_capability( 'RECENT_MATCH' , 'MACLIST_TTL' , 's' ) if $config{MACLIST_TTL};
require_capability( 'XCONNMARK' , 'HIGH_ROUTE_MARKS=Yes' , 's' ) if $config{HIGH_ROUTE_MARKS};