diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-19 10:47:40 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-19 10:47:40 +0000 |
commit | db39042564c9d7f22702a3719642accfccf1a007 (patch) | |
tree | 544332a1852062d9bc4234dfa39c136f5136d70d | |
parent | 5a79b222c3e7d32ae85157b6b050c4dbba83393c (diff) | |
download | busybox-w32-db39042564c9d7f22702a3719642accfccf1a007.tar.gz busybox-w32-db39042564c9d7f22702a3719642accfccf1a007.tar.bz2 busybox-w32-db39042564c9d7f22702a3719642accfccf1a007.zip |
Manousaridis Angelos writes:
Another issue I found was with the iproute utility. While using another
program I found that it failed because the "ip route del" command was
not found. I looked at the full iproute implementation and this command
exists. The busybox version has the "ip route delete" command. I have
created a patch which makes the "ip route del" command an alias to the
"ip route delete" command.
git-svn-id: svn://busybox.net/trunk/busybox@8124 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | networking/libiproute/iproute.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 70ddf9f41..0fdf7987e 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -808,7 +808,7 @@ static int iproute_get(int argc, char **argv) | |||
808 | int do_iproute(int argc, char **argv) | 808 | int do_iproute(int argc, char **argv) |
809 | { | 809 | { |
810 | const char *ip_route_commands[] = { "add", "append", "change", "chg", | 810 | const char *ip_route_commands[] = { "add", "append", "change", "chg", |
811 | "delete", "get", "list", "show", "prepend", "replace", "test", "flush", 0 }; | 811 | "delete", "del", "get", "list", "show", "prepend", "replace", "test", "flush", 0 }; |
812 | unsigned short command_num = 6; | 812 | unsigned short command_num = 6; |
813 | unsigned int flags = 0; | 813 | unsigned int flags = 0; |
814 | int cmd = RTM_NEWROUTE; | 814 | int cmd = RTM_NEWROUTE; |
@@ -828,20 +828,21 @@ int do_iproute(int argc, char **argv) | |||
828 | flags = NLM_F_REPLACE; | 828 | flags = NLM_F_REPLACE; |
829 | break; | 829 | break; |
830 | case 4: /* delete */ | 830 | case 4: /* delete */ |
831 | case 5: /* del */ | ||
831 | cmd = RTM_DELROUTE; | 832 | cmd = RTM_DELROUTE; |
832 | break; | 833 | break; |
833 | case 5: /* get */ | 834 | case 6: /* get */ |
834 | return iproute_get(argc-1, argv+1); | 835 | return iproute_get(argc-1, argv+1); |
835 | case 6: /* list */ | 836 | case 7: /* list */ |
836 | case 7: /* show */ | 837 | case 8: /* show */ |
837 | return iproute_list_or_flush(argc-1, argv+1, 0); | 838 | return iproute_list_or_flush(argc-1, argv+1, 0); |
838 | case 8: /* prepend */ | 839 | case 9: /* prepend */ |
839 | flags = NLM_F_CREATE; | 840 | flags = NLM_F_CREATE; |
840 | case 9: /* replace */ | 841 | case 10: /* replace */ |
841 | flags = NLM_F_CREATE|NLM_F_REPLACE; | 842 | flags = NLM_F_CREATE|NLM_F_REPLACE; |
842 | case 10: /* test */ | 843 | case 11: /* test */ |
843 | flags = NLM_F_EXCL; | 844 | flags = NLM_F_EXCL; |
844 | case 11: /* flush */ | 845 | case 12: /* flush */ |
845 | return iproute_list_or_flush(argc-1, argv+1, 1); | 846 | return iproute_list_or_flush(argc-1, argv+1, 1); |
846 | default: | 847 | default: |
847 | bb_error_msg_and_die("Unknown command %s", *argv); | 848 | bb_error_msg_and_die("Unknown command %s", *argv); |