Loading services/core/java/com/android/server/NetworkManagementService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1310,9 +1310,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub mConnector.execute("tether", "interface", "remove", iface); mConnector.execute("tether", "interface", "remove", iface); } catch (NativeDaemonConnectorException e) { } catch (NativeDaemonConnectorException e) { throw e.rethrowAsParcelableException(); throw e.rethrowAsParcelableException(); } } finally { removeInterfaceFromLocalNetwork(iface); removeInterfaceFromLocalNetwork(iface); } } } @Override @Override public String[] listTetheredInterfaces() { public String[] listTetheredInterfaces() { Loading services/core/java/com/android/server/connectivity/tethering/IPv6TetheringInterfaceServices.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.net.RouteInfo; import android.net.ip.RouterAdvertisementDaemon; import android.net.ip.RouterAdvertisementDaemon; import android.net.ip.RouterAdvertisementDaemon.RaParams; import android.net.ip.RouterAdvertisementDaemon.RaParams; import android.os.INetworkManagementService; import android.os.INetworkManagementService; import android.os.ServiceSpecificException; import android.os.RemoteException; import android.os.RemoteException; import android.util.Log; import android.util.Log; import android.util.Slog; import android.util.Slog; Loading Loading @@ -205,7 +206,7 @@ class IPv6TetheringInterfaceServices { final String dnsString = dns.getHostAddress(); final String dnsString = dns.getHostAddress(); try { try { netd.interfaceDelAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); netd.interfaceDelAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); } catch (RemoteException e) { } catch (ServiceSpecificException | RemoteException e) { Log.e(TAG, "Failed to remove local dns IP: " + dnsString, e); Log.e(TAG, "Failed to remove local dns IP: " + dnsString, e); } } } } Loading @@ -222,7 +223,7 @@ class IPv6TetheringInterfaceServices { final String dnsString = dns.getHostAddress(); final String dnsString = dns.getHostAddress(); try { try { netd.interfaceAddAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); netd.interfaceAddAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); } catch (RemoteException e) { } catch (ServiceSpecificException | RemoteException e) { Log.e(TAG, "Failed to add local dns IP: " + dnsString, e); Log.e(TAG, "Failed to add local dns IP: " + dnsString, e); newDnses.remove(dns); newDnses.remove(dns); } } Loading @@ -231,7 +232,7 @@ class IPv6TetheringInterfaceServices { try { try { netd.tetherApplyDnsInterfaces(); netd.tetherApplyDnsInterfaces(); } catch (RemoteException e) { } catch (ServiceSpecificException | RemoteException e) { Log.e(TAG, "Failed to update local DNS caching server"); Log.e(TAG, "Failed to update local DNS caching server"); if (newDnses != null) newDnses.clear(); if (newDnses != null) newDnses.clear(); } } Loading Loading
services/core/java/com/android/server/NetworkManagementService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1310,9 +1310,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub mConnector.execute("tether", "interface", "remove", iface); mConnector.execute("tether", "interface", "remove", iface); } catch (NativeDaemonConnectorException e) { } catch (NativeDaemonConnectorException e) { throw e.rethrowAsParcelableException(); throw e.rethrowAsParcelableException(); } } finally { removeInterfaceFromLocalNetwork(iface); removeInterfaceFromLocalNetwork(iface); } } } @Override @Override public String[] listTetheredInterfaces() { public String[] listTetheredInterfaces() { Loading
services/core/java/com/android/server/connectivity/tethering/IPv6TetheringInterfaceServices.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.net.RouteInfo; import android.net.ip.RouterAdvertisementDaemon; import android.net.ip.RouterAdvertisementDaemon; import android.net.ip.RouterAdvertisementDaemon.RaParams; import android.net.ip.RouterAdvertisementDaemon.RaParams; import android.os.INetworkManagementService; import android.os.INetworkManagementService; import android.os.ServiceSpecificException; import android.os.RemoteException; import android.os.RemoteException; import android.util.Log; import android.util.Log; import android.util.Slog; import android.util.Slog; Loading Loading @@ -205,7 +206,7 @@ class IPv6TetheringInterfaceServices { final String dnsString = dns.getHostAddress(); final String dnsString = dns.getHostAddress(); try { try { netd.interfaceDelAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); netd.interfaceDelAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); } catch (RemoteException e) { } catch (ServiceSpecificException | RemoteException e) { Log.e(TAG, "Failed to remove local dns IP: " + dnsString, e); Log.e(TAG, "Failed to remove local dns IP: " + dnsString, e); } } } } Loading @@ -222,7 +223,7 @@ class IPv6TetheringInterfaceServices { final String dnsString = dns.getHostAddress(); final String dnsString = dns.getHostAddress(); try { try { netd.interfaceAddAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); netd.interfaceAddAddress(mIfName, dnsString, RFC7421_IP_PREFIX_LENGTH); } catch (RemoteException e) { } catch (ServiceSpecificException | RemoteException e) { Log.e(TAG, "Failed to add local dns IP: " + dnsString, e); Log.e(TAG, "Failed to add local dns IP: " + dnsString, e); newDnses.remove(dns); newDnses.remove(dns); } } Loading @@ -231,7 +232,7 @@ class IPv6TetheringInterfaceServices { try { try { netd.tetherApplyDnsInterfaces(); netd.tetherApplyDnsInterfaces(); } catch (RemoteException e) { } catch (ServiceSpecificException | RemoteException e) { Log.e(TAG, "Failed to update local DNS caching server"); Log.e(TAG, "Failed to update local DNS caching server"); if (newDnses != null) newDnses.clear(); if (newDnses != null) newDnses.clear(); } } Loading