Skip to content

Commit 2b89ed6

Browse files
vyasevichdavem330
authored andcommitted
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>
1 parent d585df1 commit 2b89ed6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/ip6_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ static int __ip6_append_data(struct sock *sk,
13441344
*/
13451345
if (transhdrlen && sk->sk_protocol == IPPROTO_UDP &&
13461346
headersize == sizeof(struct ipv6hdr) &&
1347-
length < mtu - headersize &&
1347+
length <= mtu - headersize &&
13481348
!(flags & MSG_MORE) &&
13491349
rt->dst.dev->features & (NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM))
13501350
csummode = CHECKSUM_PARTIAL;

0 commit comments

Comments
 (0)