]> git.baikalelectronics.ru Git - kernel.git/commit
nexthop: Use a dedicated policy for nh_valid_dump_req()
authorPetr Machata <petrm@nvidia.com>
Wed, 20 Jan 2021 15:44:11 +0000 (16:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 05:00:24 +0000 (21:00 -0800)
commit144443830a30750915f4e64ed1bcaf7aa95f3c9f
tree18ac0e66fb942dfa92919aac54f2f9a15065d3b8
parentf8780590b1614bd91cd8a38566ea3f4c83b8a4dd
nexthop: Use a dedicated policy for nh_valid_dump_req()

This function uses the global nexthop policy, but only accepts four
particular attributes. Create a new policy that only includes the four
supported attributes, and use it. Convert the loop to a series of ifs.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/nexthop.c