[Bug 5342] (patch) res_query silently rejects responses against T_ANY DNS questions

bugzilla at busybox.net bugzilla at busybox.net
Mon Aug 6 18:26:30 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=5342

--- Comment #4 from Bernhard Reutner-Fischer <aldot at uclibc.org> 2012-08-06 18:26:30 UTC ---
I think the proper thing to do is remove the type-filtering from res_query
altogether. __dns_lookup is supposed to return the proper stuff that you asked
for (and only that), so i suppose it should be ok to just

@@ -3730,12 +3737,9 @@ 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;
 }

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list