aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index aed42c785153..cf0694d4ad60 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -266,7 +266,6 @@ extern int sysctl_tcp_abort_on_overflow;
266extern int sysctl_tcp_max_orphans; 266extern int sysctl_tcp_max_orphans;
267extern int sysctl_tcp_fack; 267extern int sysctl_tcp_fack;
268extern int sysctl_tcp_reordering; 268extern int sysctl_tcp_reordering;
269extern int sysctl_tcp_ecn;
270extern int sysctl_tcp_dsack; 269extern int sysctl_tcp_dsack;
271extern int sysctl_tcp_wmem[3]; 270extern int sysctl_tcp_wmem[3];
272extern int sysctl_tcp_rmem[3]; 271extern int sysctl_tcp_rmem[3];
@@ -280,7 +279,6 @@ extern int sysctl_tcp_dma_copybreak;
280extern int sysctl_tcp_nometrics_save; 279extern int sysctl_tcp_nometrics_save;
281extern int sysctl_tcp_moderate_rcvbuf; 280extern int sysctl_tcp_moderate_rcvbuf;
282extern int sysctl_tcp_tso_win_divisor; 281extern int sysctl_tcp_tso_win_divisor;
283extern int sysctl_tcp_abc;
284extern int sysctl_tcp_mtu_probing; 282extern int sysctl_tcp_mtu_probing;
285extern int sysctl_tcp_base_mss; 283extern int sysctl_tcp_base_mss;
286extern int sysctl_tcp_workaround_signed_windows; 284extern int sysctl_tcp_workaround_signed_windows;
@@ -504,7 +502,8 @@ static inline __u32 cookie_v4_init_sequence(struct sock *sk,
504#endif 502#endif
505 503
506extern __u32 cookie_init_timestamp(struct request_sock *req); 504extern __u32 cookie_init_timestamp(struct request_sock *req);
507extern bool cookie_check_timestamp(struct tcp_options_received *opt, bool *); 505extern bool cookie_check_timestamp(struct tcp_options_received *opt,
506 struct net *net, bool *ecn_ok);
508 507
509/* From net/ipv6/syncookies.c */ 508/* From net/ipv6/syncookies.c */
510extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb); 509extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb);
@@ -728,11 +727,12 @@ struct tcp_skb_cb {
728 * notifications, we disable TCP ECN negociation. 727 * notifications, we disable TCP ECN negociation.
729 */ 728 */
730static inline void 729static inline void
731TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb) 730TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb,
731 struct net *net)
732{ 732{
733 const struct tcphdr *th = tcp_hdr(skb); 733 const struct tcphdr *th = tcp_hdr(skb);
734 734
735 if (sysctl_tcp_ecn && th->ece && th->cwr && 735 if (net->ipv4.sysctl_tcp_ecn && th->ece && th->cwr &&
736 INET_ECN_is_not_ect(TCP_SKB_CB(skb)->ip_dsfield)) 736 INET_ECN_is_not_ect(TCP_SKB_CB(skb)->ip_dsfield))
737 inet_rsk(req)->ecn_ok = 1; 737 inet_rsk(req)->ecn_ok = 1;
738} 738}
@@ -1045,6 +1045,10 @@ static inline bool tcp_prequeue(struct sock *sk, struct sk_buff *skb)
1045 if (sysctl_tcp_low_latency || !tp->ucopy.task) 1045 if (sysctl_tcp_low_latency || !tp->ucopy.task)
1046 return false; 1046 return false;
1047 1047
1048 if (skb->len <= tcp_hdrlen(skb) &&
1049 skb_queue_len(&tp->ucopy.prequeue) == 0)
1050 return false;
1051
1048 __skb_queue_tail(&tp->ucopy.prequeue, skb); 1052 __skb_queue_tail(&tp->ucopy.prequeue, skb);
1049 tp->ucopy.memory += skb->truesize; 1053 tp->ucopy.memory += skb->truesize;
1050 if (tp->ucopy.memory > sk->sk_rcvbuf) { 1054 if (tp->ucopy.memory > sk->sk_rcvbuf) {