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
This commit is contained in:
Jason Simmons
2012-06-14 11:16:14 -07:00
parent 61c0fc41e1
commit 1d28fef92e

View File

@@ -221,6 +221,10 @@ public class EthernetDataTracker implements NetworkStateTracker {
mNetworkInfo.setExtraInfo(mHwAddr);
}
}
// if a DHCP client had previously been started for this interface, then stop it
NetworkUtils.stopDhcp(mIface);
reconnect();
break;
}