Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jun 2010 09:55:47 +0700 (NOVST)
From:      Eugene Grosbein <eugen@eg.sd.rdtc.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/147352: [net] [patch] replace printf() with log() for "Limiting ..."
Message-ID:  <201006030255.o532tl4R014904@eg.sd.rdtc.ru>
Resent-Message-ID: <201006030300.o5330D2j034154@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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 <sys/time.h>
 #include <sys/kernel.h>
 #include <sys/sysctl.h>
+#include <sys/syslog.h>
 
 #include <net/if.h>
 #include <net/if_types.h>
@@ -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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006030255.o532tl4R014904>