diff options
author | Cedric Berger <cedric@cvs.openbsd.org> | 2004-02-25 10:09:41 +0000 |
---|---|---|
committer | Cedric Berger <cedric@cvs.openbsd.org> | 2004-02-25 10:09:41 +0000 |
commit | 8bba8abfad86500a5a10298ce5348d3c6eece1c2 (patch) | |
tree | 144f926b1a0dead7803c9b958610360fd057e852 /sbin/pfctl | |
parent | 6c9829830dcef146e8c2b6bef3a43da6762111d5 (diff) |
Don't clear global stuff when an anchor is given in addition to -Fa.
Ok mcbride@ pb@
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pfctl.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 3baa00fc5ed..6f256b6a8bb 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.207 2004/02/19 21:37:01 cedric Exp $ */ +/* $OpenBSD: pfctl.c,v 1.208 2004/02/25 10:09:40 cedric Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1732,12 +1732,14 @@ main(int argc, char *argv[]) case 'a': pfctl_clear_rules(dev, opts, anchorname, rulesetname); pfctl_clear_nat(dev, opts, anchorname, rulesetname); - pfctl_clear_altq(dev, opts); - pfctl_clear_states(dev, ifaceopt, opts); - pfctl_clear_src_nodes(dev, opts); - pfctl_clear_stats(dev, opts); pfctl_clear_tables(anchorname, rulesetname, opts); - pfctl_clear_fingerprints(dev, opts); + if (!*anchorname && !*rulesetname) { + pfctl_clear_altq(dev, opts); + pfctl_clear_states(dev, ifaceopt, opts); + pfctl_clear_src_nodes(dev, opts); + pfctl_clear_stats(dev, opts); + pfctl_clear_fingerprints(dev, opts); + } break; case 'o': pfctl_clear_fingerprints(dev, opts); |