From 6a95311ee1a44390205a8feee40c92bf1732e5f8 Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 5 May 2008 15:40:20 +0000 Subject: [PATCH] handle more RR types. --- dns/check.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dns/check.pl b/dns/check.pl index 8c8486f..53563a1 100644 --- a/dns/check.pl +++ b/dns/check.pl @@ -266,6 +266,20 @@ sub rr2key { $key = $rr->nsdname; } elsif ($rr->type eq 'MX') { $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 { print STDERR "unhandled RR:\n"; print STDERR $rr->string, "\n";