diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-02-27 23:44:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-02 06:00:11 -0500 |
commit | 02276f3c962fd408fa9d441251067845f948bfcf (patch) | |
tree | 040b778209f0694273a9d5d8337814b6a826c74e /net/ipv4/tcp_output.c | |
parent | d3d2ae454501a4dec360995649e1b002a2ad90c5 (diff) |
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>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 3feab4d6929d..77af7faf38a9 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1921,6 +1921,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1921 | if (skb->len > cur_mss) { | 1921 | if (skb->len > cur_mss) { |
1922 | if (tcp_fragment(sk, skb, cur_mss, cur_mss)) | 1922 | if (tcp_fragment(sk, skb, cur_mss, cur_mss)) |
1923 | return -ENOMEM; /* We'll try again later. */ | 1923 | return -ENOMEM; /* We'll try again later. */ |
1924 | } else { | ||
1925 | tcp_init_tso_segs(sk, skb, cur_mss); | ||
1924 | } | 1926 | } |
1925 | 1927 | ||
1926 | tcp_retrans_try_collapse(sk, skb, cur_mss); | 1928 | tcp_retrans_try_collapse(sk, skb, cur_mss); |