Skip to content

Commit

Permalink
dnsproxy: Enable added DNS servers only for the default service
Browse files Browse the repository at this point in the history
When a new DNS server is added, enable it only if its interface
index is that of the default service.
  • Loading branch information
pfl committed Jan 21, 2014
1 parent 4f04f75 commit 2ca6fb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dnsproxy.c
Expand Up @@ -2289,9 +2289,10 @@ static struct server_data *create_server(int index,
}

if (protocol == IPPROTO_UDP) {
/* Enable new servers by default */
data->enabled = true;
DBG("Adding DNS server %s", data->server);
if (__connman_service_index_is_default(data->index)) {
data->enabled = true;
DBG("Adding DNS server %s", data->server);
}

server_list = g_slist_append(server_list, data);
}
Expand Down

0 comments on commit 2ca6fb4

Please sign in to comment.