From: Herbert Xu Date: Tue, 8 Nov 2005 17:41:56 +0000 (-0800) Subject: [IPV4]: Fix ip_queue_xmit identity increment for TSO packets X-Git-Tag: v2.6.15-rc1~409 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89f5f0aeed14ac7245f760b0b96c9269c87bcbbe;p=linux-2.6 [IPV4]: Fix ip_queue_xmit identity increment for TSO packets When ip_queue_xmit calls ip_select_ident_more for IP identity selection it gives it the wrong packet count for TSO packets. The ip_select_* functions expect one less than the number of packets, so we need to subtract one for TSO packets. This bug was diagnosed and fixed by Tom Young. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index df7f20da42..11c2f68254 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -353,7 +353,8 @@ packet_routed: ip_options_build(skb, opt, inet->daddr, rt, 0); } - ip_select_ident_more(iph, &rt->u.dst, sk, skb_shinfo(skb)->tso_segs); + ip_select_ident_more(iph, &rt->u.dst, sk, + (skb_shinfo(skb)->tso_segs ?: 1) - 1); /* Add an IP checksum. */ ip_send_check(iph);