Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2017 12:19:05 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320187 - head/contrib/ipfilter/tools
Message-ID:  <201706211219.v5LCJ55v014082@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Wed Jun 21 12:19:05 2017
New Revision: 320187
URL: https://svnweb.freebsd.org/changeset/base/320187

Log:
  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:
  head/contrib/ipfilter/tools/ippool.c

Modified: head/contrib/ipfilter/tools/ippool.c
==============================================================================
--- head/contrib/ipfilter/tools/ippool.c	Wed Jun 21 08:12:07 2017	(r320186)
+++ head/contrib/ipfilter/tools/ippool.c	Wed Jun 21 12:19:05 2017	(r320187)
@@ -298,7 +298,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?201706211219.v5LCJ55v014082>