projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17b972d
)
ipconfig: Save last used DHCPv6 address
author
Jukka Rissanen
<jukka.rissanen@linux.intel.com>
Mon, 6 May 2013 10:06:32 +0000
(13:06 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 6 May 2013 11:33:56 +0000
(14:33 +0300)
This is needed when implementing CONFIRM message decision logic.
src/ipconfig.c
patch
|
blob
|
history
diff --git
a/src/ipconfig.c
b/src/ipconfig.c
index 6927936f44f6d6c367f4b4969e94cbacfa1ce5c2..9de73aa7e7f4e572b7336baac293df4e21891b1c 100644
(file)
--- 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) {