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.

while this might be nice an useful, it is not something that I am
shooting for actually. You would have Zeroconf/Avahi for finding the IP
address of your SSH server.

If we leave one network, then I do not expect to get back with the same
address. Especially since we are not even taken the lease time into
account, I consider this a security issue. We are sending our previous
IP in clear text over a WiFi network. Not really a good idea from my
point of view.

> > 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

Switching between networks can not be solved this way anyway. If the
network is different, we must assume a new IP. Otherwise you get into
serious trouble. And I do not wanna tell the other network what my
previous IP was in a different network.

> > 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.

I need to point this out once more, when roaming between networks, we
clearly wanna keep the old IP address. That is the use case that I am
looking for.

Regards

Marcel


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

Reply via email to