diff options
author | kn <kn@cvs.openbsd.org> | 2019-01-11 01:56:55 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2019-01-11 01:56:55 +0000 |
commit | b91757e91a2808b17750d5ac32aebebfaeb5eef9 (patch) | |
tree | 048280e679f6e1e9761d4f9f637482f64ebdba61 /sbin/pfctl/pfctl.c | |
parent | d8ec5cced53c9b968b538b250734d4bdb7f2c932 (diff) |
When creating tables inside anchors, pfctl warned about namespace
collisions with global tables, but only in certain cases and with
limited information sometimes leaving users clueless.
Deferring the check to process_tabledefs() where tables are eventually
created, both anchor and table name are known which allows for checking
all existing anchors.
With this, warn on all duplicates even in dry-runs (`-n') and print
quoted names so they can be copied to fix configurations right away.
No functional change in parsing or ruleset production.
Discussed with and OK sashan
Diffstat (limited to 'sbin/pfctl/pfctl.c')
-rw-r--r-- | sbin/pfctl/pfctl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 349d73ac2bd..362fc58e7b8 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.363 2019/01/10 22:22:51 kn Exp $ */ +/* $OpenBSD: pfctl.c,v 1.364 2019/01/11 01:56:54 kn Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2693,8 +2693,6 @@ main(int argc, char *argv[]) if (pfctl_rules(dev, rulesopt, opts, optimize, anchorname, NULL)) error = 1; - else if (!(opts & PF_OPT_NOACTION)) - warn_namespace_collision(NULL); } if (opts & PF_OPT_ENABLE) |