From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 3 03:00:14 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EAA4106567D for ; Thu, 3 Jun 2010 03:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D3A838FC17 for ; Thu, 3 Jun 2010 03:00:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5330Dic034156 for ; Thu, 3 Jun 2010 03:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5330D2j034154; Thu, 3 Jun 2010 03:00:13 GMT (envelope-from gnats) Resent-Date: Thu, 3 Jun 2010 03:00:13 GMT Resent-Message-Id: <201006030300.o5330D2j034154@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eugene Grosbein Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E0A91065670 for ; Thu, 3 Jun 2010 02:55:51 +0000 (UTC) (envelope-from eugen@eg.sd.rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [62.231.161.221]) by mx1.freebsd.org (Postfix) with ESMTP id 9E62B8FC1C for ; Thu, 3 Jun 2010 02:55:50 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.4/8.14.4) with ESMTP id o532tlgv014905 for ; Thu, 3 Jun 2010 09:55:47 +0700 (NOVST) (envelope-from eugen@eg.sd.rdtc.ru) Received: (from eugen@localhost) by eg.sd.rdtc.ru (8.14.4/8.14.3/Submit) id o532tl4R014904; Thu, 3 Jun 2010 09:55:47 +0700 (NOVST) (envelope-from eugen) Message-Id: <201006030255.o532tl4R014904@eg.sd.rdtc.ru> Date: Thu, 3 Jun 2010 09:55:47 +0700 (NOVST) From: Eugene Grosbein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/147352: [net] [patch] replace printf() with log() for "Limiting ..." X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eugene Grosbein List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2010 03:00:14 -0000 >Number: 147352 >Category: kern >Synopsis: [net] [patch] replace printf() with log() for "Limiting ..." >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jun 03 03:00:13 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 8.0-STABLE i386 >Organization: RDTC JSC >Environment: System: FreeBSD eg.sd.rdtc.ru 8.0-STABLE FreeBSD 8.0-STABLE #13: Fri Apr 30 11:44:37 NOVST 2010 root@eg.sd.rdtc.ru:/usr/local/obj/usr/local/src/sys/EG i386 >Description: Lots of messages 'Limiting open port RST response from 114 to 100 packets/sec' flood dmesg buffer when FreeBSD server is attached or portscanned often. Such diagnostics should be manageble with syslog.conf and not printed with kernel printf. >How-To-Repeat: See above. >Fix: --- sys/netinet/ip_icmp.c.orig 2010-06-03 09:26:47.000000000 +0700 +++ sys/netinet/ip_icmp.c 2010-06-03 09:31:24.000000000 +0700 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -994,7 +995,7 @@ * the previous behaviour at the expense of added complexity. */ if (V_icmplim_output && opps > V_icmplim) - printf("Limiting %s from %d to %d packets/sec\n", + log(LOG_WARNING, "Limiting %s from %d to %d packets/sec\n", r->type, opps, V_icmplim); } return 0; /* okay to send packet */ >Release-Note: >Audit-Trail: >Unformatted: