diff options
author | Vlad Yasevich <vyasevich@gmail.com> | 2017-01-30 04:52:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-30 21:51:12 +0100 |
commit | 2b89ed65a6f201a6a4f0450ad289aa4bf491608c (patch) | |
tree | 84d46ed640f648af30847b308ccc88a467dba2df /net/ipv6/ip6_output.c | |
parent | net/mlx4_core: Avoid command timeouts during VF driver device shutdown (diff) | |
download | linux-2b89ed65a6f201a6a4f0450ad289aa4bf491608c.tar.xz linux-2b89ed65a6f201a6a4f0450ad289aa4bf491608c.zip |
ipv6: Paritially checksum full MTU frames
IPv6 will mark data that is smaller that mtu - headersize as
CHECKSUM_PARTIAL, but if the data will completely fill the mtu,
the packet checksum will be computed in software instead.
Extend the conditional to include the data that fills the mtu
as well.
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-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 2c0df09e9036..b6a94ff0bbd0 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1344,7 +1344,7 @@ emsgsize: */ if (transhdrlen && sk->sk_protocol == IPPROTO_UDP && headersize == sizeof(struct ipv6hdr) && - length < mtu - headersize && + length <= mtu - headersize && !(flags & MSG_MORE) && rt->dst.dev->features & (NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM)) csummode = CHECKSUM_PARTIAL; |