Fix SAVE_IPSETS

This commit is contained in:
Tom Eastep 2011-04-03 08:02:32 -07:00
parent 31f16083d4
commit bc2de57291
2 changed files with 6 additions and 6 deletions

View File

@ -387,8 +387,8 @@ our %builtin_target = ( ACCEPT => 1,
# 2. The compiler can run multiple times in the same process so it has to be
# able to re-initialize its dependent modules' state.
#
sub initialize( $ ) {
$family = shift;
sub initialize( $$ ) {
( $family, my $hard ) = @_;
%chain_table = ( raw => {},
mangle => {},
@ -428,7 +428,7 @@ sub initialize( $ ) {
$idiotcount1 = 0;
$warningcount = 0;
$hashlimitset = 0;
$ipset_rules = 0;
$ipset_rules = 0 if $hard;
#
# The chain table is initialized via a call to initialize_chain_table() after the configuration and capabilities have been determined.
#

View File

@ -55,7 +55,7 @@ our $family;
#
sub initialize_package_globals() {
Shorewall::Config::initialize($family);
Shorewall::Chains::initialize ($family);
Shorewall::Chains::initialize ($family, 1);
Shorewall::Zones::initialize ($family);
Shorewall::Nat::initialize;
Shorewall::Providers::initialize($family);
@ -818,7 +818,7 @@ sub compiler {
# We must reinitialize Shorewall::Chains before generating the iptables-restore input
# for stopping the firewall
#
Shorewall::Chains::initialize( $family );
Shorewall::Chains::initialize( $family, 0 );
initialize_chain_table;
#
# S T O P _ F I R E W A L L
@ -882,7 +882,7 @@ sub compiler {
# Re-initialize the chain table so that process_routestopped() has the same
# environment that it would when called by compile_stop_firewall().
#
Shorewall::Chains::initialize( $family );
Shorewall::Chains::initialize( $family , 0 );
initialize_chain_table;
if ( $debug ) {