[PATCH 2/2] resolv: do not add search domains to PTR queries
Mathias Kresin
openwrt at kresin.me
Sat Oct 18 15:16:06 UTC 2014
The "IN-ADDR.ARPA" domain is fixed and never needs a search domain.
Signed-off-by: Mathias Kresin <openwrt at kresin.me>
---
libc/inet/resolv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index 3d3a540..7638526 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -1478,7 +1478,7 @@ int __dns_lookup(const char *name,
* We were incurring long delays because of this. */
if (h.rcode == NXDOMAIN || h.rcode == SERVFAIL) {
/* if possible, try first/next search domain */
- if (!is_fqdn) {
+ if (!is_fqdn && q.qtype != T_PTR) {
DPRINTF("variant:%d sdomains:%d\n", variant, sdomains);
if (variant < sdomains - 1 || (variant == sdomains -1 && !looks_like_fqdn)) {
/* first/next search domain */
--
1.9.1
More information about the uClibc
mailing list