Loading core/java/android/os/INetworkManagementService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,11 @@ interface INetworkManagementService */ void setInterfaceUp(String iface); /** * Set interface IPv6 privacy extensions */ void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable); /** * Retrieves the network routes currently configured on the specified * interface Loading services/java/com/android/server/NetworkManagementService.java +14 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,20 @@ public class NetworkManagementService extends INetworkManagementService.Stub } } public void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable) throws IllegalStateException { String cmd = String.format("interface ipv6privacyextensions %s %s", iface, enable ? "enable" : "disable"); try { mConnector.doCommand(cmd); } catch (NativeDaemonConnectorException e) { throw new IllegalStateException( "Unable to communicate with native daemon to set ipv6privacyextensions - " + e); } } /* TODO: This is right now a IPv4 only function. Works for wifi which loses its IPv6 addresses on interface down, but we need to do full clean up here */ public void clearInterfaceAddresses(String iface) throws IllegalStateException { Loading wifi/java/android/net/wifi/WifiStateMachine.java +8 −6 Original line number Diff line number Diff line Loading @@ -1917,15 +1917,17 @@ public class WifiStateMachine extends StateMachine { Log.e(TAG, "Failed to reload STA firmware " + e); // continue } try { //A runtime crash can leave the interface up and //this affects connectivity when supplicant starts up. //Ensure interface is down before a supplicant start. try { mNwService.setInterfaceDown(mInterfaceName); //Set privacy extensions mNwService.setInterfaceIpv6PrivacyExtensions(mInterfaceName, true); } catch (RemoteException re) { if (DBG) Log.w(TAG, "Unable to bring down wlan interface: " + re); if (DBG) Log.w(TAG, "Unable to change interface settings: " + re); } catch (IllegalStateException ie) { if (DBG) Log.w(TAG, "Unable to bring down wlan interface: " + ie); if (DBG) Log.w(TAG, "Unable to change interface settings: " + ie); } if(WifiNative.startSupplicant()) { Loading Loading
core/java/android/os/INetworkManagementService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,11 @@ interface INetworkManagementService */ void setInterfaceUp(String iface); /** * Set interface IPv6 privacy extensions */ void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable); /** * Retrieves the network routes currently configured on the specified * interface Loading
services/java/com/android/server/NetworkManagementService.java +14 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,20 @@ public class NetworkManagementService extends INetworkManagementService.Stub } } public void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable) throws IllegalStateException { String cmd = String.format("interface ipv6privacyextensions %s %s", iface, enable ? "enable" : "disable"); try { mConnector.doCommand(cmd); } catch (NativeDaemonConnectorException e) { throw new IllegalStateException( "Unable to communicate with native daemon to set ipv6privacyextensions - " + e); } } /* TODO: This is right now a IPv4 only function. Works for wifi which loses its IPv6 addresses on interface down, but we need to do full clean up here */ public void clearInterfaceAddresses(String iface) throws IllegalStateException { Loading
wifi/java/android/net/wifi/WifiStateMachine.java +8 −6 Original line number Diff line number Diff line Loading @@ -1917,15 +1917,17 @@ public class WifiStateMachine extends StateMachine { Log.e(TAG, "Failed to reload STA firmware " + e); // continue } try { //A runtime crash can leave the interface up and //this affects connectivity when supplicant starts up. //Ensure interface is down before a supplicant start. try { mNwService.setInterfaceDown(mInterfaceName); //Set privacy extensions mNwService.setInterfaceIpv6PrivacyExtensions(mInterfaceName, true); } catch (RemoteException re) { if (DBG) Log.w(TAG, "Unable to bring down wlan interface: " + re); if (DBG) Log.w(TAG, "Unable to change interface settings: " + re); } catch (IllegalStateException ie) { if (DBG) Log.w(TAG, "Unable to bring down wlan interface: " + ie); if (DBG) Log.w(TAG, "Unable to change interface settings: " + ie); } if(WifiNative.startSupplicant()) { Loading