summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2009-06-18 06:55:46 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-03-20 11:51:08 +0100
commit7e434242bdaa3718c7146b31dcd81e24fe7dc3c1 (patch)
treeafbdec84b95c2dac2c0b271985204dae38c67c3e /libc
parent044ac16085094d6ec00ea0739d7b92df18793109 (diff)
inet: do not filter responses in res_query
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 <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/resolv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index b557b097d..4777977fe 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -3732,11 +3732,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;
}