Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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)
Reported-by: Sabrina Dubroca <sd@queasysnail.net>
Tested-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vlad Yasevich and committed by
David S. Miller
bf250a1f 4a3046d6

+1 -1
+1 -1
net/ipv6/ip6_output.c
··· 1273 1273 /* If this is the first and only packet and device 1274 1274 * supports checksum offloading, let's use it. 1275 1275 */ 1276 - if (!skb && 1276 + if (!skb && sk->sk_protocol == IPPROTO_UDP && 1277 1277 length + fragheaderlen < mtu && 1278 1278 rt->dst.dev->features & NETIF_F_V6_CSUM && 1279 1279 !exthdrlen)