[git commit branch/0.9.33] inet: do not filter responses in res_query
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Wed Mar 20 10:50:25 UTC 2013
commit: http://git.uclibc.org/uClibc/commit/?id=5e40582d549b4a186de2fea9efafadd06904424c
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33
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 at iki.fi>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
libc/inet/resolv.c | 9 ++++-----
1 files 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;
}
More information about the uClibc-cvs
mailing list