From eeafb4bc10f61939e08ad40f4855eb7941ee4c6f Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Mon, 19 Jun 2017 12:33:22 +0000 Subject: [PATCH] Flag poolcommand() (ippool -A and ippool -R) command line syntax errors. --- contrib/ipfilter/tools/ippool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/ipfilter/tools/ippool.c b/contrib/ipfilter/tools/ippool.c index e204b0074098..72c3bf309826 100644 --- a/contrib/ipfilter/tools/ippool.c +++ b/contrib/ipfilter/tools/ippool.c @@ -297,8 +297,14 @@ poolcommand(remove, argc, argv) case 'v' : opts |= OPT_VERBOSE; break; + default : + usage(argv[0]); + break; /* keep compiler happy */ } + if (argc - 1 - optind > 0) + usage(argv[0]); + if (opts & OPT_DEBUG) fprintf(stderr, "poolcommand: opts = %#x\n", opts);