From 86b653ed7eedb0d6cc3315bea132f847f748066d Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Mon, 11 Jan 2021 19:28:01 +0100 Subject: [PATCH] pf: quiet debugging printfs Only log these when debugging output is enabled. --- sys/netpfil/pf/pf_ruleset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c index 31a4ed879937..0cc0c357d59d 100644 --- a/sys/netpfil/pf/pf_ruleset.c +++ b/sys/netpfil/pf/pf_ruleset.c @@ -306,7 +306,7 @@ pf_kanchor_setup(struct pf_krule *r, const struct pf_kruleset *s, strlcpy(path, s->anchor->path, MAXPATHLEN); while (name[0] == '.' && name[1] == '.' && name[2] == '/') { if (!path[0]) { - printf("pf_anchor_setup: .. beyond root\n"); + DPFPRINTF("pf_anchor_setup: .. beyond root\n"); rs_free(path); return (1); } @@ -328,7 +328,7 @@ pf_kanchor_setup(struct pf_krule *r, const struct pf_kruleset *s, ruleset = pf_find_or_create_kruleset(path); rs_free(path); if (ruleset == NULL || ruleset->anchor == NULL) { - printf("pf_anchor_setup: ruleset\n"); + DPFPRINTF("pf_anchor_setup: ruleset\n"); return (1); } r->anchor = ruleset->anchor;