visit all requests even if we get errors from name server.

this will solve name query failures for IPv4-only node, when
the DNS server returns SERVFAIL or NXDOMAIN (should success with an == 0).
PR: 9621
This commit is contained in:
itojun 2000-03-16 13:51:43 +00:00
parent 6e0e3d609f
commit d5aee78db5

View File

@ -1,4 +1,4 @@
/* $NetBSD: getaddrinfo.c,v 1.34 2000/02/22 05:47:15 itojun Exp $ */
/* $NetBSD: getaddrinfo.c,v 1.35 2000/03/16 13:51:43 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -1610,6 +1610,7 @@ res_queryN(name, target)
return (n);
}
n = res_send(buf, n, answer, anslen);
#if 0
if (n < 0) {
#ifdef DEBUG
if (_res.options & RES_DEBUG)
@ -1618,8 +1619,9 @@ res_queryN(name, target)
h_errno = TRY_AGAIN;
return (n);
}
#endif
if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
rcode = hp->rcode; /* record most recent error */
#ifdef DEBUG
if (_res.options & RES_DEBUG)