diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/netns/ipv4.h | 2 | ||||
| -rw-r--r-- | include/net/tcp.h | 9 | 
2 files changed, 7 insertions, 4 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 2ae2b8372cf..9b78862014a 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -61,6 +61,8 @@ struct netns_ipv4 {  	int sysctl_icmp_ratemask;  	int sysctl_icmp_errors_use_inbound_ifaddr; +	int sysctl_tcp_ecn; +  	kgid_t sysctl_ping_group_range[2];  	long sysctl_tcp_mem[3]; diff --git a/include/net/tcp.h b/include/net/tcp.h index aed42c78515..614af8b7758 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -266,7 +266,6 @@ extern int sysctl_tcp_abort_on_overflow;  extern int sysctl_tcp_max_orphans;  extern int sysctl_tcp_fack;  extern int sysctl_tcp_reordering; -extern int sysctl_tcp_ecn;  extern int sysctl_tcp_dsack;  extern int sysctl_tcp_wmem[3];  extern int sysctl_tcp_rmem[3]; @@ -504,7 +503,8 @@ static inline __u32 cookie_v4_init_sequence(struct sock *sk,  #endif  extern __u32 cookie_init_timestamp(struct request_sock *req); -extern bool cookie_check_timestamp(struct tcp_options_received *opt, bool *); +extern bool cookie_check_timestamp(struct tcp_options_received *opt, +				struct net *net, bool *ecn_ok);  /* From net/ipv6/syncookies.c */  extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb); @@ -728,11 +728,12 @@ struct tcp_skb_cb {   * notifications, we disable TCP ECN negociation.   */  static inline void -TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb) +TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb, +		struct net *net)  {  	const struct tcphdr *th = tcp_hdr(skb); -	if (sysctl_tcp_ecn && th->ece && th->cwr && +	if (net->ipv4.sysctl_tcp_ecn && th->ece && th->cwr &&  	    INET_ECN_is_not_ect(TCP_SKB_CB(skb)->ip_dsfield))  		inet_rsk(req)->ecn_ok = 1;  }  |