OSDN Git Service

nexthop: Use a dedicated policy for nh_valid_get_del_req()
authorPetr Machata <petrm@nvidia.com>
Wed, 20 Jan 2021 15:44:10 +0000 (16:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 05:00:24 +0000 (21:00 -0800)
commit60f5ad5e19c0996df7ca4ce7ef5fd4596cb13f01
tree565744f0c246523cda001f9699d5fdf376e2926d
parent646188c9550f74454dfc172a347dad693e5bfc84
nexthop: Use a dedicated policy for nh_valid_get_del_req()

This function uses the global nexthop policy only to then bounce all
arguments except for NHA_ID. Instead, just create a new policy that
only includes the one allowed attribute.

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