Skip to content

n-dhcp4: fix state transitions on timer dispatch

Beniamino Galvani requested to merge bg/n-dhcp4-state-transitions-rh1773456 into master

Currently in any of the BOUND, RENEWING and REBINDING states the probe checks the expiration of T1, T2 and lifetime. This is not correct because, for example, if the timer fires in the RENEWING state, the probe must not transition to RENEWING again (i.e. check again that now >= T1). Note that there is no guarantee that the timer triggers exactly once for T1, T2 and lifetime expirations because the timer is also used for the retransmission logic in NDhcp4CConnection.

Therefore, add some checks to ensure that only correct transitions are allowed.

Merge request reports