Subject: ares_gethostbyname()


From: Gisle Vanem <>
Date: Sat, 22 Jul 2006 20:52:18 +0200

I'm curious as to why the following code in ares_gethostbyname.c
(line 174) was added:
  else if (status == ARES_ENODATA && hquery->family == AF_INET6)
      /* There was no AAAA now lookup an A */
      hquery->family = AF_INET;
      ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,

It has the effect that e.g. the command "ahost -t aaaa"
comes back with 2001:200:0:8002:203:47ff:fea5:3085

Not what was intended AFAICS; only AAAA lookups should be performed when
ordered to.

Received on 2006-07-22