From 20ffe2be9de9bb4509568f8c2e2e3a3c4e08e310 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 23 Dec 2025 21:54:03 +0100 Subject: [PATCH] bpf: clat: fix translation of ICMPv6 Parameter Problem message --- src/core/bpf/clat.bpf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/bpf/clat.bpf.c b/src/core/bpf/clat.bpf.c index 788c4fec7e..a5b35119bd 100644 --- a/src/core/bpf/clat.bpf.c +++ b/src/core/bpf/clat.bpf.c @@ -603,11 +603,8 @@ rewrite_icmpv6(struct __sk_buff *skb) case 0: icmp_buf.type = ICMP_PARAMETERPROB; icmp_buf.code = 0; - break; - case 1: - icmp_buf.type = ICMP_DEST_UNREACH; - icmp_buf.code = ICMP_PROT_UNREACH; - ptr = bpf_ntohl(icmp6->icmp6_pointer); + + ptr = bpf_ntohl(icmp6->icmp6_pointer); /* Figure 6 in RFC6145 - using if statements b/c of * range at the bottom */ @@ -626,6 +623,10 @@ rewrite_icmpv6(struct __sk_buff *skb) else return -1; break; + case 1: + icmp_buf.type = ICMP_DEST_UNREACH; + icmp_buf.code = ICMP_PROT_UNREACH; + break; default: return -1; }