From 79bb47582af63304511fdd3eecee6f4158f08b19 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 17 Sep 2010 16:00:36 -0700 Subject: [PATCH] Zero out {frozen} in a deleted chain entry --- Shorewall/Perl/Shorewall/Chains.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 1aa2a9649..ac9936077 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -624,7 +624,7 @@ sub insert_rule1($$$) $chainref->{frozen}++; $number = 0; } - + splice( @{$chainref->{rules}}, $number, 0, $rule ); trace( $chainref, 'I', ++$number, $rule ) if $debug; @@ -642,12 +642,13 @@ sub insert_rule($$$) { # # Do final work to 'delete' a chain. We leave it in the chain table but clear -# the 'referenced', 'rules' and 'references' members. +# the 'referenced', 'rules', 'references' and 'frozen' members. # sub delete_chain( $ ) { my $chainref = shift; $chainref->{referenced} = 0; + $chainref->{frozen} = 0; $chainref->{rules} = []; $chainref->{references} = {}; trace( $chainref, 'X', undef, '' ) if $debug;