svn commit: r358064 - in head/contrib/ipfilter: man tools

Cy Schubert cy at FreeBSD.org
Tue Feb 18 11:26:50 UTC 2020


Author: cy
Date: Tue Feb 18 11:26:49 2020
New Revision: 358064
URL: https://svnweb.freebsd.org/changeset/base/358064

Log:
  As with ipf(8), give ippool(8) the ability to load IP pools from multiple
  files. This allows for loading, during the same invocation of ippool, of
  multiple sources of input using multiple tools to concurrently maintain the
  files such as fail2ban, macro preprocessors, and manually.
  
  MFC after:	1 week

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

Modified: head/contrib/ipfilter/man/ippool.8
==============================================================================
--- head/contrib/ipfilter/man/ippool.8	Tue Feb 18 10:28:09 2020	(r358063)
+++ head/contrib/ipfilter/man/ippool.8	Tue Feb 18 11:26:49 2020	(r358064)
@@ -12,7 +12,7 @@ ippool \- user interface to the IPFilter pools
 -A [-dnv] [-m <name>] [-o <role>] [-S <seed>] -t <type>
 .br
 .B ippool
--f <file> [-dnuv]
+-f <file> [-dnuv] [-f <file [-dnuv]] ...
 .br
 .B ippool
 -F [-dv] [-o <role>] [-t <type>]

Modified: head/contrib/ipfilter/tools/ippool.c
==============================================================================
--- head/contrib/ipfilter/tools/ippool.c	Tue Feb 18 10:28:09 2020	(r358063)
+++ head/contrib/ipfilter/tools/ippool.c	Tue Feb 18 11:26:49 2020	(r358064)
@@ -381,12 +381,16 @@ loadpoolfile(argc, argv, infile)
 {
 	int c;
 
-	while ((c = getopt(argc, argv, "dnuv")) != -1)
+	while ((c = getopt(argc, argv, "dnuvf:")) != -1)
 		switch (c)
 		{
 		case 'd' :
 			opts |= OPT_DEBUG;
 			ippool_yydebug++;
+			break;
+		case 'f' :
+			if (loadpoolfile(argc, argv, optarg) != 0)
+				return(-1);
 			break;
 		case 'n' :
 			opts |= OPT_DONOTHING|OPT_DONTOPEN;


More information about the svn-src-head mailing list