X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fuclibc%2F0.9.33.2%2F0044-inet-do-not-filter-responses-in-res_query.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fuclibc%2F0.9.33.2%2F0044-inet-do-not-filter-responses-in-res_query.patch;h=0a8c94bb57994e29b0635d0ee22f2c0aaaf66741;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/uclibc/0.9.33.2/0044-inet-do-not-filter-responses-in-res_query.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/uclibc/0.9.33.2/0044-inet-do-not-filter-responses-in-res_query.patch new file mode 100644 index 0000000..0a8c94b --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/uclibc/0.9.33.2/0044-inet-do-not-filter-responses-in-res_query.patch @@ -0,0 +1,46 @@ +From 5e40582d549b4a186de2fea9efafadd06904424c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Thu, 18 Jun 2009 06:55:46 +0000 +Subject: [PATCH] inet: do not filter responses in res_query +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes bug #5342 + +res_query was silently rejecting responses against T_ANY DNS +questions. + +Remove the type-filtering from res_query altogether. +__dns_lookup is supposed to return the proper stuff that you asked +for (and only that). + +Signed-off-by: Timo Teräs +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/inet/resolv.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c +index e738098..7bd634c 100644 +--- a/libc/inet/resolv.c ++++ b/libc/inet/resolv.c +@@ -3740,11 +3740,10 @@ int res_query(const char *dname, int class, int type, + + free(a.dotted); + +- if (a.atype == type) { /* CNAME */ +- if (i > anslen) +- i = anslen; +- memcpy(answer, packet, i); +- } ++ if (i > anslen) ++ i = anslen; ++ memcpy(answer, packet, i); ++ + free(packet); + return i; + } +-- +1.7.10.4 +