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

Commit b81bb9b4 authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

Clear interface addresses upon disconnect



Change-Id: I8ce289cfc72babe894ce9f4d0119a2f2ac5f0859
Signed-off-by: default avatarIrfan Sheriff <isheriff@google.com>
Signed-off-by: default avatarYoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
parent 5a6b6240
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1192,7 +1192,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
                    }

                    if (mGroup.isGroupOwner()) {
                        stopDhcpServer();
                        stopDhcpServer(mGroup.getInterface());
                    } else {
                        if (DBG) logd("stop DHCP client");
                        mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_STOP_DHCP);
@@ -1412,9 +1412,10 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
        logd("Started Dhcp server on " + intf);
   }

    private void stopDhcpServer() {
    private void stopDhcpServer(String intf) {
        try {
            mNwService.stopTethering();
            mNwService.clearInterfaceAddresses(intf);
        } catch (Exception e) {
            loge("Error stopping Dhcp server" + e);
            return;