Restore loop detection in sectioned accounting rules

This commit is contained in:
Tom Eastep 2011-02-13 16:38:01 -08:00
parent dd81eedb42
commit e64070f9e1

View File

@ -279,7 +279,6 @@ sub process_accounting_rule( ) {
if ( $jumpchainref ) { if ( $jumpchainref ) {
if ( $asection ) { if ( $asection ) {
fatal_error "Chain $chain jumps to itself" if $chainref eq $jumpchainref;
my $jumprestrict = $jumpchainref->{restriction} || $restriction; my $jumprestrict = $jumpchainref->{restriction} || $restriction;
fatal_error "Chain $jumpchainref->{name} contains rules that are incompatible with the $sectionname section" if $jumprestrict && $jumprestrict ne $restriction; fatal_error "Chain $jumpchainref->{name} contains rules that are incompatible with the $sectionname section" if $jumprestrict && $jumprestrict ne $restriction;
} }
@ -396,6 +395,7 @@ sub setup_accounting() {
for ( accounting_chainrefs ) { for ( accounting_chainrefs ) {
warning_message "Accounting chain $_->{name} has no references" unless keys %{$_->{references}}; warning_message "Accounting chain $_->{name} has no references" unless keys %{$_->{references}};
} }
}
if ( my $chainswithjumps = keys %accountingjumps ) { if ( my $chainswithjumps = keys %accountingjumps ) {
my $progress = 1; my $progress = 1;
@ -423,6 +423,5 @@ sub setup_accounting() {
} }
} }
} }
}
1; 1;