Subject: ares_gethostbyname()

ares_gethostbyname()

From: Gisle Vanem <giva_at_bgnett.no>
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,
                  hquery);
    }

It has the effect that e.g. the command "ahost -t aaaa curl.haxx.se www.kame.net"
comes back with
  www.kame.net 2001:200:0:8002:203:47ff:fea5:3085
  curl.haxx.se 193.15.23.28

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

--gv
Received on 2006-07-22