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

Skip to content
Commit 16b21efc authored by Xiao Ma's avatar Xiao Ma
Browse files

Notify IpClient DHCP process success before configuring Interface.

This patch fixes the bug introduced by aosp/1169224 which moves
notifySuccess function to DhcpBoundState#enter. This behavior
is correct for DHCP reacquiring process (e.g. when client renews
or rebinds the previous leased IPv4 address, then enters Bound
state after receiving DHCPACK packet). However, this is incorrect
for DHCP solicit at the first time, since notifying IpClient DHCP
success after configuring interface causes mDhcpResult member is
still empty when handleLinkPropertiesUpdate is triggered by netd
completes configuring interface with new IPv4 address. Hence, new
Link Properties passed to wifi state machine doesn't contain the
available DNS servers received from DHCPACK.

Moving notifySuccess before sending CMD_CONFIGURE_LINKADDRESS cmd
to IpClient ensures mDhcpResult member has been initialize correctly
before assembling new LinkProperties.

Bug:146850745
Test: atest NetworkStackIntegrationTests NetworkStackTests
Change-Id: Ifb990ccc06c1374e616f71038b1811640821e954
parent ef60e461
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