diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2002-12-05 14:10:46 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2002-12-05 14:10:46 +0000 |
commit | e76af9eac7256245d4c68901020b3f3aaf8edf17 (patch) | |
tree | 87d059e00d49b9ab649c7d277400d7e2b63e7ded /sbin/pfctl/pfctl.c | |
parent | c068975ce58223759df9e1a77b5a8509c665c18c (diff) |
one step further to "program output is valid program input" and the related
extra regress testing opportunities (an excellent idea by markus@).
only print rule numbers in case of pfctl -v -v; but not with pfctl -v.
ok markus@ frantzen@ mcbride@
Diffstat (limited to 'sbin/pfctl/pfctl.c')
-rw-r--r-- | sbin/pfctl/pfctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index e192733baac..d4f9848a58f 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.97 2002/12/05 12:26:55 mcbride Exp $ */ +/* $OpenBSD: pfctl.c,v 1.98 2002/12/05 14:10:45 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -463,7 +463,8 @@ pfctl_show_rules(int dev, int opts, int format) case 1: if (pr.rule.label[0]) { if (opts & PF_OPT_VERBOSE) - print_rule(&pr.rule); + print_rule(&pr.rule, + opts & PF_OPT_VERBOSE2); else printf("%s ", pr.rule.label); printf("%llu %llu %llu\n", @@ -472,7 +473,7 @@ pfctl_show_rules(int dev, int opts, int format) } break; default: - print_rule(&pr.rule); + print_rule(&pr.rule, opts & PF_OPT_VERBOSE2); if (opts & PF_OPT_VERBOSE) printf("[ Evaluations: %-8llu Packets: %-8llu " "Bytes: %-10llu States: %-6u]\n\n", @@ -694,7 +695,7 @@ pfctl_add_rule(struct pfctl *pf, struct pf_rule *r) err(1, "DIOCADDRULE"); } if (pf->opts & PF_OPT_VERBOSE) - print_rule(r); + print_rule(r, pf->opts & PF_OPT_VERBOSE2); pfctl_clear_pool(&r->rt_pool); } return (0); |