Catch correct exception for adding route fail
Bug: 149535950
Test: OFF/ON hotspot
Change-Id: Ic52e2b2f3cec1a39a70302c41ab67ec1a1a55b1a
diff --git a/Tethering/src/android/net/ip/IpServer.java b/Tethering/src/android/net/ip/IpServer.java
index f39e7af..2653b6d 100644
--- a/Tethering/src/android/net/ip/IpServer.java
+++ b/Tethering/src/android/net/ip/IpServer.java
@@ -756,7 +756,7 @@
final IpPrefix ipv4Prefix = new IpPrefix(mIpv4Address.getAddress(),
mIpv4Address.getPrefixLength());
NetdUtils.tetherInterface(mNetd, mIfaceName, ipv4Prefix);
- } catch (RemoteException | ServiceSpecificException e) {
+ } catch (RemoteException | ServiceSpecificException | IllegalStateException e) {
mLog.e("Error Tethering: " + e);
mLastError = TetheringManager.TETHER_ERROR_TETHER_IFACE_ERROR;
return;