From b91757e91a2808b17750d5ac32aebebfaeb5eef9 Mon Sep 17 00:00:00 2001 From: kn Date: Fri, 11 Jan 2019 01:56:55 +0000 Subject: 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 --- sbin/pfctl/pfctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sbin/pfctl/pfctl.c') 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) -- cgit v1.2.3