[BusyBox-cvs] busybox/networking route.c,1.23,1.24
Manuel Novoa III
mjn3 at busybox.net
Wed Mar 10 07:42:40 UTC 2004
Update of /var/cvs/busybox/networking
In directory nail:/tmp/cvs-serv14034/networking
Modified Files:
route.c
Log Message:
In spite of the feature freeze, check in a complete rework of route which
fixes some bugs, adds some error checking, and removes _lots_ of bloat.
Text size on i386...
old new
ipv6 5425 3523
no ipv6 3143 2193
Index: route.c
===================================================================
RCS file: /var/cvs/busybox/networking/route.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- a/route.c 6 Mar 2004 22:11:44 -0000 1.23
+++ b/route.c 10 Mar 2004 07:42:38 -0000 1.24
@@ -23,47 +23,47 @@
* IPV6 support added by Bart Visscher <magick at linux-fan.com>
*/
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include "inet_common.h"
-#include <net/route.h>
-#include <net/if.h>
+/* 2004/03/09 Manuel Novoa III <mjn3 at codepoet.org>
+ *
+ * Rewritten to fix several bugs, add additional error checking, and
[...1122 lines suppressed...]
+ }
+
+ /* Check verb. At the moment, must be add, del, or delete. */
+ what = kw_lookup(tbl_verb, &argv);
+ if (!what || !*argv) { /* Unknown verb or no more args. */
+ bb_show_usage();
}
#ifdef CONFIG_FEATURE_IPV6
- if (af == AF_INET6)
- return INET6_setroute(what, 0, argv + 2);
+ if (opt & ROUTE_OPT_INET6)
+ INET6_setroute(what, argv);
+ else
#endif
- return INET_setroute(what, 0, argv + 2);
+ INET_setroute(what, argv);
+
+ return EXIT_SUCCESS;
}
More information about the busybox-cvs
mailing list