From: Zhang zhengguang <[email protected]>

In __connman_ipconfig_save(), it will delete last address from
the config file if it can't get it, which will lead to dhcp last
address will be always NULL after a service is provisioned, and
dhcp last address can't be passed to dhcp client.

Signed-off-by: Zhang zhengguang <[email protected]>
---
 src/ipconfig.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/ipconfig.c b/src/ipconfig.c
index 9452125..b3232ab 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -2305,8 +2305,6 @@ int __connman_ipconfig_save(struct connman_ipconfig 
*ipconfig,
                                strlen(ipconfig->last_dhcp_address) > 0)
                        g_key_file_set_string(keyfile, identifier, key,
                                        ipconfig->last_dhcp_address);
-               else
-                       g_key_file_remove_key(keyfile, identifier, key, NULL);
                g_free(key);
 
                key = g_strdup_printf("%sDHCP.LastPrefixes", prefix);
@@ -2333,8 +2331,6 @@ int __connman_ipconfig_save(struct connman_ipconfig 
*ipconfig,
                                strlen(ipconfig->last_dhcp_address) > 0)
                        g_key_file_set_string(keyfile, identifier, key,
                                        ipconfig->last_dhcp_address);
-               else
-                       g_key_file_remove_key(keyfile, identifier, key, NULL);
                g_free(key);
                /* fall through */
        case CONNMAN_IPCONFIG_METHOD_UNKNOWN:
-- 
1.7.10.4

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

Reply via email to