Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 2019 02:02:12 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r353087 - stable/11/contrib/ipfilter/tools
Message-ID:  <201910040202.x9422C0C061728@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Fri Oct  4 02:02:12 2019
New Revision: 353087
URL: https://svnweb.freebsd.org/changeset/base/353087

Log:
  MFC r320187:
  
  Fix -S handling within poolcommand(). Specifying a seed (-S) is only
  valid when adding a pool (ippool -A), not when removing a pool
  (ippool -R). It is a command line syntax error if specifying a seed (-S)
  is specified when emoving a pool (-R).

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 02:01:23 2019	(r353086)
+++ stable/11/contrib/ipfilter/tools/ippool.c	Fri Oct  4 02:02:12 2019	(r353087)
@@ -292,7 +292,10 @@ poolcommand(remove, argc, argv)
 			opts |= OPT_NORESOLVE;
 			break;
 		case 'S' :
-			iph.iph_seed = atoi(optarg);
+			if (remove == 0)
+				iph.iph_seed = atoi(optarg);
+			else
+				usage(argv[0]);
 			break;
 		case 'v' :
 			opts |= OPT_VERBOSE;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910040202.x9422C0C061728>