tcp: make sysctl_tcp_ecn namespace aware
As per suggestion from Eric Dumazet this patch makes tcp_ecn sysctl namespace aware. The reason behind this patch is to ease the testing of ecn problems on the internet and allows applications to tune their own use of ecn. Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: David Miller <davem@davemloft.net> Cc: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
71bcdba06d
commit
5d134f1c1f
@@ -537,13 +537,6 @@ static struct ctl_table ipv4_table[] = {
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
{
|
||||
.procname = "tcp_ecn",
|
||||
.data = &sysctl_tcp_ecn,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
{
|
||||
.procname = "tcp_dsack",
|
||||
.data = &sysctl_tcp_dsack,
|
||||
@@ -849,6 +842,13 @@ static struct ctl_table ipv4_net_table[] = {
|
||||
.mode = 0644,
|
||||
.proc_handler = ipv4_ping_group_range,
|
||||
},
|
||||
{
|
||||
.procname = "tcp_ecn",
|
||||
.data = &init_net.ipv4.sysctl_tcp_ecn,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
{
|
||||
.procname = "tcp_mem",
|
||||
.maxlen = sizeof(init_net.ipv4.sysctl_tcp_mem),
|
||||
@@ -882,6 +882,8 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
|
||||
&net->ipv4.sysctl_icmp_ratemask;
|
||||
table[6].data =
|
||||
&net->ipv4.sysctl_ping_group_range;
|
||||
table[7].data =
|
||||
&net->ipv4.sysctl_tcp_ecn;
|
||||
|
||||
/* Don't export sysctls to unprivileged users */
|
||||
if (net->user_ns != &init_user_ns)
|
||||
|
Reference in New Issue
Block a user