1 diff -urN busybox-1.4.1/networking/ip.c busybox-1.4.1-iproute/networking/ip.c
2 --- busybox-1.4.1/networking/ip.c 2007-01-24 22:34:34.000000000 +0100
3 +++ busybox-1.4.1-iproute/networking/ip.c 2007-01-27 14:07:05.000000000 +0100
5 if (ENABLE_FEATURE_IP_LINK && matches(argv[1], "link") == 0) {
6 ret = do_iplink(argc-2, argv+2);
8 - if (ENABLE_FEATURE_IP_TUNNEL &&
9 - (matches(argv[1], "tunnel") == 0 || strcmp(argv[1], "tunl") == 0)) {
10 + if (ENABLE_FEATURE_IP_TUNNEL
11 + && (matches(argv[1], "tunnel") == 0 || strcmp(argv[1], "tunl") == 0)
13 ret = do_iptunnel(argc-2, argv+2);
15 if (ENABLE_FEATURE_IP_RULE && matches(argv[1], "rule") == 0) {
16 diff -urN busybox-1.4.1/networking/libiproute/iproute.c busybox-1.4.1-iproute/networking/libiproute/iproute.c
17 --- busybox-1.4.1/networking/libiproute/iproute.c 2007-01-24 22:34:33.000000000 +0100
18 +++ busybox-1.4.1-iproute/networking/libiproute/iproute.c 2007-01-27 14:07:05.000000000 +0100
21 int do_iproute(int argc, char **argv)
23 - static const char * const ip_route_commands[] =
24 - { "add", "append", "change", "chg", "delete", "get",
25 - "list", "show", "prepend", "replace", "test", "flush", 0 };
26 + static const char * const ip_route_commands[] = {
27 + /*0-3*/ "add", "append", "change", "chg",
28 + /*4-7*/ "delete", "get", "list", "show",
29 + /*8..*/ "prepend", "replace", "test", "flush", 0
32 unsigned int flags = 0;
33 int cmd = RTM_NEWROUTE;
35 command_num = index_in_substr_array(ip_route_commands, *argv);
37 switch (command_num) {
40 flags = NLM_F_CREATE|NLM_F_EXCL;
44 flags = NLM_F_REPLACE;
52 return iproute_get(argc-1, argv+1);
57 return iproute_list_or_flush(argc-1, argv+1, 0);
58 - case 9: /* prepend */
59 + case 8: /* prepend */
61 - case 10: /* replace */
62 + case 9: /* replace */
63 flags = NLM_F_CREATE|NLM_F_REPLACE;
67 - case 12: /* flush */
68 + case 11: /* flush */
69 return iproute_list_or_flush(argc-1, argv+1, 1);
71 bb_error_msg_and_die("unknown command %s", *argv);