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; }