The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0044-inet-do-not-filter-responses-in-res_query.patch
1 From 5e40582d549b4a186de2fea9efafadd06904424c Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3 Date: Thu, 18 Jun 2009 06:55:46 +0000
4 Subject: [PATCH] inet: do not filter responses in res_query
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Fixes bug #5342
10
11 res_query was silently rejecting responses against T_ANY DNS
12 questions.
13
14 Remove the type-filtering from res_query altogether.
15 __dns_lookup is supposed to return the proper stuff that you asked
16 for (and only that).
17
18 Signed-off-by: Timo Teräs <timo.teras@iki.fi>
19 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
20 ---
21  libc/inet/resolv.c |    9 ++++-----
22  1 file changed, 4 insertions(+), 5 deletions(-)
23
24 diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
25 index e738098..7bd634c 100644
26 --- a/libc/inet/resolv.c
27 +++ b/libc/inet/resolv.c
28 @@ -3740,11 +3740,10 @@ int res_query(const char *dname, int class, int type,
29  
30         free(a.dotted);
31  
32 -       if (a.atype == type) { /* CNAME */
33 -               if (i > anslen)
34 -                       i = anslen;
35 -               memcpy(answer, packet, i);
36 -       }
37 +       if (i > anslen)
38 +               i = anslen;
39 +       memcpy(answer, packet, i);
40 +
41         free(packet);
42         return i;
43  }
44 -- 
45 1.7.10.4
46