mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 12:28:11 +02:00
bpf: clat: remove unused variables
This commit is contained in:
parent
f9cd6e20a5
commit
ade4de22f3
2 changed files with 9 additions and 14 deletions
|
|
@ -413,19 +413,16 @@ rewrite_icmpv6(struct ipv6hdr *ip6h,
|
||||||
struct icmphdr **new_icmp_out,
|
struct icmphdr **new_icmp_out,
|
||||||
struct hdr_cursor *nh)
|
struct hdr_cursor *nh)
|
||||||
{
|
{
|
||||||
void *data_end = SKB_DATA_END(skb);
|
void *data_end = SKB_DATA_END(skb);
|
||||||
struct icmp6hdr old_icmp6, *icmp6 = (void *) (ip6h + 1);
|
struct icmp6hdr *icmp6 = (void *) (ip6h + 1);
|
||||||
struct icmphdr icmp, *new_icmp;
|
struct icmphdr icmp, *new_icmp;
|
||||||
__u32 mtu, ptr;
|
__u32 mtu, ptr;
|
||||||
struct iphdr dst_hdr;
|
|
||||||
void *inner_packet;
|
|
||||||
|
|
||||||
if ((void *) (icmp6 + 1) > data_end)
|
if ((void *) (icmp6 + 1) > data_end)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
old_icmp6 = *icmp6;
|
new_icmp = (void *) icmp6;
|
||||||
new_icmp = (void *) icmp6;
|
icmp = *new_icmp;
|
||||||
icmp = *new_icmp;
|
|
||||||
|
|
||||||
/* These translations are defined in RFC6145 section 5.2 */
|
/* These translations are defined in RFC6145 section 5.2 */
|
||||||
switch (icmp6->icmp6_type) {
|
switch (icmp6->icmp6_type) {
|
||||||
|
|
@ -501,8 +498,7 @@ rewrite_icmpv6(struct ipv6hdr *ip6h,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*new_icmp = icmp;
|
*new_icmp = icmp;
|
||||||
out:
|
|
||||||
*new_icmp_out = new_icmp;
|
*new_icmp_out = new_icmp;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -514,15 +510,12 @@ clat_translate_v6(struct __sk_buff *skb,
|
||||||
struct iphdr *dst_hdr_out,
|
struct iphdr *dst_hdr_out,
|
||||||
bool depth)
|
bool depth)
|
||||||
{
|
{
|
||||||
struct in6_addr subnet_v6 = {};
|
|
||||||
struct in_addr src_v4;
|
struct in_addr src_v4;
|
||||||
int ip_type;
|
int ip_type;
|
||||||
struct ipv6hdr *ip6h;
|
struct ipv6hdr *ip6h;
|
||||||
int ret = TC_ACT_OK;
|
int ret = TC_ACT_OK;
|
||||||
struct icmphdr *new_icmp;
|
struct icmphdr *new_icmp;
|
||||||
struct icmp6hdr old_icmp6;
|
struct icmp6hdr old_icmp6;
|
||||||
struct iphdr dst_hdr_icmp;
|
|
||||||
int type;
|
|
||||||
|
|
||||||
struct clat_v6_config_value *v6_config;
|
struct clat_v6_config_value *v6_config;
|
||||||
struct clat_v6_config_key v6_config_key;
|
struct clat_v6_config_key v6_config_key;
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ endif
|
||||||
|
|
||||||
bpf_clang_flags = [
|
bpf_clang_flags = [
|
||||||
'-std=gnu17',
|
'-std=gnu17',
|
||||||
|
'-Wunused',
|
||||||
'-Wno-compare-distinct-pointer-types',
|
'-Wno-compare-distinct-pointer-types',
|
||||||
'-fno-stack-protector',
|
'-fno-stack-protector',
|
||||||
'-O2',
|
'-O2',
|
||||||
|
|
@ -107,6 +108,7 @@ bpf_clang_flags = [
|
||||||
|
|
||||||
bpf_gcc_flags = [
|
bpf_gcc_flags = [
|
||||||
'-std=gnu17',
|
'-std=gnu17',
|
||||||
|
'-Wunused',
|
||||||
'-fno-stack-protector',
|
'-fno-stack-protector',
|
||||||
'-fno-ssa-phiopt',
|
'-fno-ssa-phiopt',
|
||||||
'-O2',
|
'-O2',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue