aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_mpls.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2019-11-21 18:08:38 +0800
committerDavid S. Miller <davem@davemloft.net>2019-11-21 11:46:18 -0800
commitf3bed7f8f93d60df11f94be14542682c905b5c3e (patch)
treef054b17d18d0feac55dbcaf7350b2abc291a7209 /net/sched/act_mpls.c
parentMerge branch 'net-sched-support-vxlan-and-erspan-options' (diff)
downloadlinux-dev-f3bed7f8f93d60df11f94be14542682c905b5c3e.tar.xz
linux-dev-f3bed7f8f93d60df11f94be14542682c905b5c3e.zip
net: remove the unnecessary strict_start_type in some policies
ct_policy and mpls_policy are parsed with nla_parse_nested(), which does NL_VALIDATE_STRICT validation, strict_start_type is not needed to set as it is actually trying to make some attributes parsed with NL_VALIDATE_STRICT. This patch is to remove it, and do the same on rtm_nh_policy which is parsed by nlmsg_parse(). Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_mpls.c')
-rw-r--r--net/sched/act_mpls.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/sched/act_mpls.c b/net/sched/act_mpls.c
index 4d8c822b6aca..c7d5e12ee919 100644
--- a/net/sched/act_mpls.c
+++ b/net/sched/act_mpls.c
@@ -119,7 +119,6 @@ static int valid_label(const struct nlattr *attr,
}
static const struct nla_policy mpls_policy[TCA_MPLS_MAX + 1] = {
- [TCA_MPLS_UNSPEC] = { .strict_start_type = TCA_MPLS_UNSPEC + 1 },
[TCA_MPLS_PARMS] = NLA_POLICY_EXACT_LEN(sizeof(struct tc_mpls)),
[TCA_MPLS_PROTO] = { .type = NLA_U16 },
[TCA_MPLS_LABEL] = NLA_POLICY_VALIDATE_FN(NLA_U32, valid_label),