]> git.baikalelectronics.ru Git - kernel.git/commitdiff
team: add missing attribute validation for port ifindex
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2020 05:05:21 +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_PORT_IFINDEX
to the netlink policy.

Fixes: 032d7bd2513f ("team: add support for per-port 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 ca70a1d840eb38522a20a47b4404a325e7aeb956..44dd26a62a6d3e7a028264d010d09e22558640b5 100644 (file)
@@ -2240,6 +2240,7 @@ team_nl_option_policy[TEAM_ATTR_OPTION_MAX + 1] = {
        [TEAM_ATTR_OPTION_CHANGED]              = { .type = NLA_FLAG },
        [TEAM_ATTR_OPTION_TYPE]                 = { .type = NLA_U8 },
        [TEAM_ATTR_OPTION_DATA]                 = { .type = NLA_BINARY },
+       [TEAM_ATTR_OPTION_PORT_IFINDEX]         = { .type = NLA_U32 },
 };
 
 static int team_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)