summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/tools/ipf.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/tools/ipf.c')
-rw-r--r--contrib/ipfilter/tools/ipf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/ipfilter/tools/ipf.c b/contrib/ipfilter/tools/ipf.c
index 901728b..1660631 100644
--- a/contrib/ipfilter/tools/ipf.c
+++ b/contrib/ipfilter/tools/ipf.c
@@ -408,14 +408,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;
OpenPOWER on IntegriCloud