summaryrefslogtreecommitdiff
path: root/networking/libiproute/iproute.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-06-08 00:25:55 +0000
committerDenis Vlasenko2008-06-08 00:25:55 +0000
commit52a8d975da9c6b26fc7f6323a78556208cf0cd64 (patch)
tree7afa95c27f58ba436cff4276cdc88a7d52356a09 /networking/libiproute/iproute.c
parentb597564e4c1fefd641a5f26a4e53d8b65d5fdcdf (diff)
downloadbusybox-52a8d975da9c6b26fc7f6323a78556208cf0cd64.zip
busybox-52a8d975da9c6b26fc7f6323a78556208cf0cd64.tar.gz
ip: make numeric table work: "ip route list table 255". closes bug 3664.
function old new delta iproute_list_or_flush 1270 1300 +30
Diffstat (limited to 'networking/libiproute/iproute.c')
-rw-r--r--networking/libiproute/iproute.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 1f64794..59cbf80 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -576,8 +576,16 @@ static int iproute_list_or_flush(char **argv, int flush)
filter.tb = -1;
else if (parm == KW_all)
filter.tb = 0;
- else if (parm != KW_main)
+ else if (parm != KW_main) {
+#if ENABLE_FEATURE_IP_RULE
+ uint32_t tid;
+ if (rtnl_rttable_a2n(&tid, *argv))
+ invarg(*argv, "table");
+ filter.tb = tid;
+#else
invarg(*argv, "table");
+#endif
+ }
} else if (arg == KW_cache) {
/* The command 'ip route flush cache' is used by OpenSWAN.
* Assuming it's a synonym for 'ip route flush table cache' */