svn commit: r353078 - stable/11/contrib/ipfilter/tools

Cy Schubert cy at FreeBSD.org
Fri Oct 4 01:44:57 UTC 2019


Author: cy
Date: Fri Oct  4 01:44:56 2019
New Revision: 353078
URL: https://svnweb.freebsd.org/changeset/base/353078

Log:
  MFC r319820:
  
  Identify command line syntax errors in poolflush() (ippool -F).

Modified:
  stable/11/contrib/ipfilter/tools/ippool.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/ipfilter/tools/ippool.c
==============================================================================
--- stable/11/contrib/ipfilter/tools/ippool.c	Fri Oct  4 01:43:45 2019	(r353077)
+++ stable/11/contrib/ipfilter/tools/ippool.c	Fri Oct  4 01:44:56 2019	(r353078)
@@ -551,7 +551,13 @@ poolflush(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, "poolflush: opts = %#x\n", opts);


More information about the svn-src-stable mailing list