From 66a3af9d7c83e6b649caec4b6dd0cb252ddf76f1 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 27 Jan 2003 17:41:19 +0000 Subject: This seems sufficient for ifup and ifdown to actually work as advertised. Works for me (at least with glibc) --- networking/libiproute/ip_parse_common_args.c | 2 ++ networking/libiproute/ipaddress.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'networking/libiproute') diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c index ac9d949..4b4355a 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) diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 8843817..8eba90c 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c @@ -524,8 +524,10 @@ extern int ipaddr_list_or_flush(int argc, char **argv, int flush) exit(1); } if (filter.flushed == 0) { +#if 0 if (round == 0) fprintf(stderr, "Nothing to flush.\n"); +#endif fflush(stdout); return 0; } -- cgit v1.1