diff options
| author | Vlad Yasevich <vyasevich@gmail.com> | 2015-02-10 11:37:29 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-02-11 17:32:08 -0500 |
| commit | bf250a1fa769f2eb8fc7a4e28b3b523e9cb67eef (patch) | |
| tree | acbdd58a049f11502508ae1750f2a39a03cdcabb /net | |
| parent | 4a3046d68a5a6b7a2474c9d65811091841675cdb (diff) | |
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>
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv6/ip6_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index d33df4cbd872..7deebf102cba 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -1273,7 +1273,7 @@ emsgsize: | |||
| 1273 | /* If this is the first and only packet and device | 1273 | /* If this is the first and only packet and device |
| 1274 | * supports checksum offloading, let's use it. | 1274 | * supports checksum offloading, let's use it. |
| 1275 | */ | 1275 | */ |
| 1276 | if (!skb && | 1276 | if (!skb && sk->sk_protocol == IPPROTO_UDP && |
| 1277 | length + fragheaderlen < mtu && | 1277 | length + fragheaderlen < mtu && |
| 1278 | rt->dst.dev->features & NETIF_F_V6_CSUM && | 1278 | rt->dst.dev->features & NETIF_F_V6_CSUM && |
| 1279 | !exthdrlen) | 1279 | !exthdrlen) |
