summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-05-06 10:06:32 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-05-06 11:33:56 (GMT)
commit5f9ba9675250f311aefec203e154d7f06e2cc5c1 (patch)
tree98ffe87aa82dc1818c3bea1b6f610a44ddcc7f75 /src
parent17b972d79b623de57b4d08335d7eb23a5cea71ae (diff)
downloadconnman-5f9ba9675250f311aefec203e154d7f06e2cc5c1.zip
connman-5f9ba9675250f311aefec203e154d7f06e2cc5c1.tar.gz
connman-5f9ba9675250f311aefec203e154d7f06e2cc5c1.tar.bz2
ipconfig: Save last used DHCPv6 address
This is needed when implementing CONFIRM message decision logic.
Diffstat (limited to 'src')
-rw-r--r--src/ipconfig.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ipconfig.c b/src/ipconfig.c
index 6927936..9de73aa 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) {