]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ipv6: Partial checksum only UDP packets
authorVlad Yasevich <vyasevich@gmail.com>
Tue, 10 Feb 2015 16:37:29 +0000 (11:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Feb 2015 22:32:08 +0000 (14:32 -0800)
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>
net/ipv6/ip6_output.c

index d33df4cbd8720fa6a86a065b8e439b0362ea4356..7deebf102cbafc276f45e4eaffdd8efdb658d842 100644 (file)
@@ -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)