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
@@ -179,7 +179,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
|
||||
memset(&tcp_opt, 0, sizeof(tcp_opt));
|
||||
tcp_parse_options(skb, &tcp_opt, &hash_location, 0, NULL);
|
||||
|
||||
if (!cookie_check_timestamp(&tcp_opt, &ecn_ok))
|
||||
if (!cookie_check_timestamp(&tcp_opt, sock_net(sk), &ecn_ok))
|
||||
goto out;
|
||||
|
||||
ret = NULL;
|
||||
|
||||
@@ -1027,7 +1027,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||
treq->rmt_addr = ipv6_hdr(skb)->saddr;
|
||||
treq->loc_addr = ipv6_hdr(skb)->daddr;
|
||||
if (!want_cookie || tmp_opt.tstamp_ok)
|
||||
TCP_ECN_create_request(req, skb);
|
||||
TCP_ECN_create_request(req, skb, sock_net(sk));
|
||||
|
||||
treq->iif = sk->sk_bound_dev_if;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user