Stop building toybox route.
From the commit that stopped creating the symlink:
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
Bug: http://b/27603033
Change-Id: I40be0a7e2841144797a67f9aeb82b9097cec5400
diff --git a/.config b/.config
index aeea8aa..db28cb2 100644
--- a/.config
+++ b/.config
@@ -169,7 +169,7 @@
CONFIG_PKILL=y
# CONFIG_PING is not set
# CONFIG_RESET is not set
-CONFIG_ROUTE=y
+# CONFIG_ROUTE is not set
# CONFIG_SH is not set
# CONFIG_EXIT is not set
# CONFIG_CD is not set
diff --git a/Android.mk b/Android.mk
index 8833d2e..fdf76f6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -139,7 +139,6 @@
toys/pending/lsof.c \
toys/pending/more.c \
toys/pending/netstat.c \
- toys/pending/route.c \
toys/pending/tar.c \
toys/pending/tr.c \
toys/pending/traceroute.c \
diff --git a/generated/config.h b/generated/config.h
index 27e216b..4f346fc 100644
--- a/generated/config.h
+++ b/generated/config.h
@@ -316,8 +316,8 @@
#define USE_PING(...)
#define CFG_RESET 0
#define USE_RESET(...)
-#define CFG_ROUTE 1
-#define USE_ROUTE(...) __VA_ARGS__
+#define CFG_ROUTE 0
+#define USE_ROUTE(...)
#define CFG_SH 0
#define USE_SH(...)
#define CFG_EXIT 0
diff --git a/generated/flags.h b/generated/flags.h
index 7f62f3b..c75abbe 100644
--- a/generated/flags.h
+++ b/generated/flags.h
@@ -2093,9 +2093,9 @@
#undef FLAG_w
#endif
-// route ?neA: ?neA:
+// route ?neA:
#undef OPTSTR_route
-#define OPTSTR_route "?neA:"
+#define OPTSTR_route 0
#ifdef CLEANUP_route
#undef CLEANUP_route
#undef FOR_route
@@ -4820,9 +4820,9 @@
#ifndef TT
#define TT this.route
#endif
-#define FLAG_A (1<<0)
-#define FLAG_e (1<<1)
-#define FLAG_n (1<<2)
+#define FLAG_A (FORCED_FLAG<<0)
+#define FLAG_e (FORCED_FLAG<<1)
+#define FLAG_n (FORCED_FLAG<<2)
#endif
#ifdef FOR_runcon