On Fri, 2015-12-04 at 07:28 -0800, Naveen Singh wrote:
In case of DHCP server not being available and eventually device
failing to renew its IP address, I am observing following:
1. Connman service state is left to online.
2. Although the connman_ipconfig structure entries for ipv4 address is
cleared out, connman never generated service property changed event.
This probably is because DHCP renewal process never feeds back to
service state machine from where we generate these events. At this
point if we run connmanctl, for ipv4 configuration it will still show
the old IP address.
This looks like a bug needing fixing. The state should be disconnected
or configuration and eventually ready if IPv4LL is an option for this
service. Provided that IPv6 is not already online for this service.
3. I am not sure how IPV4LL would be handled.
Not sure if we can do anything for 1 or not as connman service state
is an OR of ipv4 service state and ipv6 service state. But for sure 2
looks like an issue. Currently there is no API to indicate clearing of
IP address. I am working on a patch to have an API which would
indicate generating of a Service property changed API when IP address
is set to NULL. But before that I wanted to get the feedback on the
current behavior and find out if this is an intended behavior or a
I don't think there is a need for an new API here. When service state is
updated, a new State property is sent. It seems it all depends on the
non-information that DHCP lost its address, which when fixed will
resolve all three points above.