diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2026-03-12 14:24:42 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2026-03-24 04:27:20 +0000 |
| commit | 66d66dd0f6f83926980fc1d68dd366c0057350c5 (patch) | |
| tree | 1af39f329967126bb1cb5e9b64a15de3b8a49861 | |
| parent | ab74151e8d097b263237942c0b12277098bc9533 (diff) | |
pfctl: always warn if a duplicate rule was detected
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
| -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 5a4668416b5b..a7bba4055b06 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2615,13 +2615,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->rdr); |
