From nobody@FreeBSD.org  Fri Sep  5 21:12:17 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A18E21065680
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Sep 2008 21:12:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C98A8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Sep 2008 21:12:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m85LCHvx047529
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 5 Sep 2008 21:12:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m85LCH24047528;
	Fri, 5 Sep 2008 21:12:17 GMT
	(envelope-from nobody)
Message-Id: <200809052112.m85LCH24047528@www.freebsd.org>
Date: Fri, 5 Sep 2008 21:12:17 GMT
From: Jeff Wheelhouse <jdw@wheelhouse.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pf incorrect log priority
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         127121
>Category:       kern
>Synopsis:       [pf] [patch] pf incorrect log priority
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-pf
>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:  Sat Sep 06 01:01:14 UTC 2008
>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@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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-pf 
Responsible-Changed-By: remko 
Responsible-Changed-When: Fri Sep 5 22:35:05 UTC 2008 
Responsible-Changed-Why:  
reassign to pf team 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127121 
>Unformatted:
