From: Pasi Sjöholm <[email protected]>
If domain_append is set and forward_dns_reply() processes the response
for query without the domain name earlier than the response for one
with the domain name set we need to make sure that the response is
not sent back to the client if rcode and ancount are zero until the
last nameserver response is processed.
---
src/dnsproxy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 7232b98..28e7cf7 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -2068,7 +2068,8 @@ static int forward_dns_reply(unsigned char *reply, int
reply_len, int protocol,
}
out:
- if (hdr->rcode > 0 && req->numresp < req->numserv)
+ if ((hdr->rcode > 0 || (hdr->rcode == 0 && hdr->ancount == 0 &&
+ req->append_domain)) && req->numresp < req->numserv)
return -EINVAL;
request_list = g_slist_remove(request_list, req);
--
1.9.1
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman