aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-03-08 23:41:08 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:05 -0400
commita2a316fd068c455c609ecc155dcfaa7e208d29fe (patch)
tree9839e2c7e05e9d25241fa7c7b27fd06214120292 /net
parentae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (diff)
[NET]: Replace CONFIG_NET_DEBUG with sysctl.
Covert network warning messages from a compile time to runtime choice. Removes kernel config option and replaces it with new /proc/sys/net/core/warnings. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/Kconfig7
-rw-r--r--net/core/sysctl_net_core.c8
-rw-r--r--net/core/utils.c2
3 files changed, 10 insertions, 7 deletions
diff --git a/net/Kconfig b/net/Kconfig
index 915657832d94..e2d9b3b9cda4 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -27,13 +27,6 @@ if NET
27 27
28menu "Networking options" 28menu "Networking options"
29 29
30config NETDEBUG
31 bool "Network packet debugging"
32 help
33 You can say Y here if you want to get additional messages useful in
34 debugging bad packets, but can overwhelm logs under denial of service
35 attacks.
36
37source "net/packet/Kconfig" 30source "net/packet/Kconfig"
38source "net/unix/Kconfig" 31source "net/unix/Kconfig"
39source "net/xfrm/Kconfig" 32source "net/xfrm/Kconfig"
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 1e75b1585460..b29712033dd4 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -136,6 +136,14 @@ ctl_table core_table[] = {
136 .mode = 0644, 136 .mode = 0644,
137 .proc_handler = &proc_dointvec 137 .proc_handler = &proc_dointvec
138 }, 138 },
139 {
140 .ctl_name = NET_CORE_WARNINGS,
141 .procname = "warnings",
142 .data = &net_msg_warn,
143 .maxlen = sizeof(int),
144 .mode = 0644,
145 .proc_handler = &proc_dointvec
146 },
139 { .ctl_name = 0 } 147 { .ctl_name = 0 }
140}; 148};
141 149
diff --git a/net/core/utils.c b/net/core/utils.c
index 07236c17fab9..34f08107b98e 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -32,6 +32,8 @@
32 32
33int net_msg_cost = 5*HZ; 33int net_msg_cost = 5*HZ;
34int net_msg_burst = 10; 34int net_msg_burst = 10;
35int net_msg_warn = 1;
36EXPORT_SYMBOL(net_msg_warn);
35 37
36/* 38/*
37 * All net warning printk()s should be guarded by this function. 39 * All net warning printk()s should be guarded by this function.