]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_8] another check5011 bugfix
authorEvan Hunt <each@isc.org>
Tue, 16 Apr 2013 21:05:50 +0000 (14:05 -0700)
committerEvan Hunt <each@isc.org>
Tue, 16 Apr 2013 21:05:50 +0000 (14:05 -0700)
contrib/check5011.pl

index 5306e8bfb26dda9c6a3ca6d9b63bf1008fcc2ff8..d4f2d3f1eb44302212c993fb100a68b2fe7cf53a 100644 (file)
@@ -63,6 +63,7 @@ sub digkeys ($) {
 }
 
 my $anchor;
+my $owner = ".";
 while (<>) {
        next unless m{^([a-z0-9.-]*)\s+KEYDATA\s+(\d+)\s+(\d+)\s+(\d+)\s+};
        my $k = getkey *ARGV, {
@@ -71,6 +72,11 @@ while (<>) {
                addhd    => $3,
                removehd => $4,
        };
+       if ($k->{name} eq "") {
+               $k->{name} = $owner;
+       } else {
+               $owner = $k->{name};
+       }
        $k->{name} =~ s{[.]*$}{.};
        push @{$anchor->{$k->{name}}}, $k;
 }