]> git.sesse.net Git - itkacl/commitdiff
Fix a bug where max_updates_per_transaction would not be respected.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 23 Jun 2013 14:24:30 +0000 (16:24 +0200)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 23 Jun 2013 14:24:30 +0000 (16:24 +0200)
itkacl-2.1/sync-itkacl.pl

index 868ee0f5b051ae9fb2c20dee6ea293138647bc1e..d8e49c9318359c474d15b0431354b53479f3f9e3 100755 (executable)
@@ -90,12 +90,12 @@ sub update_zone {
 
        for my $entry (keys %entries) {
                next if (exists($current_entries{$entry}));
-               last if (++$num_lines == $itkaclsyncconfig::max_updates_per_transaction);
+               last if (++$num_lines >= $itkaclsyncconfig::max_updates_per_transaction);
                print NSUPDATE "update add $entry 10 A 127.0.0.1\n";
        }
        for my $entry (keys %current_entries) {
                next if (exists($entries{$entry}));
-               last if (++$num_lines == $itkaclsyncconfig::max_updates_per_transaction);
+               last if (++$num_lines >= $itkaclsyncconfig::max_updates_per_transaction);
                print NSUPDATE "update delete $entry\n";
        }
        print NSUPDATE "send\n";