Record types which support a empty rdata field were not handling the empty rdata field case.
This commit is contained in:
@@ -57,6 +57,28 @@ while (<FILE1>) {
|
||||
} else {
|
||||
$entry{"$name ; $class.$type ; $value"} = $_;
|
||||
}
|
||||
} elsif (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s*$/) {
|
||||
$name = $1;
|
||||
$class = $2;
|
||||
$type = $3;
|
||||
$value = "";
|
||||
if ($lc) {
|
||||
$name = lc($name);
|
||||
$value = lc($value);
|
||||
}
|
||||
if ($type eq "SOA") {
|
||||
$firstname = $name if ($firstname eq "");
|
||||
if ($name eq $firstname) {
|
||||
$name = "$name$count";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
if ($entry{"$name ; $class.$type ; $value"} ne "") {
|
||||
$line = $entry{"$name ; $class.$type ; $value"};
|
||||
print("Duplicate entry in $file1:\n> $_\n< $line\n");
|
||||
} else {
|
||||
$entry{"$name ; $class.$type ; $value"} = $_;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(FILE1);
|
||||
@@ -93,6 +115,28 @@ while (<FILE2>) {
|
||||
$printed++;
|
||||
$status = 1;
|
||||
}
|
||||
} elsif (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s*$/) {
|
||||
$name = $1;
|
||||
$class = $2;
|
||||
$type = $3;
|
||||
$value = "";
|
||||
if ($lc) {
|
||||
$name = lc($name);
|
||||
$value = lc($value);
|
||||
}
|
||||
if (($name eq $firstname) && ($type eq "SOA")) {
|
||||
$count--;
|
||||
$name = "$name$count";
|
||||
}
|
||||
if ($entry{"$name ; $class.$type ; $value"} ne "") {
|
||||
$entry{"$name ; $class.$type ; $value"} = "";
|
||||
} else {
|
||||
print("Only in $file2 (missing from $file1):\n")
|
||||
if ($printed == 0);
|
||||
print("> $_\n");
|
||||
$printed++;
|
||||
$status = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(FILE2);
|
||||
|
||||
Reference in New Issue
Block a user