diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 1 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 9944c1d9a218..3ff364065376 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -335,6 +335,7 @@ static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) | |||
335 | incr = __tcp_grow_window(sk, skb); | 335 | incr = __tcp_grow_window(sk, skb); |
336 | 336 | ||
337 | if (incr) { | 337 | if (incr) { |
338 | incr = max_t(int, incr, 2 * skb->len); | ||
338 | tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, | 339 | tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, |
339 | tp->window_clamp); | 340 | tp->window_clamp); |
340 | inet_csk(sk)->icsk_ack.quick |= 1; | 341 | inet_csk(sk)->icsk_ack.quick |= 1; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 376b2cfbb685..7ac6423117ad 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1096,6 +1096,7 @@ static void __pskb_trim_head(struct sk_buff *skb, int len) | |||
1096 | eat = min_t(int, len, skb_headlen(skb)); | 1096 | eat = min_t(int, len, skb_headlen(skb)); |
1097 | if (eat) { | 1097 | if (eat) { |
1098 | __skb_pull(skb, eat); | 1098 | __skb_pull(skb, eat); |
1099 | skb->avail_size -= eat; | ||
1099 | len -= eat; | 1100 | len -= eat; |
1100 | if (!len) | 1101 | if (!len) |
1101 | return; | 1102 | return; |