about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-05-09 16:12:41 +0000
committerUlrich Drepper <drepper@redhat.com>2009-05-09 16:12:41 +0000
commitcf4f16cc889a74002d471c26a7b21aab04a9b25d (patch)
treea308710da2cca0fa5668fb74bc2d8e81dfe0d7bd
parent23b6b4664622ba8efb728b1cd02c2992a4a1b717 (diff)
downloadglibc-cf4f16cc889a74002d471c26a7b21aab04a9b25d.tar.gz
glibc-cf4f16cc889a74002d471c26a7b21aab04a9b25d.tar.xz
glibc-cf4f16cc889a74002d471c26a7b21aab04a9b25d.zip
[BZ #10128]
2009-05-05  Aurelien Jarno  <aurelien@aurel32.net>
	[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.
-rw-r--r--ChangeLog6
-rw-r--r--resolv/res_query.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4dca208ceb..e1316a0d4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-05  Aurelien Jarno  <aurelien@aurel32.net>
+
+	[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.
+
 2009-05-06  Ryan S. Arnold  <rsa@us.ibm.com>
 
 	[BZ #10118]
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 6ac33ce64c..9ffb3e3685 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);