Skip to content

Commit 1d28fef

Browse files
committed
Stop any running DHCP client before bringup up an Ethernet interface
If the system server is restarted, the dhcpcd_eth0 service may have already been started by the previous system server, and the new system server's attempts to start the dhcpcd will do nothing. Change-Id: Icfd480a5369eb9c7dfe86b43190294871a915529
1 parent 61c0fc4 commit 1d28fef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/java/android/net/EthernetDataTracker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ public void startMonitoring(Context context, Handler target) {
221221
mNetworkInfo.setExtraInfo(mHwAddr);
222222
}
223223
}
224+
225+
// if a DHCP client had previously been started for this interface, then stop it
226+
NetworkUtils.stopDhcp(mIface);
227+
224228
reconnect();
225229
break;
226230
}

0 commit comments

Comments
 (0)