kern/127121: pf incorrect log priority

Jeff Wheelhouse jdw at wheelhouse.org
Fri Sep 5 21:20:06 UTC 2008


>Number:         127121
>Category:       kern
>Synopsis:       pf incorrect log priority
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 05 21:20:05 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Wheelhouse
>Release:        6.4-PRERELEASE
>Organization:
>Environment:
FreeBSD r2 6.4-PRERELEASE FreeBSD 6.4-PRERELEASE #0: Fri Sep  5 01:22:09 MST 2008     root at r2:/data/r2/freebsd6/obj/data/r2/freebsd6/src/sys/ROUTER  i386
>Description:

If round-robin load balancing is enabled, pf logs a message indicating which address was chosen for each new state that is created.  This produces a prodigious amount of information on a busy server, which can render the server unusable, but the message is logged at priority PF_DEBUG_MISC.

PF_DEBUG_MISC is identified as for "various errors."  Selecting a destination address is ordinary operation, not an error.

Therefore I believe the appropriate log level for this message is PF_DEBUG_NOISY.


>How-To-Repeat:
1. Run "pfctl -x misc" on a busy machine that uses round-robin load balancing. 
2. Cringe.
>Fix:
Change PF_DEBUG_MISC to PF_DEBUG_NOISY at line 2407 of pf.c in this revision:

/*      $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.34.2.8 2007/11/21 13:52:04 dha
rtmei Exp $     */
/*      $OpenBSD: pf.c,v 1.502.2.1 2006/05/02 22:55:52 brad Exp $ */

(Patch enclosed.)

Patch attached with submission follows:

--- pf.c.orig	2008-09-05 13:59:25.000000000 -0700
+++ pf.c	2008-09-05 13:59:59.000000000 -0700
@@ -2404,7 +2404,7 @@
 	if (*sn != NULL)
 		PF_ACPY(&(*sn)->raddr, naddr, af);
 
-	if (pf_status.debug >= PF_DEBUG_MISC &&
+	if (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);


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list