diff options
-rw-r--r-- | src/ipconfig.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ipconfig.c b/src/ipconfig.c index 6927936f..9de73aa7 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -2222,6 +2222,15 @@ int __connman_ipconfig_save(struct connman_ipconfig *ipconfig, key = g_strdup_printf("%sprivacy", prefix); g_key_file_set_string(keyfile, identifier, key, privacy); g_free(key); + + key = g_strdup_printf("%sDHCP.LastAddress", prefix); + if (ipconfig->last_dhcp_address != NULL && + 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); } switch (ipconfig->method) { |