Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. [PATCH 0/1] Fix nameserver and search domain ordering when
      writing resolv.conf (Sam Nazarko)
   2. Re: [PATCH 1/1] Fix nameserver and search domain ordering
      when writing resolv.conf (Sam Nazarko)


----------------------------------------------------------------------

Message: 1
Date: Thu, 21 Jul 2016 17:37:27 +0000
From: Sam Nazarko <[email protected]>
To: "[email protected]" <[email protected]>
Subject: [PATCH 0/1] Fix nameserver and search domain ordering when
        writing resolv.conf
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

This patch fixes an issue where DNS servers and search domains are written to 
resolv.conf in the reverse order. This has caused problems with some OSMC users 
that
have relied on the primary DNS server to be listed first and have a faulty or 
intermittent
secondary DNS server. While I am in agreement that these users should fix their 
secondary
DNS server, we should still respect the ordering that they configure or get via 
DHCP.

I previously submitted a patch to this mailing list in hope of addressing an 
issue
however the ConnMan mailing list disappeared for a while and I lost my post. 
This
new patch resolves both search domains and DNS servers being out of order. 

Sam Nazarko

    

------------------------------

Message: 2
Date: Thu, 21 Jul 2016 17:39:24 +0000
From: Sam Nazarko <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Re: [PATCH 1/1] Fix nameserver and search domain ordering
        when writing resolv.conf
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

diff --git a/src/resolver.c b/src/resolver.c
index fbe4be7..c4adbc6 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -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)
@@ -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)
-- 
2.7.4
________________________________________
From: connman <[email protected]> on behalf of Sam Nazarko 
<[email protected]>
Sent: 21 July 2016 18:37
To: [email protected]
Subject: [PATCH 0/1] Fix nameserver and search domain ordering when writing 
resolv.conf

Hi,

This patch fixes an issue where DNS servers and search domains are written to
resolv.conf in the reverse order. This has caused problems with some OSMC users 
that
have relied on the primary DNS server to be listed first and have a faulty or 
intermittent
secondary DNS server. While I am in agreement that these users should fix their 
secondary
DNS server, we should still respect the ordering that they configure or get via 
DHCP.

I previously submitted a patch to this mailing list in hope of addressing an 
issue
however the ConnMan mailing list disappeared for a while and I lost my post. 
This
new patch resolves both search domains and DNS servers being out of order.

Sam Nazarko


_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 9, Issue 12
**************************************

Reply via email to