From dc639f6676c9750986d85b31dcd46cb87431212b Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 11 Sep 2020 14:47:10 -0400 Subject: [PATCH] Hardcode local_network table name --- mobile/src/main/java/be/mygod/vpnhotspot/net/DhcpWorkaround.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/DhcpWorkaround.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/DhcpWorkaround.kt index 4c80803e..e0907eb7 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/DhcpWorkaround.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/DhcpWorkaround.kt @@ -34,7 +34,8 @@ object DhcpWorkaround : SharedPreferences.OnSharedPreferenceChangeListener { try { RootSession.use { try { - it.exec("$IP rule $action iif lo uidrange 0-0 lookup local_network priority 11000") + // ROUTE_TABLE_LOCAL_NETWORK: https://cs.android.com/android/platform/superproject/+/master:system/netd/server/RouteController.cpp;l=74;drc=b6dc40ac3d566d952d8445fc6ac796109c0cbc87 + it.exec("$IP rule $action iif lo uidrange 0-0 lookup 97 priority 11000") } catch (e: RoutingCommands.UnexpectedOutputException) { if (Routing.shouldSuppressIpError(e, enabled)) return@use Timber.w(IOException("Failed to tweak dhcp workaround rule", e))