aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute/ip_parse_common_args.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-01-27 17:41:19 +0000
committerEric Andersen <andersen@codepoet.org>2003-01-27 17:41:19 +0000
commit66a3af9d7c83e6b649caec4b6dd0cb252ddf76f1 (patch)
treef9e264e3e3a687505070dd8707eb29f35ad97234 /networking/libiproute/ip_parse_common_args.c
parent22237017a7abee1bc6c664c255a783e9dfe2b037 (diff)
downloadbusybox-66a3af9d7c83e6b649caec4b6dd0cb252ddf76f1.tar.gz
This seems sufficient for ifup and ifdown to actually work
as advertised. Works for me (at least with glibc)
Diffstat (limited to 'networking/libiproute/ip_parse_common_args.c')
-rw-r--r--networking/libiproute/ip_parse_common_args.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c
index ac9d94916..4b4355ac1 100644
--- a/networking/libiproute/ip_parse_common_args.c
+++ b/networking/libiproute/ip_parse_common_args.c
@@ -47,6 +47,8 @@ void ip_parse_common_args(int *argcp, char ***argvp)
if (matches(opt, "-family") == 0) {
argc--;
argv++;
+ if (! argv[1])
+ show_usage();
if (strcmp(argv[1], "inet") == 0)
preferred_family = AF_INET;
else if (strcmp(argv[1], "inet6") == 0)