Commit 89f5f0ae authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

[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: default avatarHerbert Xu <>
Signed-off-by: default avatarDavid S. Miller <>
parent a51482bd
......@@ -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. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment