diff options
author | itojun <> | 2000-03-16 14:08:55 +0000 |
---|---|---|
committer | itojun <> | 2000-03-16 14:08:55 +0000 |
commit | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (patch) | |
tree | c541225f4479c1463951cd2e442fac64164c9e7d | |
parent | 35ae639ca2cba3ada5278a21c3faf852d2927813 (diff) | |
download | openbsd-5be3114c1fd7e0dfea1e38d3abb4cbba75244419.tar.gz openbsd-5be3114c1fd7e0dfea1e38d3abb4cbba75244419.tar.bz2 openbsd-5be3114c1fd7e0dfea1e38d3abb4cbba75244419.zip |
workaround against name servers which return NXDOMAIN/SERVFAIL on IPv4 only
node (the srever server should return acount = 0 without error).
NetBSD PR: 9621
-rw-r--r-- | src/lib/libc/net/getaddrinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libc/net/getaddrinfo.c b/src/lib/libc/net/getaddrinfo.c index 1038ce9d83..8de6394a10 100644 --- a/src/lib/libc/net/getaddrinfo.c +++ b/src/lib/libc/net/getaddrinfo.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getaddrinfo.c,v 1.16 2000/03/13 12:26:56 itojun Exp $ */ | 1 | /* $OpenBSD: getaddrinfo.c,v 1.17 2000/03/16 14:08:55 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
@@ -1545,6 +1545,7 @@ res_queryN(name, target) | |||
1545 | return (n); | 1545 | return (n); |
1546 | } | 1546 | } |
1547 | n = res_send(buf, n, answer, anslen); | 1547 | n = res_send(buf, n, answer, anslen); |
1548 | #if 0 | ||
1548 | if (n < 0) { | 1549 | if (n < 0) { |
1549 | #ifdef DEBUG | 1550 | #ifdef DEBUG |
1550 | if (_res.options & RES_DEBUG) | 1551 | if (_res.options & RES_DEBUG) |
@@ -1553,8 +1554,9 @@ res_queryN(name, target) | |||
1553 | h_errno = TRY_AGAIN; | 1554 | h_errno = TRY_AGAIN; |
1554 | return (n); | 1555 | return (n); |
1555 | } | 1556 | } |
1557 | #endif | ||
1556 | 1558 | ||
1557 | if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { | 1559 | if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { |
1558 | rcode = hp->rcode; /* record most recent error */ | 1560 | rcode = hp->rcode; /* record most recent error */ |
1559 | #ifdef DEBUG | 1561 | #ifdef DEBUG |
1560 | if (_res.options & RES_DEBUG) | 1562 | if (_res.options & RES_DEBUG) |