diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2026-03-12 14:24:42 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2026-03-25 09:58:28 +0000 |
| commit | e79818ec36efafc994d8c5a912dcb94986c038c5 (patch) | |
| tree | e27a268732801c426f6cf21bfaa699743b433a16 | |
| parent | 958dbc87e9c59a2e9f83d84115ce03fb96e9b249 (diff) | |
pfctl: always warn if a duplicate rule was detected
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 66d66dd0f6f83926980fc1d68dd366c0057350c5)
| -rw-r--r-- | sbin/pfctl/pfctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index d6bb0ae7f46f..518b32085565 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2043,13 +2043,13 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth) } } - if (pf->opts & PF_OPT_VERBOSE) { + if (pf->opts & PF_OPT_VERBOSE || was_present) { INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2)); print_rule(r, name, pf->opts & PF_OPT_VERBOSE2, pf->opts & PF_OPT_NUMERIC); if (was_present) - printf(" -- rule was already present"); + printf(" -- rule was already present\n"); } path[len] = '\0'; pfctl_clear_pool(&r->rpool); |
