diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2013-01-05 11:10:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-07 00:09:56 -0500 |
commit | 5d134f1c1f36166e8a738de92c4d2f4c262ff91b (patch) | |
tree | 6d1504359c7f1ade1c79da0e468a2a409af5c56c /net/ipv4/tcp_ipv4.c | |
parent | 71bcdba06db91ceaaffe019b6c958b5faf06012a (diff) |
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>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 54139fa514e6..c6ce9ca98d23 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1568,7 +1568,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1568 | goto drop_and_free; | 1568 | goto drop_and_free; |
1569 | 1569 | ||
1570 | if (!want_cookie || tmp_opt.tstamp_ok) | 1570 | if (!want_cookie || tmp_opt.tstamp_ok) |
1571 | TCP_ECN_create_request(req, skb); | 1571 | TCP_ECN_create_request(req, skb, sock_net(sk)); |
1572 | 1572 | ||
1573 | if (want_cookie) { | 1573 | if (want_cookie) { |
1574 | isn = cookie_v4_init_sequence(sk, skb, &req->mss); | 1574 | isn = cookie_v4_init_sequence(sk, skb, &req->mss); |
@@ -2888,6 +2888,7 @@ EXPORT_SYMBOL(tcp_prot); | |||
2888 | 2888 | ||
2889 | static int __net_init tcp_sk_init(struct net *net) | 2889 | static int __net_init tcp_sk_init(struct net *net) |
2890 | { | 2890 | { |
2891 | net->ipv4.sysctl_tcp_ecn = 2; | ||
2891 | return 0; | 2892 | return 0; |
2892 | } | 2893 | } |
2893 | 2894 | ||