fix an issue where CNAME records generate bogus results.
ok gilles@
{
char buf[512];
+ if (rr->rr_type != T_MX)
+ return;
+
print_dname(rr->rr.mx.exchange, buf, sizeof(buf));
buf[strlen(buf) - 1] = '\0';
if (buf[strlen(buf) - 1] == '.')
char buffer[512];
const char *ptr;
+ if (rr->rr_type != T_A)
+ return;
+
if ((ptr = inet_ntop(AF_INET, &rr->rr.in_a.addr,
buffer, sizeof buffer)))
printf("%s\n", ptr);
char buffer[512];
const char *ptr;
+ if (rr->rr_type != T_AAAA)
+ return;
+
if ((ptr = inet_ntop(AF_INET6, &rr->rr.in_aaaa.addr6,
buffer, sizeof buffer)))
printf("%s\n", ptr);