Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: netpoll: Initialize UDP checksum field before checksumming

commit f1fce08e63fe ("netpoll: Eliminate redundant assignment") removed
the initialization of the UDP checksum, which was wrong and broke
netpoll IPv6 transmission due to bad checksumming.

udph->check needs to be set before calling csum_ipv6_magic().

Fixes: f1fce08e63fe ("netpoll: Eliminate redundant assignment")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250620-netpoll_fix-v1-1-f9f0b82bc059@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
f5990207 95b6759a

+1 -1
+1 -1
net/core/netpoll.c
··· 432 432 udph->dest = htons(np->remote_port); 433 433 udph->len = htons(udp_len); 434 434 435 + udph->check = 0; 435 436 if (np->ipv6) { 436 437 udph->check = csum_ipv6_magic(&np->local_ip.in6, 437 438 &np->remote_ip.in6, ··· 461 460 skb_reset_mac_header(skb); 462 461 skb->protocol = eth->h_proto = htons(ETH_P_IPV6); 463 462 } else { 464 - udph->check = 0; 465 463 udph->check = csum_tcpudp_magic(np->local_ip.ip, 466 464 np->remote_ip.ip, 467 465 udp_len, IPPROTO_UDP,