diff options
author | Alexei Starovoitov <ast@plumgrid.com> | 2015-08-26 22:57:38 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-27 00:38:13 (GMT) |
commit | 1dd34b5ad8aebaff17b625fc0126e18243008a3f (patch) | |
tree | 20573f4e5302454b823a5274b186ba1e322568cf /net/core/filter.c | |
parent | 8c5bbe77d4cd012668cdaf501bbd1cbfb9ad1d24 (diff) | |
download | linux-1dd34b5ad8aebaff17b625fc0126e18243008a3f.tar.xz |
bpf: fix bpf_skb_set_tunnel_key() helper
Make sure to indicate to tunnel driver that key.tun_id is set,
otherwise gre won't recognize the metadata.
Fixes: d3aa45ce6b94 ("bpf: add helpers to access tunnel metadata")
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r-- | net/core/filter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index b4adc96..66500d4 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -1528,6 +1528,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_flags = TUNNEL_KEY; info->key.tun_id = cpu_to_be64(from->tunnel_id); info->key.u.ipv4.dst = cpu_to_be32(from->remote_ipv4); |