Skip to contentSkip to conversation

ipv6: Partial checksum only UDP packets

PATCH Applied Vladislav Yasevich 2 participants 2 messages Feb 10, 2015 – Feb 11, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ipv6: Partial checksum only UDP packets

ip6_append_data is used by other protocols and some of them can't be partially checksummed. Only partially checksum UDP protocol.

Fixes 32dce968dd987a (ipv6: Allow for partial checksums on non-ufo packets)

---
v2: added tested-by tag and fixed compile issue with prior patch.

 net/ipv6/ip6_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ip6_output.c +1 -1
index d33df4c..7deebf1 100644
@@ -1273,7 +1273,7 @@ emsgsize:
 	/* If this is the first and only packet and device
 	 * supports checksum offloading, let's use it.
 	 */
-	if (!skb &&
+	if (!skb && sk->sk_protocol == IPPROTO_UDP &&
 	    length + fragheaderlen < mtu &&
 	    rt->dst.dev->features & NETIF_F_V6_CSUM &&
 	    !exthdrlen)
Signature · 1 line
1.9.3
maintainer Applied
#1 lore raw

From: Vladislav Yasevich <[email protected]>
Date: Tue, 10 Feb 2015 11:37:29 -0500

Quoted 9 lines

ip6_append_data is used by other protocols and some of them can't be partially checksummed. Only partially checksum UDP protocol.

Fixes 32dce968dd987a (ipv6: Allow for partial checksums on non-ufo packets)

---
v2: added tested-by tag and fixed compile issue with prior patch.

Applied, thanks.