* David Miller | 2006-10-26 17:02:21 [-0700]:
>Your email client turned the tabs into spaces in the patch making it
>useless.
Sorry my mistake! I am en route and I paste the patch into my editor, who eat
all tabs. One more time: sorry!
Check if user has CAP_NET_ADMIN capability to change
congestion control algorithm.
Signed-off-by: Hagen Paul Pfeifer <[EMAIL PROTECTED]>
---
net/ipv4/tcp_cong.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index af0aca1..c1ae2e9 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -10,6 +10,7 @@ #include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <linux/list.h>
+#include <linux/capability.h>
#include <net/tcp.h>
static DEFINE_SPINLOCK(tcp_cong_list_lock);
@@ -151,6 +152,9 @@ int tcp_set_congestion_control(struct so
struct tcp_congestion_ops *ca;
int err = 0;
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+
rcu_read_lock();
ca = tcp_ca_find(name);
if (ca == icsk->icsk_ca_ops)
--
1.4.1.1
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html