diff options
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 14 |
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; | |||
266 | extern int sysctl_tcp_max_orphans; | 266 | extern int sysctl_tcp_max_orphans; |
267 | extern int sysctl_tcp_fack; | 267 | extern int sysctl_tcp_fack; |
268 | extern int sysctl_tcp_reordering; | 268 | extern int sysctl_tcp_reordering; |
269 | extern int sysctl_tcp_ecn; | ||
270 | extern int sysctl_tcp_dsack; | 269 | extern int sysctl_tcp_dsack; |
271 | extern int sysctl_tcp_wmem[3]; | 270 | extern int sysctl_tcp_wmem[3]; |
272 | extern int sysctl_tcp_rmem[3]; | 271 | extern int sysctl_tcp_rmem[3]; |
@@ -280,7 +279,6 @@ extern int sysctl_tcp_dma_copybreak; | |||
280 | extern int sysctl_tcp_nometrics_save; | 279 | extern int sysctl_tcp_nometrics_save; |
281 | extern int sysctl_tcp_moderate_rcvbuf; | 280 | extern int sysctl_tcp_moderate_rcvbuf; |
282 | extern int sysctl_tcp_tso_win_divisor; | 281 | extern int sysctl_tcp_tso_win_divisor; |
283 | extern int sysctl_tcp_abc; | ||
284 | extern int sysctl_tcp_mtu_probing; | 282 | extern int sysctl_tcp_mtu_probing; |
285 | extern int sysctl_tcp_base_mss; | 283 | extern int sysctl_tcp_base_mss; |
286 | extern int sysctl_tcp_workaround_signed_windows; | 284 | extern 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 | ||
506 | extern __u32 cookie_init_timestamp(struct request_sock *req); | 504 | extern __u32 cookie_init_timestamp(struct request_sock *req); |
507 | extern bool cookie_check_timestamp(struct tcp_options_received *opt, bool *); | 505 | extern 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 */ |
510 | extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb); | 509 | extern 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 | */ |
730 | static inline void | 729 | static inline void |
731 | TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb) | 730 | TCP_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) { |