When Nameservers and IP Configurations are changed from manual to DHCP
simultaneously then in few scenarios connman's service was in
Configuration state while trying to remove nameservers_config from
service, so nameservers_config were not removed from resolv.conf. This
patch removes the nameservers_config with the index of service rather
than checking the service's connection state.
---
 src/service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/service.c b/src/service.c
index 29a632e..09c2c75 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3207,6 +3207,7 @@ static DBusMessage *set_property(DBusConnection *conn,
                GString *str;
                int index;
                const char *gw;
+               DBG("%s", name);
 
                if (__connman_provider_is_immutable(service->provider) ||
                                service->immutable)
@@ -3241,7 +3242,7 @@ static DBusMessage *set_property(DBusConnection *conn,
                        }
                }
 
-               remove_nameservers(service, -1, service->nameservers_config);
+               remove_nameservers(service, index, service->nameservers_config);
                g_strfreev(service->nameservers_config);
 
                if (str->len > 0) {
-- 
1.9.1

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

Reply via email to