svn commit: r319795 - head/contrib/ipfilter/tools

Cy Schubert cy at FreeBSD.org
Sat Jun 10 17:05:15 UTC 2017


Author: cy
Date: Sat Jun 10 17:05:14 2017
New Revision: 319795
URL: https://svnweb.freebsd.org/changeset/base/319795

Log:
  Disable the -O (output fields) option in poollist() (ippool -l) for
  now. The option does not presently work. However, similar functions in
  ipfstat (for state) and ipnat (for nat) do work and provide outputs that
  can be easily parsed by shell scripts or subsequently loaded into CSV
  files.  The intention here is to return to this option to make it work.
  I suspect the problem is in printpoolfields.c.

Modified:
  head/contrib/ipfilter/tools/ippool.c

Modified: head/contrib/ipfilter/tools/ippool.c
==============================================================================
--- head/contrib/ipfilter/tools/ippool.c	Sat Jun 10 16:42:39 2017	(r319794)
+++ head/contrib/ipfilter/tools/ippool.c	Sat Jun 10 17:05:14 2017	(r319795)
@@ -79,7 +79,7 @@ usage(prog)
 	fprintf(stderr, "\t-A [-dnv] [-m <name>] [-o <role>] [-S <seed>] [-t <type>]\n");
 	fprintf(stderr, "\t-f <file> [-dnuv]\n");
 	fprintf(stderr, "\t-F [-dv] [-o <role>] [-t <type>]\n");
-	fprintf(stderr, "\t-l [-dv] [-m <name>] [-t <type>] [-O <fields>]\n");
+	fprintf(stderr, "\t-l [-dv] [-m <name>] [-t <type>]\n");
 	fprintf(stderr, "\t-r [-dnv] [-m <name>] [-o <role>] [-t type] -i <ipaddr>[/netmask]\n");
 	fprintf(stderr, "\t-R [-dnv] [-m <name>] [-o <role>] [-t <type>]\n");
 	fprintf(stderr, "\t-s [-dtv] [-M <core>] [-N <namelist>]\n");
@@ -687,9 +687,16 @@ poollist(argc, argv)
 				return -1;
 			}
 			break;
+#if 0
 		case 'O' :
+			/* XXX This option does not work. This function as  */
+			/* XXX used by state and nat can be used to format  */
+			/* XXX output especially useful for scripting. It   */
+			/* XXX is left here with the intention of making    */
+			/* XXX it work for the same purpose at some point.  */
 			pool_fields = parsefields(poolfields, optarg);
 			break;
+#endif
 		case 't' :
 			type = gettype(optarg, NULL);
 			if (type == IPLT_NONE) {


More information about the svn-src-head mailing list