Re: [RFC net-next 05/15] ipxlat: add IPv6 packet validation path

From: Ralf Lici

Date: Thu Apr 09 2026 - 05:50:08 EST


On 4/9/26 04:18, Xavier HSINYUAN wrote:
> Hi Ralf,
>
>> +static int ipxlat_v6_validate_icmp_csum(const struct sk_buff *skb)
>> +{
>> + struct ipv6hdr *iph6;
>> + unsigned int len;
>> + __sum16 csum;
>> +
>> + if (skb->ip_summed != CHECKSUM_NONE)
>> + return 0;
>> +
>> + iph6 = ipv6_hdr(skb);
>> + len = ipxlat_skb_datagram_len(skb);
>> + csum = csum_ipv6_magic(&iph6->saddr, &iph6->daddr, len, NEXTHDR_ICMP,
>> + skb_checksum(skb, skb_transport_offset(skb), len,
>> + 0));
>> +
>> + return unlikely(csum) ? -EINVAL : 0;
>> +}
> We should include net/ip6_checksum.h to make x86_64 with KMSAN/KASAN and
> other architectures with optional _HAVE_ARCH_IPV6_CSUM happy.

Hi Xavier,

Yep, this showed up in patchwork build failures as well.
I'll add the required header where needed (packet.c and icmp_{46,64}.c)
in the next revision.

Thanks!

>
> Best regards,
> Xavier
>

--
Ralf Lici
Mandelbit Srl