From 51690d5f48e48967fe44421ada703e112fcdf7ca Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 23 Dec 2025 22:11:29 +0100 Subject: [PATCH] bpf: clat: use the right endian-conversion function bpf_ntohl() is more correct because the field is in network byte order; but there is no actual change in behavior. --- src/core/bpf/clat.bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/bpf/clat.bpf.c b/src/core/bpf/clat.bpf.c index e65edd0fbe..3bec158b68 100644 --- a/src/core/bpf/clat.bpf.c +++ b/src/core/bpf/clat.bpf.c @@ -455,7 +455,7 @@ rewrite_icmpv6(struct ipv6hdr *ip6h, icmp.type = ICMP_DEST_UNREACH; icmp.code = ICMP_FRAG_NEEDED; - mtu = bpf_htonl(icmp6->icmp6_mtu) - 20; + mtu = bpf_ntohl(icmp6->icmp6_mtu) - 20; if (mtu > 0xffff) return -1; icmp.un.frag.mtu = bpf_htons(mtu);