rpms/kernel/devel linux-2.6-net-suppress-msgs.patch,NONE,1.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sat Feb 4 04:16:58 UTC 2006


Author: davej

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9882

Added Files:
	linux-2.6-net-suppress-msgs.patch 
Log Message:
hush net layer msgs


linux-2.6-net-suppress-msgs.patch:
 include/net/sock.h |    8 ++++----
 net/Kconfig        |    7 +++++++
 2 files changed, 11 insertions(+), 4 deletions(-)

--- NEW FILE linux-2.6-net-suppress-msgs.patch ---

If you are on a hostile network, or are running protocol tests, you can
easily get the logged swamped by messages about bad UDP and ICMP packets.
This turns those messages off unless a config option is enabled.

Signed-off-by: Stephen Hemminger <shemminger at osdl.org>

--- br-2.6.orig/include/net/sock.h
+++ br-2.6/include/net/sock.h
@@ -1354,12 +1354,12 @@ extern int sock_get_timestamp(struct soc
  *	Enable debug/info messages 
  */
 
-#if 0
-#define NETDEBUG(fmt, args...)	do { } while (0)
-#define LIMIT_NETDEBUG(fmt, args...) do { } while(0)
-#else
+#ifdef CONFIG_NETDEBUG
 #define NETDEBUG(fmt, args...)	printk(fmt,##args)
 #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0)
+#else
+#define NETDEBUG(fmt, args...)	do { } while (0)
+#define LIMIT_NETDEBUG(fmt, args...) do { } while(0)
 #endif
 
 /*
--- br-2.6.orig/net/Kconfig
+++ br-2.6/net/Kconfig
@@ -27,6 +27,13 @@ if NET
 
 menu "Networking options"
 
+config NETDEBUG
+	bool "Network packet debugging"
+	help
+	  You can say Y here if you want to get additional messages useful in
+	  debugging bad packets, but can overwhelm logs under denial of service
+	  attacks.
+
 source "net/packet/Kconfig"
 source "net/unix/Kconfig"
 source "net/xfrm/Kconfig"





More information about the fedora-cvs-commits mailing list