git: 498cca14836d - main - pf: selecting pf_map_addr is not an error

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Sat, 16 Oct 2021 12:44:36 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=498cca14836da0408841cca8101e481e32151886

commit 498cca14836da0408841cca8101e481e32151886
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-10-16 07:32:15 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-10-16 07:32:15 +0000

    pf: selecting pf_map_addr is not an error
    
    When a redirection/nat IP address is selected by pf_map_addr it is
    logged with PF_DEBUG_MISC level. This one according to the manual means
    "Generate debug messages for various errors". Selecting an IP address is
    not an error, it's a normal function of pf for route-to, nat and some
    other operations. Therefore PF_DEBUG_NOISY level should be choosen which
    is means "Generate debug messages for common conditions".
    
    PR:             259184
    Submitted by:   Kajetan Staszkiewicz <vegeta tuxpowered.net>
    Sponsored by:   InnoGames GmbH
---
 sys/netpfil/pf/pf_lb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c
index 3da27c7df26d..26fe17a9c3b4 100644
--- a/sys/netpfil/pf/pf_lb.c
+++ b/sys/netpfil/pf/pf_lb.c
@@ -364,7 +364,7 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr,
 			return (1);
 
 		PF_ACPY(naddr, &(*sn)->raddr, af);
-		if (V_pf_status.debug >= PF_DEBUG_MISC) {
+		if (V_pf_status.debug >= PF_DEBUG_NOISY) {
 			printf("pf_map_addr: src tracking maps ");
 			pf_print_host(saddr, 0, af);
 			printf(" to ");
@@ -539,7 +539,7 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr,
 	if (*sn != NULL)
 		PF_ACPY(&(*sn)->raddr, naddr, af);
 
-	if (V_pf_status.debug >= PF_DEBUG_MISC &&
+	if (V_pf_status.debug >= PF_DEBUG_NOISY &&
 	    (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) {
 		printf("pf_map_addr: selected address ");
 		pf_print_host(naddr, 0, af);