kern/147352: [net] [patch] replace printf() with log() for
"Limiting ..."
Eugene Grosbein
eugen at eg.sd.rdtc.ru
Thu Jun 3 03:00:14 UTC 2010
>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 at 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:
More information about the freebsd-bugs
mailing list