summaryrefslogtreecommitdiff
path: root/src/ipconfig.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-05-06 13:06:32 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-05-06 14:33:56 +0300
commit5f9ba9675250f311aefec203e154d7f06e2cc5c1 (patch)
tree98ffe87aa82dc1818c3bea1b6f610a44ddcc7f75 /src/ipconfig.c
parent17b972d79b623de57b4d08335d7eb23a5cea71ae (diff)
downloadconnman-5f9ba9675250f311aefec203e154d7f06e2cc5c1.tar.gz
connman-5f9ba9675250f311aefec203e154d7f06e2cc5c1.tar.bz2
connman-5f9ba9675250f311aefec203e154d7f06e2cc5c1.zip
ipconfig: Save last used DHCPv6 address
This is needed when implementing CONFIRM message decision logic.
Diffstat (limited to 'src/ipconfig.c')
-rw-r--r--src/ipconfig.c9
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) {