Don't leave unused sfilter chains in the config

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-06-09 17:09:53 -07:00
parent 3e9a54d404
commit 8a7ad569e4

View File

@ -568,9 +568,13 @@ sub add_common_rules() {
}
#
# Delete 'sfilter' chain unless there are referenced to it
# Delete 'sfilter' chains unless there are referenced to them
#
$chainref->{referenced} = 0 unless keys %{($chainref = $filter_table->{sfilter})->{references}};
for ( qw/sfilter sfilter1/ ) {
if ( $chainref = $filter_table->{$_} ) {
$chainref->{referenced} = 0 unless keys %{$chainref->{references}};
}
}
run_user_exit1 'initdone';