mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 02:21:58 +00:00
derp/xdp: fix handling of zero value UDP checksums (#12510)
validate_udp_checksum was previously indeterminate (not zero) at declaration, and IPv4 zero value UDP checksum packets were being passed to the kernel. Updates tailscale/corp#20689 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
@@ -244,7 +244,7 @@ static __always_inline int handle_packet(struct xdp_md *ctx, struct packet_conte
|
||||
struct ipv6hdr *ip6;
|
||||
struct udphdr *udp;
|
||||
|
||||
int validate_udp_csum;
|
||||
int validate_udp_csum = 0;
|
||||
if (eth->h_proto == bpf_htons(ETH_P_IP)) {
|
||||
pctx->af = COUNTER_KEY_AF_IPV4;
|
||||
ip = (void *)(eth + 1);
|
||||
|
||||
Reference in New Issue
Block a user