Loading ares/CHANGES +4 −0 Original line number Diff line number Diff line Changelog for the c-ares project * February 3 2009 (Phil Blundell) - If the server returns garbage or nothing at all in response to an AAAA query, go on and ask for A records anyway. * January 31 2009 (Daniel Stenberg) - ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving either AF_INET6 or AF_INET. It works by accepting any of the looksups in the Loading ares/ares_gethostbyname.c +7 −7 Original line number Diff line number Diff line Loading @@ -194,10 +194,10 @@ static void host_callback(void *arg, int status, int timeouts, else if (hquery->sent_family == AF_INET6) { status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL); if (status == ARES_ENODATA) { /* The query returned something (e.g. CNAME) but there were no AAAA records. Try looking up A instead. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ if (status == ARES_ENODATA || status == ARES_EBADRESP) { /* The query returned something but either there were no AAAA records (e.g. just CNAME) or the response was malformed. Try looking up A instead. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ hquery->sent_family = AF_INET; ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback, hquery); Loading @@ -208,10 +208,10 @@ static void host_callback(void *arg, int status, int timeouts, } end_hquery(hquery, status, host); } else if (status == ARES_ENODATA && hquery->sent_family == AF_INET6) else if ((status == ARES_ENODATA || status == ARES_EBADRESP || status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6) { /* There was no AAAA. Now lookup an A. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ /* The AAAA query yielded no useful result. Now look up an A instead. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ hquery->sent_family = AF_INET; ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback, hquery); Loading Loading
ares/CHANGES +4 −0 Original line number Diff line number Diff line Changelog for the c-ares project * February 3 2009 (Phil Blundell) - If the server returns garbage or nothing at all in response to an AAAA query, go on and ask for A records anyway. * January 31 2009 (Daniel Stenberg) - ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving either AF_INET6 or AF_INET. It works by accepting any of the looksups in the Loading
ares/ares_gethostbyname.c +7 −7 Original line number Diff line number Diff line Loading @@ -194,10 +194,10 @@ static void host_callback(void *arg, int status, int timeouts, else if (hquery->sent_family == AF_INET6) { status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL); if (status == ARES_ENODATA) { /* The query returned something (e.g. CNAME) but there were no AAAA records. Try looking up A instead. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ if (status == ARES_ENODATA || status == ARES_EBADRESP) { /* The query returned something but either there were no AAAA records (e.g. just CNAME) or the response was malformed. Try looking up A instead. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ hquery->sent_family = AF_INET; ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback, hquery); Loading @@ -208,10 +208,10 @@ static void host_callback(void *arg, int status, int timeouts, } end_hquery(hquery, status, host); } else if (status == ARES_ENODATA && hquery->sent_family == AF_INET6) else if ((status == ARES_ENODATA || status == ARES_EBADRESP || status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6) { /* There was no AAAA. Now lookup an A. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ /* The AAAA query yielded no useful result. Now look up an A instead. We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */ hquery->sent_family = AF_INET; ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback, hquery); Loading