From 1c2326b8af500adbb5864ea87afa94a0c6cf1ff0 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 15 Apr 2016 11:57:05 -0700 Subject: [PATCH] Stop creating a symlink for route. We should remove the "route" command because its output is irrelevant and misleading. This is because it only looks at the "main" routing table, which is a last resort routing table that is a) trumped by all other networks, b) empty except for directly-connected routes c) cannot even be used by non-root users. The proper way to understand device routing is to look at the output of "ip rule" and "ip route", both of which are already available. Example of how this is confusing: $ adb shell route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 160.249.218.72 * 255.255.255.248 U 0 0 0 rmnet_data0 192.168.144.0 * 255.255.240.0 U 0 0 0 wlan0 These aren't guaranteed to be used. For example, according to the output above 160.249.218.73 should go through rmnet_data0, but it doesn't: $ adb shell ip route get 160.249.218.73 160.249.218.73 via 192.168.159.254 dev wlan0 src 192.168.159.164 uid 0 cache Also, there is no default route. But the device has networking just fine: $ adb shell ip route get 8.8.8.8 8.8.8.8 via 192.168.159.254 dev wlan0 src 192.168.159.164 uid 0 cache This is a first step. If no device breaks, I'll stop building it too. In the meantime, it's still available as "toybox route". Bug: http://b/27603033 Change-Id: Ie444bfa9083e1f11b332d5d050a07cec48436e11 --- Android.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/Android.mk b/Android.mk index 7d460274..f37bf65d 100644 --- a/Android.mk +++ b/Android.mk @@ -322,7 +322,6 @@ ALL_TOOLS := \ rm \ rmdir \ rmmod \ - route \ runcon \ sed \ seq \ -- 2.11.0