]> git.baikalelectronics.ru Git - kernel.git/commitdiff
team: add missing attribute validation for array index
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2020 05:05:22 +0000 (21:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2020 21:28:48 +0000 (13:28 -0800)
Add missing attribute validation for TEAM_ATTR_OPTION_ARRAY_INDEX
to the netlink policy.

Fixes: 6e1a56367a64 ("team: introduce array options")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/team/team.c

index 44dd26a62a6d3e7a028264d010d09e22558640b5..4004f98e50d9fc58a8d8d6449448840d3c9da748 100644 (file)
@@ -2241,6 +2241,7 @@ team_nl_option_policy[TEAM_ATTR_OPTION_MAX + 1] = {
        [TEAM_ATTR_OPTION_TYPE]                 = { .type = NLA_U8 },
        [TEAM_ATTR_OPTION_DATA]                 = { .type = NLA_BINARY },
        [TEAM_ATTR_OPTION_PORT_IFINDEX]         = { .type = NLA_U32 },
+       [TEAM_ATTR_OPTION_ARRAY_INDEX]          = { .type = NLA_U32 },
 };
 
 static int team_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)