Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 780c09e8 authored by Xiao Ma's avatar Xiao Ma
Browse files

Have DhcpClient transit to StoppedState on lease renew failure.

When receiving DHCPNAK or renewed lease doesn't match the current
IP address or IP lease has expired in renew/rebind state, transit
DhcpClient state machine to StoppedState instead of INIT state.
Bascially this is more reasonable to rollback to the StoppedState
and wait for the following command from wifi(e.g. restart IpClient
immediately for a new provisioning) when renew failure happens.

Since IpClient will call onProvisioningFailure callback eventually
(IPv4 link address will be cleared from the interface) to tell wifi
IPv4 provisioning failure and wifi stops IpClient, however, before
that DhcpClient has transited to INIT state and broadcasted DISCOVER,
which seems not being helpful and error-prone to cause race.

Bug: 204723906
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: Ia7eaaa444e00495bf953b4a221aa406d6cc39d2d
parent e5a6619d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment