svn commit: r313441 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools
Cy Schubert
cy at FreeBSD.org
Wed Feb 8 13:37:58 UTC 2017
Author: cy
Date: Wed Feb 8 13:37:57 2017
New Revision: 313441
URL: https://svnweb.freebsd.org/changeset/base/313441
Log:
MFC r312777, r312780:
Issue an error message when an incorrect flush argument is encountered
(and style fixup).
Modified:
stable/10/contrib/ipfilter/tools/ipf.c
Directory Properties:
stable/10/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/contrib/ipfilter/tools/ipf.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/10/contrib/ipfilter/tools/ipf.c
==============================================================================
--- stable/10/contrib/ipfilter/tools/ipf.c Wed Feb 8 09:47:38 2017 (r313440)
+++ stable/10/contrib/ipfilter/tools/ipf.c Wed Feb 8 13:37:57 2017 (r313441)
@@ -409,13 +409,16 @@ static void flushfilter(arg, filter)
closedevice();
return;
}
-
- if (strchr(arg, 'i') || strchr(arg, 'I'))
+ else if (strchr(arg, 'i') || strchr(arg, 'I'))
fl = FR_INQUE;
- if (strchr(arg, 'o') || strchr(arg, 'O'))
+ else if (strchr(arg, 'o') || strchr(arg, 'O'))
fl = FR_OUTQUE;
- if (strchr(arg, 'a') || strchr(arg, 'A'))
+ else if (strchr(arg, 'a') || strchr(arg, 'A'))
fl = FR_OUTQUE|FR_INQUE;
+ else {
+ fprintf(stderr, "Incorrect flush argument: %s\n", arg);
+ usage();
+ }
if (opts & OPT_INACTIVE)
fl |= FR_INACTIVE;
rem = fl;
More information about the svn-src-stable
mailing list