diff options
author | Xin Long <lucien.xin@gmail.com> | 2019-11-10 12:16:22 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-11 14:42:14 -0800 |
commit | ed02551f58b92812974bf7bec6c9cc98c3e9263f (patch) | |
tree | 784db20a9f10532cb8b1f4a6d4449b86780e4243 /net/ipv4 | |
parent | fe2b8a880809060f8e9b9e7668f3d319fd09184f (diff) |
lwtunnel: change to use nla_parse_nested on new options
As the new options added in kernel, all should always use strict
parsing from the beginning with nla_parse_nested(), instead of
nla_parse_nested_deprecated().
Fixes: b0a21810bd5e ("lwtunnel: add options setting and dumping for erspan")
Fixes: edf31cbb1502 ("lwtunnel: add options setting and dumping for vxlan")
Fixes: 4ece47787077 ("lwtunnel: add options setting and dumping for geneve")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_tunnel_core.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index d4f84bf9289a..ee71e768eb1d 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -257,8 +257,8 @@ static int ip_tun_parse_opts_geneve(struct nlattr *attr, struct nlattr *tb[LWTUNNEL_IP_OPT_GENEVE_MAX + 1]; int data_len, err; - err = nla_parse_nested_deprecated(tb, LWTUNNEL_IP_OPT_GENEVE_MAX, - attr, geneve_opt_policy, extack); + err = nla_parse_nested(tb, LWTUNNEL_IP_OPT_GENEVE_MAX, attr, + geneve_opt_policy, extack); if (err) return err; @@ -294,8 +294,8 @@ static int ip_tun_parse_opts_vxlan(struct nlattr *attr, struct nlattr *tb[LWTUNNEL_IP_OPT_VXLAN_MAX + 1]; int err; - err = nla_parse_nested_deprecated(tb, LWTUNNEL_IP_OPT_VXLAN_MAX, - attr, vxlan_opt_policy, extack); + err = nla_parse_nested(tb, LWTUNNEL_IP_OPT_VXLAN_MAX, attr, + vxlan_opt_policy, extack); if (err) return err; @@ -320,8 +320,8 @@ static int ip_tun_parse_opts_erspan(struct nlattr *attr, struct nlattr *tb[LWTUNNEL_IP_OPT_ERSPAN_MAX + 1]; int err; - err = nla_parse_nested_deprecated(tb, LWTUNNEL_IP_OPT_ERSPAN_MAX, - attr, erspan_opt_policy, extack); + err = nla_parse_nested(tb, LWTUNNEL_IP_OPT_ERSPAN_MAX, attr, + erspan_opt_policy, extack); if (err) return err; @@ -362,8 +362,8 @@ static int ip_tun_parse_opts(struct nlattr *attr, struct ip_tunnel_info *info, if (!attr) return 0; - err = nla_parse_nested_deprecated(tb, LWTUNNEL_IP_OPTS_MAX, attr, - ip_opts_policy, extack); + err = nla_parse_nested(tb, LWTUNNEL_IP_OPTS_MAX, attr, + ip_opts_policy, extack); if (err) return err; |