On Thu, Dec 10, 2020 at 10:42:40AM +0000, Holesch, Simon (GED-SDD1) wrote:
Here are the relevant parts of RFC 2131:
> 4.4.5 Reacquisition and expiration
> If no DHCPACK arrives before time T2, the client moves to REBINDING
> state and sends (via broadcast) a DHCPREQUEST message to extend its
> If the lease expires before the client receives a DHCPACK, the client
> moves to INIT state, MUST immediately stop any other network
> processing and requests network initialization parameters as if the
> client were uninitialized.
One option would be to use CLOCK_BOOTTIME (instead of
CLOCK_BOOTTIME_ALARM, see timer_create(2)), which continues to run
during suspend, but doesn't wake up the system. But I'm not aware of a
way to prevent the client to use the IP address right after wakeup.
That's why I used the CLOCK_BOOTTIME_ALARM clock.
In this case the DHCP code needs to be made aware of the power state
transitions. In hindsight, CLOCK_BOOTTIME_ALARM was not the best
Anyway, I think the best way forward is to either revert the commit or
change it to use the original clock id. This will give some time to
figure out how to teach the DHCP the power states.