Loading core/java/com/android/server/net/NetlinkTracker.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,19 @@ public class NetlinkTracker extends BaseNetworkObserver { } } } } @Override public void interfaceRemoved(String iface) { maybeLog("interfaceRemoved", iface); if (mInterfaceName.equals(iface)) { // Our interface was removed. Clear our LinkProperties and tell our owner that they are // now empty. Note that from the moment that the interface is removed, any further // interface-specific messages (e.g., RTM_DELADDR) will not reach us, because the netd // code that parses them will not be able to resolve the ifindex to an interface name. clearLinkProperties(); mCallback.update(); } } @Override @Override public void addressUpdated(String iface, LinkAddress address) { public void addressUpdated(String iface, LinkAddress address) { if (mInterfaceName.equals(iface)) { if (mInterfaceName.equals(iface)) { Loading services/core/java/com/android/server/connectivity/Tethering.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1211,6 +1211,11 @@ public class Tethering extends BaseNetworkObserver { Log.e(TAG, "Error Tethering: " + e.toString()); Log.e(TAG, "Error Tethering: " + e.toString()); setLastError(ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR); setLastError(ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR); try { mNMService.untetherInterface(mIfaceName); } catch (Exception ee) { Log.e(TAG, "Error untethering after failure!" + ee.toString()); } transitionTo(mInitialState); transitionTo(mInitialState); return; return; } } Loading services/net/java/android/net/ip/IpManager.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -302,6 +302,7 @@ public class IpManager extends StateMachine { }) { }) { @Override @Override public void interfaceAdded(String iface) { public void interfaceAdded(String iface) { super.interfaceAdded(iface); if (mClatInterfaceName.equals(iface)) { if (mClatInterfaceName.equals(iface)) { mCallback.setNeighborDiscoveryOffload(false); mCallback.setNeighborDiscoveryOffload(false); } } Loading @@ -309,6 +310,7 @@ public class IpManager extends StateMachine { @Override @Override public void interfaceRemoved(String iface) { public void interfaceRemoved(String iface) { super.interfaceRemoved(iface); if (mClatInterfaceName.equals(iface)) { if (mClatInterfaceName.equals(iface)) { // TODO: consider sending a message to the IpManager main // TODO: consider sending a message to the IpManager main // StateMachine thread, in case "NDO enabled" state becomes // StateMachine thread, in case "NDO enabled" state becomes Loading Loading
core/java/com/android/server/net/NetlinkTracker.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,19 @@ public class NetlinkTracker extends BaseNetworkObserver { } } } } @Override public void interfaceRemoved(String iface) { maybeLog("interfaceRemoved", iface); if (mInterfaceName.equals(iface)) { // Our interface was removed. Clear our LinkProperties and tell our owner that they are // now empty. Note that from the moment that the interface is removed, any further // interface-specific messages (e.g., RTM_DELADDR) will not reach us, because the netd // code that parses them will not be able to resolve the ifindex to an interface name. clearLinkProperties(); mCallback.update(); } } @Override @Override public void addressUpdated(String iface, LinkAddress address) { public void addressUpdated(String iface, LinkAddress address) { if (mInterfaceName.equals(iface)) { if (mInterfaceName.equals(iface)) { Loading
services/core/java/com/android/server/connectivity/Tethering.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1211,6 +1211,11 @@ public class Tethering extends BaseNetworkObserver { Log.e(TAG, "Error Tethering: " + e.toString()); Log.e(TAG, "Error Tethering: " + e.toString()); setLastError(ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR); setLastError(ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR); try { mNMService.untetherInterface(mIfaceName); } catch (Exception ee) { Log.e(TAG, "Error untethering after failure!" + ee.toString()); } transitionTo(mInitialState); transitionTo(mInitialState); return; return; } } Loading
services/net/java/android/net/ip/IpManager.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -302,6 +302,7 @@ public class IpManager extends StateMachine { }) { }) { @Override @Override public void interfaceAdded(String iface) { public void interfaceAdded(String iface) { super.interfaceAdded(iface); if (mClatInterfaceName.equals(iface)) { if (mClatInterfaceName.equals(iface)) { mCallback.setNeighborDiscoveryOffload(false); mCallback.setNeighborDiscoveryOffload(false); } } Loading @@ -309,6 +310,7 @@ public class IpManager extends StateMachine { @Override @Override public void interfaceRemoved(String iface) { public void interfaceRemoved(String iface) { super.interfaceRemoved(iface); if (mClatInterfaceName.equals(iface)) { if (mClatInterfaceName.equals(iface)) { // TODO: consider sending a message to the IpManager main // TODO: consider sending a message to the IpManager main // StateMachine thread, in case "NDO enabled" state becomes // StateMachine thread, in case "NDO enabled" state becomes Loading