tcp: fix corner case issue in segmentation during rexmitting

If cur_mss grew very recently so that the previously G/TSOed skb
now fits well into a single segment it would get send up in
parts unless we calculate # of segments again. This corner-case
could happen eg. after mtu probe completes or less than
previously sack blocks are required for the opposite direction.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ilpo Järvinen 2009-02-28 04:44:31 +00:00 committed by David S. Miller
parent d3d2ae4545
commit 02276f3c96
1 changed files with 2 additions and 0 deletions

View File

@ -1921,6 +1921,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
if (skb->len > cur_mss) {
if (tcp_fragment(sk, skb, cur_mss, cur_mss))
return -ENOMEM; /* We'll try again later. */
} else {
tcp_init_tso_segs(sk, skb, cur_mss);
}
tcp_retrans_try_collapse(sk, skb, cur_mss);