Hi Marcel,

On 07/28/2011 02:13 PM, Marcel Holtmann wrote:
Hi Jukka,

  src/connman.h  |    3 +++
  src/ipconfig.c |   40 +++++++++++++++++++++++++++++++++++++++-
  2 files changed, 42 insertions(+), 1 deletions(-)

@@ -2169,9 +2198,18 @@ int __connman_ipconfig_save(struct connman_ipconfig 
*ipconfig,
        case CONNMAN_IPCONFIG_METHOD_FIXED:
        case CONNMAN_IPCONFIG_METHOD_MANUAL:
                break;
+       case CONNMAN_IPCONFIG_METHOD_DHCP:
+               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);
+               /* fall through */

I am against storing the last IP address from DHCP on disk. What is this
good for?

I have been running this patch on my meego netbook and it has been very useful. Now I get the same IP address back almost always which makes it easy to ssh to the device and I do not have to constantly check my IP address in netbook (of course this is perhaps a useful use case for me only). The DHCP REQUESTED IP address option is just a hint to the server anyway.


When you leave the current network to switch to a different one or when
you shutdown your laptop, why bother with trying to keep the same
address. I rather not actually.

Hmm, I would rather do actually :)

There is some more discussion here
https://bugs.meego.com/show_bug.cgi?id=21068


When connected to the same network and roaming between access points,
then yes, you should keep the same address, but that is only valid as
long as ConnMan is actually running.

Regards

Marcel


Jukka
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to