Skip to content

Commit

Permalink
resolver: Fix nameserver and search domain ordering for resolv.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
samnazarko authored and LaakkonenJussi committed Mar 12, 2021
1 parent 60dcd1b commit 797ea0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connman/src/resolver.c
Expand Up @@ -100,9 +100,9 @@ static int resolvfile_export(void)
* MAXDNSRCH/MAXNS entries are used.
*/

for (count = 0, list = g_list_last(resolvfile_list);
for (count = 0, list = g_list_first(resolvfile_list);
list && (count < MAXDNSRCH);
list = g_list_previous(list)) {
list = g_list_next(list)) {
struct resolvfile_entry *entry = list->data;

if (!entry->domain)
Expand All @@ -118,9 +118,9 @@ static int resolvfile_export(void)
if (count)
g_string_append_printf(content, "\n");

for (count = 0, list = g_list_last(resolvfile_list);
for (count = 0, list = g_list_first(resolvfile_list);
list && (count < MAXNS);
list = g_list_previous(list)) {
list = g_list_next(list)) {
struct resolvfile_entry *entry = list->data;

if (!entry->server)
Expand Down

0 comments on commit 797ea0e

Please sign in to comment.