Implement slow restransmission schedule in DHCP Renew/Rebind state.
Schedule DHCPREQUEST retransmission in Renewing/Rebinding states by
complying with RFC2131 fully, i.e. use the one half of remaining time
until T2 or lease expiry for the next DHCPREQUEST retransmission time.
This CL tries to modify existing DhcpReacquiringState to implement the
slow retransmission solution and only applies it to Renewing/Rebinding
state, and override the scheduleKick method in target states.
But DhcpRefreshingAddressState also extends from DhcpRebindingState,
obviously it's not correct to apply slow retransmission algorithm to
DhcpRefreshingAddressState where ideally it should send DHCPREQUEST as
soon as possible after roam to refresh IPv4 address. Create a new
DhcpRebindingBaseState and have both of DhcpRebindingState and
DhcpRefreshingAddressState extend from the base state, override the
scheduleKick method in DhcpRebindingState to comply with slow schedule
and keep DhcpRefreshingAddressState as-is to use the fast schedule.
The slow retransmission schedule is disabled by default, we can enable
it via public experiment launch to see if that works as expected, for
example, we can see the DHCPREQUEST packet count gets reduced obviously
in renewing/rebinding state via A/B testing.
Bug: 229923479
Test: atest NetworkStackIntegrationTests
Change-Id: I8d92059216f947c3ec9bc1d48935dd46b3633651
3 files changed