Petr Machata 0bccf8ed8a nexthop: Extract a helper for validation of get/del RTNL requests
Validation of messages for get / del of a next hop is the same as will be
validation of messages for get of a resilient next hop group bucket. The
difference is that policy for resilient next hop group buckets is a
superset of that used for next-hop get.

It is therefore possible to reuse the code that validates the nhmsg fields,
extracts the next-hop ID, and validates that. To that end, extract from
nh_valid_get_del_req() a helper __nh_valid_get_del_req() that does just
that.

Make the nlh argument const so that the function can be called from the
dump context, which only has a const nlh. Propagate the constness to
nh_valid_get_del_req().

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-28 20:49:54 -08:00
..
2021-01-27 17:04:12 -08:00
2021-01-27 18:53:10 -08:00
2021-01-28 16:57:19 -08:00
2020-12-16 11:01:04 -08:00
2021-01-15 20:02:34 -08:00
2021-01-27 16:53:55 -08:00
2020-11-17 15:22:06 -04:00
2021-01-22 20:41:29 -08:00
2021-01-19 13:01:50 -08:00
2020-10-29 19:27:45 +01:00
2020-12-16 12:44:05 -08:00