Message ID | 20090629040330.GA2981@gondor.apana.org.au |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Herbert Xu <herbert@gondor.apana.org.au> Date: Mon, 29 Jun 2009 12:03:30 +0800 > tcp: Stop non-TSO packets morphing into TSO > > If a socket starts out on a non-TSO route, and then switches to > a TSO route, then the tail on the tx queue can morph into a TSO > packet, causing mischief because the rest of the stack does not > expect a partially linear TSO packet. > > This patch fixes this by ensuring that skb->ip_summed is set to > CHECKSUM_PARTIAL before declaring a packet as TSO. > > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 416fc4c..5bdf08d 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -725,7 +725,8 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb) static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned int mss_now) { - if (skb->len <= mss_now || !sk_can_gso(sk)) { + if (skb->len <= mss_now || !sk_can_gso(sk) || + skb->ip_summed == CHECKSUM_NONE) { /* Avoid the costly divide in the normal * non-TSO case. */