There is no need to reset name server information when we enter
online state. Online state is entered via ready state which
has setup DNS servers, there is no DNS information change when
going from ready to online so same name server information can
be still used in online state.

The effect of this change is that search domains are not lost
when we enter online state. Previously search domain information
were lost and user needed to set them manually again.
---
 src/service.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/service.c b/src/service.c
index d586147..86e6fed 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5777,7 +5777,12 @@ int __connman_service_ipconfig_indicate_state(struct 
connman_service *service,
                service->state_ipv6 = new_state;
        }
 
-       update_nameservers(service);
+       /*
+        * No need to update name servers if we went to online,
+        * the name servers from ready state are still valid.
+        */
+       if (new_state != CONNMAN_SERVICE_STATE_ONLINE)
+               update_nameservers(service);
 
        return service_indicate_state(service);
 }
-- 
1.8.3.1

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to