diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-03-16 14:08:56 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-03-16 14:08:56 +0000 |
commit | c88b57200834b2b881a5ffa93f57f2c8e8cd5aa8 (patch) | |
tree | acb3f85669c13d3d8ff9d26c73ac863354402aa3 /lib | |
parent | 06f5dc9c3a7c5a4bb65097e7bbfd18f1e653a354 (diff) |
workaround against name servers which return NXDOMAIN/SERVFAIL on IPv4 only
node (the srever server should return acount = 0 without error).
NetBSD PR: 9621
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 1038ce9d83e..8de6394a10e 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo.c,v 1.16 2000/03/13 12:26:56 itojun Exp $ */ +/* $OpenBSD: getaddrinfo.c,v 1.17 2000/03/16 14:08:55 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1545,6 +1545,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) @@ -1553,8 +1554,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) |