| From 9af3fd16ee578413326ec44730f2fed7ca7050aa Mon Sep 17 00:00:00 2001 |
| From: Xin Long <lucien.xin@gmail.com> |
| Date: Fri, 13 Dec 2019 16:53:06 +0800 |
| Subject: [PATCH] netfilter: nft_tunnel: add the missing ERSPAN_VERSION |
| nla_policy |
| |
| commit 0705f95c332081036d85f26691e9d3cd7d901c31 upstream. |
| |
| ERSPAN_VERSION is an attribute parsed in kernel side, nla_policy |
| type should be added for it, like other attributes. |
| |
| Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") |
| Signed-off-by: Xin Long <lucien.xin@gmail.com> |
| Reviewed-by: Simon Horman <simon.horman@netronome.com> |
| Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c |
| index 5284fcf16be7..f8d2919cf9fd 100644 |
| --- a/net/netfilter/nft_tunnel.c |
| +++ b/net/netfilter/nft_tunnel.c |
| @@ -248,8 +248,9 @@ static int nft_tunnel_obj_vxlan_init(const struct nlattr *attr, |
| } |
| |
| static const struct nla_policy nft_tunnel_opts_erspan_policy[NFTA_TUNNEL_KEY_ERSPAN_MAX + 1] = { |
| + [NFTA_TUNNEL_KEY_ERSPAN_VERSION] = { .type = NLA_U32 }, |
| [NFTA_TUNNEL_KEY_ERSPAN_V1_INDEX] = { .type = NLA_U32 }, |
| - [NFTA_TUNNEL_KEY_ERSPAN_V2_DIR] = { .type = NLA_U8 }, |
| + [NFTA_TUNNEL_KEY_ERSPAN_V2_DIR] = { .type = NLA_U8 }, |
| [NFTA_TUNNEL_KEY_ERSPAN_V2_HWID] = { .type = NLA_U8 }, |
| }; |
| |
| -- |
| 2.7.4 |
| |