mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
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: 32dce968dd
(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>
This commit is contained in:
parent
4a3046d68a
commit
bf250a1fa7
@ -1273,7 +1273,7 @@ emsgsize:
|
|||||||
/* If this is the first and only packet and device
|
/* If this is the first and only packet and device
|
||||||
* supports checksum offloading, let's use it.
|
* supports checksum offloading, let's use it.
|
||||||
*/
|
*/
|
||||||
if (!skb &&
|
if (!skb && sk->sk_protocol == IPPROTO_UDP &&
|
||||||
length + fragheaderlen < mtu &&
|
length + fragheaderlen < mtu &&
|
||||||
rt->dst.dev->features & NETIF_F_V6_CSUM &&
|
rt->dst.dev->features & NETIF_F_V6_CSUM &&
|
||||||
!exthdrlen)
|
!exthdrlen)
|
||||||
|
Loading…
Reference in New Issue
Block a user