aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/ip6_output.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index c21777565c58..bc09cb97b840 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1300,8 +1300,10 @@ emsgsize:
1300 1300
1301 /* If this is the first and only packet and device 1301 /* If this is the first and only packet and device
1302 * supports checksum offloading, let's use it. 1302 * supports checksum offloading, let's use it.
1303 * Use transhdrlen, same as IPv4, because partial
1304 * sums only work when transhdrlen is set.
1303 */ 1305 */
1304 if (!skb && sk->sk_protocol == IPPROTO_UDP && 1306 if (transhdrlen && sk->sk_protocol == IPPROTO_UDP &&
1305 length + fragheaderlen < mtu && 1307 length + fragheaderlen < mtu &&
1306 rt->dst.dev->features & NETIF_F_V6_CSUM && 1308 rt->dst.dev->features & NETIF_F_V6_CSUM &&
1307 !exthdrlen) 1309 !exthdrlen)