From 3fc6734e65abe82630d4a6aab22e1cd30d043ffa Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 24 Jan 2003 20:34:11 +0000 Subject: [PATCH] Fixed minor bug in resolving of IPv4 names if IPv6 is enabled (#0000659). We were doing: T_AAAA, if that fails then T_A. But in that case when a host has both T_A and T_AAAA entries, the reverse lookup will fail for ipv4. Now using T_ANY to fetch both T_A and T_AAAA addresses at once. --- Changes | 1 + src/res.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index eb7335780..e4fc63686 100644 --- a/Changes +++ b/Changes @@ -1814,3 +1814,4 @@ seen. gmtime warning still there - Added a much faster (>100x) badwords replace routine, currently disabled until it's 100% finished and more testing has been done. - Cleanups in badwords.c. +- Fixed minor bug in resolving of IPv4 names if IPv6 is enabled (#0000659). diff --git a/src/res.c b/src/res.c index 97042e2ff..966f9c1b5 100644 --- a/src/res.c +++ b/src/res.c @@ -564,7 +564,7 @@ static int do_query_name(Link *lp, char *name, ResRQ *rptr) { rptr = make_request(lp); #ifdef INET6 - rptr->type = T_AAAA; + rptr->type = T_ANY; /* Was T_AAAA: now using T_ANY so we fetch both A and AAAA -- Syzop */ #else rptr->type = T_A; #endif @@ -574,7 +574,7 @@ static int do_query_name(Link *lp, char *name, ResRQ *rptr) Debug((DEBUG_DNS, "do_query_name(): %s ", hname)); #ifndef _WIN32 #ifdef INET6 - return (query_name(hname, C_IN, T_AAAA, rptr)); + return (query_name(hname, C_IN, T_ANY, rptr)); /* Was T_AAAA: now using T_ANY so we fetch both A and AAAA -- Syzop */ #else return (query_name(hname, C_IN, T_A, rptr)); #endif