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
This commit is contained in:
Cy Schubert 2020-02-18 11:26:49 +00:00
parent aae38d10b4
commit 9658b6b3f4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358064
2 changed files with 6 additions and 2 deletions

View File

@ -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>]

View File

@ -381,13 +381,17 @@ 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;
break;