mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-17 08:10:21 +01:00
bpf: clat: add missing "break" statements
This commit is contained in:
parent
61f97032c4
commit
db85e4bf22
2 changed files with 6 additions and 0 deletions
|
|
@ -209,6 +209,7 @@ rewrite_icmp(struct iphdr *iph, struct ipv6hdr *ip6h, struct __sk_buff *skb)
|
|||
icmp6.icmp6_type = ICMPV6_PARAMPROB;
|
||||
icmp6.icmp6_code = ICMPV6_UNK_NEXTHDR;
|
||||
icmp6.icmp6_pointer = bpf_htonl(offsetof(struct ipv6hdr, nexthdr));
|
||||
break;
|
||||
case ICMP_PORT_UNREACH:
|
||||
icmp6.icmp6_code = ICMPV6_PORT_UNREACH;
|
||||
break;
|
||||
|
|
@ -222,11 +223,13 @@ rewrite_icmp(struct iphdr *iph, struct ipv6hdr *ip6h, struct __sk_buff *skb)
|
|||
if (mtu < 1280)
|
||||
mtu = 1280;
|
||||
icmp6.icmp6_mtu = bpf_htonl(mtu);
|
||||
break;
|
||||
case ICMP_NET_ANO:
|
||||
case ICMP_HOST_ANO:
|
||||
case ICMP_PKT_FILTERED:
|
||||
case ICMP_PREC_CUTOFF:
|
||||
icmp6.icmp6_code = ICMPV6_ADM_PROHIBITED;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -271,6 +274,7 @@ rewrite_icmp(struct iphdr *iph, struct ipv6hdr *ip6h, struct __sk_buff *skb)
|
|||
default:
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ endif
|
|||
bpf_clang_flags = [
|
||||
'-std=gnu17',
|
||||
'-Wunused',
|
||||
'-Wimplicit-fallthrough',
|
||||
'-Wno-compare-distinct-pointer-types',
|
||||
'-fno-stack-protector',
|
||||
'-O2',
|
||||
|
|
@ -109,6 +110,7 @@ bpf_clang_flags = [
|
|||
bpf_gcc_flags = [
|
||||
'-std=gnu17',
|
||||
'-Wunused',
|
||||
'-Wimplicit-fallthrough',
|
||||
'-fno-stack-protector',
|
||||
'-fno-ssa-phiopt',
|
||||
'-O2',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue