From: Patrik Flykt Date: Mon, 19 Nov 2012 08:21:00 +0000 (+0200) Subject: dnsproxy: Check the result of socket creation when resolving X-Git-Tag: 1.10~194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fabaea99c6a9587c79ec53510fcf32bd47cba68a;p=platform%2Fupstream%2Fconnman.git dnsproxy: Check the result of socket creation when resolving If the socket creation failed, continue with the next server. --- diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 01bcc51..7de4e38 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -2229,8 +2229,12 @@ static gboolean resolv(struct request_data *req, if (data->enabled == FALSE) continue; - if (data->channel == NULL && data->protocol == IPPROTO_UDP) - server_create_socket(data); + if (data->channel == NULL && data->protocol == IPPROTO_UDP) { + if (server_create_socket(data) < 0) { + DBG("socket creation failed while resolving"); + continue; + } + } if (ns_resolv(data, req, request, name) > 0) return TRUE;