From: Patrik Flykt <patrik.fl...@linux.intel.com>

The DNS proxy code creates and uses a TCP connection only for a single
request at a time. The TCP DNS proxy is added to the end of the server
list, but should not be used for generic requests as the connection
will be closed down after the response for the initial request. Any
other requests sent over the connection will silently disappear, thus
add a check to ignore TCP connection for the generic DNS lookup case.
---
 src/dnsproxy.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 7de4e38..df1f6d2 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -2224,6 +2224,11 @@ static gboolean resolv(struct request_data *req,
        for (list = server_list; list; list = list->next) {
                struct server_data *data = list->data;
 
+               if (data->protocol == IPPROTO_TCP) {
+                       DBG("server %s ignored proto TCP", data->server);
+                       continue;
+               }
+
                DBG("server %s enabled %d", data->server, data->enabled);
 
                if (data->enabled == FALSE)
-- 
1.7.10.4

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to