Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf250a1f authored by Vlad Yasevich's avatar Vlad Yasevich Committed by David S. Miller
Browse files

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: 32dce968 (ipv6: Allow for partial checksums on non-ufo packets)
Reported-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Tested-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4a3046d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1273,7 +1273,7 @@ static int __ip6_append_data(struct sock *sk,
	/* 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)