From fcbac7b2428550cab1837c7602493bd66f45360f Mon Sep 17 00:00:00 2001 From: teastep <teastep@fbd18981-670d-0410-9b5c-8dc0c1a9a2bb> Date: Sat, 28 Jul 2007 17:34:21 +0000 Subject: [PATCH] Assert zero cmdmode for all chains before emitting rules git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6988 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 9dff578ed..a2345fdb1 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -1956,6 +1956,7 @@ sub create_netfilter_load() { for my $chain ( @builtins ) { my $chainref = $chain_table{$table}{$chain}; if ( $chainref ) { + fatal_error "Internal error in create_netfilter_load()" if $chainref->{cmdmode}; emit_unindented ":$chain $chainref->{policy} [0:0]"; push @chains, $chainref; } @@ -1966,6 +1967,7 @@ sub create_netfilter_load() { for my $chain ( grep $chain_table{$table}{$_}->{referenced} , ( sort keys %{$chain_table{$table}} ) ) { my $chainref = $chain_table{$table}{$chain}; unless ( $chainref->{builtin} ) { + fatal_error "Internal error in create_netfilter_load()" if $chainref->{cmdmode}; emit_unindented ":$chainref->{name} - [0:0]"; push @chains, $chainref; }