From cf4f16cc889a74002d471c26a7b21aab04a9b25d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 9 May 2009 16:12:41 +0000 Subject: [BZ #10128] 2009-05-05 Aurelien Jarno [BZ #10128] * resolv/res_query.c (__libc_res_nquery): If one query returns NOTIMP or FORMERR and the other NOERROR, don't raise an error. --- resolv/res_query.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'resolv') diff --git a/resolv/res_query.c b/resolv/res_query.c index 6ac33ce..9ffb3e3 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -289,6 +289,13 @@ __libc_res_nquery(res_state statp, break; case FORMERR: case NOTIMP: + /* Servers must not reply to AAAA queries with + NOTIMP etc but some of them do. */ + if ((hp->rcode == NOERROR && ntohs (hp->ancount) != 0) + || (hp2->rcode == NOERROR + && ntohs (hp2->ancount) != 0)) + goto success; + /* FALLTHROUGH */ case REFUSED: default: RES_SET_H_ERRNO(statp, NO_RECOVERY); -- cgit v1.1