From 5aa19f596e48a8ab701ee6583b163703a1a21daf Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 18 Jun 2007 23:04:17 +0000 Subject: [PATCH] Some more global variable [re]initialization cleanup git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6594 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Actions.pm | 3 +-- Shorewall-perl/Shorewall/Chains.pm | 2 +- Shorewall-perl/Shorewall/Config.pm | 9 ++------- Shorewall-perl/Shorewall/Providers.pm | 1 - Shorewall-perl/Shorewall/Zones.pm | 17 +---------------- 5 files changed, 5 insertions(+), 27 deletions(-) diff --git a/Shorewall-perl/Shorewall/Actions.pm b/Shorewall-perl/Shorewall/Actions.pm index 5ecbda905..c4eb0b98a 100644 --- a/Shorewall-perl/Shorewall/Actions.pm +++ b/Shorewall-perl/Shorewall/Actions.pm @@ -55,9 +55,7 @@ our @VERSION = 1.00; # Used Actions. Each action that is actually used has an entry with value 1. # our %usedactions; -## Firewall to DMZ # - # Default actions for each policy. # our %default_actions; @@ -85,6 +83,7 @@ my %logactionchains; # sub initialize() { + %usedactions = (); %default_actions = ( DROP => 'none' , REJECT => 'none' , ACCEPT => 'none' , diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 850ce8962..9933c2278 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -275,7 +275,7 @@ sub initialize() { # # Sequence for naming temporary chains # - our $chainseq; + $chainseq = undef; } INIT { diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index 8579d13bb..a7582e906 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -78,8 +78,8 @@ our %config; # # Config options and global settings that are to be copied to object script # -our @propagateconfig; -our @propagateenv; +our @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR MODULE_SUFFIX LOGFORMAT SUBSYSLOCK LOCKFILE /; +our @propagateenv = qw/ LOGLIMIT LOGTAGONLY LOGRULENUMBERS /; # # From parsing the capabilities file # @@ -227,11 +227,6 @@ sub initialize() { TCP_FLAGS_DISPOSITION => undef, BLACKLIST_DISPOSITION => undef, ); - # - # Config options and global settings that are to be copied to object script - # - @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR MODULE_SUFFIX LOGFORMAT SUBSYSLOCK LOCKFILE /; - @propagateenv = qw/ LOGLIMIT LOGTAGONLY LOGRULENUMBERS /; # # From parsing the capabilities file diff --git a/Shorewall-perl/Shorewall/Providers.pm b/Shorewall-perl/Shorewall/Providers.pm index 4d32914ab..03fe4a021 100644 --- a/Shorewall-perl/Shorewall/Providers.pm +++ b/Shorewall-perl/Shorewall/Providers.pm @@ -64,7 +64,6 @@ our @providers; # sub initialize() { - @providers = (); %routemarked_interfaces = (); @routemarked_interfaces = (); $balance = 0; diff --git a/Shorewall-perl/Shorewall/Zones.pm b/Shorewall-perl/Shorewall/Zones.pm index f50713f6f..591169e0f 100644 --- a/Shorewall-perl/Shorewall/Zones.pm +++ b/Shorewall-perl/Shorewall/Zones.pm @@ -94,21 +94,6 @@ our @zones; our %zones; our $firewall_zone; -# -# Interface Table. -# -# @interfaces lists the interface names in the order that they appear in the interfaces file. -# -# %interfaces { => { root => -# broadcast => [ , ... ] -# options => { = , -# ... -# } -# zone => -# } -# -our %interfaces; - our %reservedName = ( all => 1, none => 1, SOURCE => 1, @@ -126,7 +111,7 @@ our %reservedName = ( all => 1, sub initialize() { @zones = (); %zones = (); - %interfaces = (); + $firewall_zone = ''; } INIT {