handle more RR types.
This commit is contained in:
parent
888f0a58eb
commit
6a95311ee1
14
dns/check.pl
14
dns/check.pl
|
@ -266,6 +266,20 @@ sub rr2key {
|
||||||
$key = $rr->nsdname;
|
$key = $rr->nsdname;
|
||||||
} elsif ($rr->type eq 'MX') {
|
} elsif ($rr->type eq 'MX') {
|
||||||
$key = join(' ', $rr->preference, $rr->exchange);
|
$key = join(' ', $rr->preference, $rr->exchange);
|
||||||
|
} elsif ($rr->type eq 'CNAME') {
|
||||||
|
$key = $rr->cname;
|
||||||
|
} elsif ($rr->type eq 'TXT') {
|
||||||
|
$key = $rr->txtdata;
|
||||||
|
} elsif ($rr->type eq 'SRV') {
|
||||||
|
$key = join(' ', $rr->priority, $rr->weight, $rr->port, $rr->target);
|
||||||
|
} elsif ($rr->type eq 'PTR') {
|
||||||
|
$key = $rr->ptrdname;
|
||||||
|
} elsif ($rr->type eq 'HINFO') {
|
||||||
|
$key = join(' ', $rr->cpu, $rr->os);
|
||||||
|
} elsif ($rr->type eq 'LOC') {
|
||||||
|
# sloppy
|
||||||
|
my ($lat, $lon) = $rr->latlon;
|
||||||
|
$key = join(' ', $lat, $lon, $rr->altitude);
|
||||||
} else {
|
} else {
|
||||||
print STDERR "unhandled RR:\n";
|
print STDERR "unhandled RR:\n";
|
||||||
print STDERR $rr->string, "\n";
|
print STDERR $rr->string, "\n";
|
||||||
|
|
Loading…
Reference in New Issue