Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2020 11:26:49 +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: r358064 - in head/contrib/ipfilter: man tools
Message-ID:  <202002181126.01IBQnR6016189@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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