diff options
author | Xiao Ma <xiaom@google.com> | 2020-02-03 02:26:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-02-03 02:26:03 +0000 |
commit | 715e482e018dee94eb219688761610f7ff169aed (patch) | |
tree | 1a95b5a4854caf09aaa42726b2949c4a4ac852c3 /src/android/net/dhcp/DhcpClient.java | |
parent | 16fe4543a2dd6392b9104612d35370adf44ffec6 (diff) | |
parent | 16b21efcabb807cc00bc408b53f71a88e2d0744d (diff) |
Merge "Notify IpClient DHCP process success before configuring Interface."
Diffstat (limited to 'src/android/net/dhcp/DhcpClient.java')
-rw-r--r-- | src/android/net/dhcp/DhcpClient.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/android/net/dhcp/DhcpClient.java b/src/android/net/dhcp/DhcpClient.java index b429923..fbcd0f6 100644 --- a/src/android/net/dhcp/DhcpClient.java +++ b/src/android/net/dhcp/DhcpClient.java @@ -1348,6 +1348,11 @@ public class DhcpClient extends StateMachine { @Override public void enter() { super.enter(); + // We must call notifySuccess to apply the rest of the DHCP configuration (e.g., DNS + // servers) before adding the IP address to the interface. Otherwise, as soon as + // IpClient sees the IP address appear, it will enter provisioned state without any + // configuration information from DHCP. http://b/146850745. + notifySuccess(); mController.sendMessage(CMD_CONFIGURE_LINKADDRESS, mDhcpLease.ipAddress); } @@ -1632,7 +1637,6 @@ public class DhcpClient extends StateMachine { transitionTo(mStoppedState); } - notifySuccess(); scheduleLeaseTimers(); logTimeToBoundState(); } @@ -1701,6 +1705,7 @@ public class DhcpClient extends StateMachine { // the registered IpManager.Callback. IP address changes // are not supported here. acceptDhcpResults(results, mLeaseMsg); + notifySuccess(); transitionTo(mDhcpBoundState); } } else if (packet instanceof DhcpNakPacket) { |