]> git.baikalelectronics.ru Git - kernel.git/commit
nexthop: Fix attribute checking for groups
authorDavid Ahern <dsahern@gmail.com>
Sun, 17 May 2020 17:26:32 +0000 (11:26 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 May 2020 17:41:24 +0000 (10:41 -0700)
commit8784278652eacf4b5b4ad792d8140f329a3e0af8
treec57fe1a4c4fd1ec6ca07d596eb83b47dd975d5dd
parent02387ef799e3dbc3d6e0c404aea098eb8c7d79b3
nexthop: Fix attribute checking for groups

For nexthop groups, attributes after NHA_GROUP_TYPE are invalid, but
nh_check_attr_group starts checking at NHA_GROUP. The group type defaults
to multipath and the NHA_GROUP_TYPE is currently optional so this has
slipped through so far. Fix the attribute checking to handle support of
new group types.

Fixes: 6e9d1ef54f91 ("nexthop: Add support for nexthop groups")
Signed-off-by: ASSOGBA Emery <assogba.emery@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/nexthop.c