diff options
author | Jiri Benc <jbenc@redhat.com> | 2015-08-20 13:56:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-20 15:42:36 -0700 |
commit | c1ea5d672aaff08da337dee735dbb548e3415585 (patch) | |
tree | 7e5e9a74d7e55be37c1ecea8c0cdeb1211791586 /net/core | |
parent | 376534a3d17002d608985bd67c3b0880eacadd14 (diff) | |
download | op-kernel-dev-c1ea5d672aaff08da337dee735dbb548e3415585.zip op-kernel-dev-c1ea5d672aaff08da337dee735dbb548e3415585.tar.gz |
ip_tunnels: add IPv6 addresses to ip_tunnel_key
Add the IPv6 addresses as an union with IPv4 ones. When using IPv4, the
newly introduced padding after the IPv4 addresses needs to be zeroed out.
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 83f08ce..3795685 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -1495,7 +1495,7 @@ static u64 bpf_skb_get_tunnel_key(u64 r1, u64 r2, u64 size, u64 flags, u64 r5) return -EINVAL; to->tunnel_id = be64_to_cpu(info->key.tun_id); - to->remote_ipv4 = be32_to_cpu(info->key.ipv4_src); + to->remote_ipv4 = be32_to_cpu(info->key.u.ipv4.src); return 0; } @@ -1529,7 +1529,7 @@ static u64 bpf_skb_set_tunnel_key(u64 r1, u64 r2, u64 size, u64 flags, u64 r5) info = &md->u.tun_info; info->mode = IP_TUNNEL_INFO_TX; info->key.tun_id = cpu_to_be64(from->tunnel_id); - info->key.ipv4_dst = cpu_to_be32(from->remote_ipv4); + info->key.u.ipv4.dst = cpu_to_be32(from->remote_ipv4); return 0; } |