]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'nexthop-more-fine-grained-policies-for-netlink-message-validation'
authorJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 05:00:28 +0000 (21:00 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 05:00:29 +0000 (21:00 -0800)
commit9dfe456a3f93667508740bbc796f134016d89b68
tree35d28e9237dc2d50675e5ce5dce1b1c72365f0c8
parent0a5a1ad5ae1b88da05675dfb268e2bac2ed4d067
parent591b3b148aa98c83f40adacf2394c88498d3a433
Merge branch 'nexthop-more-fine-grained-policies-for-netlink-message-validation'

Petr Machata says:

====================
nexthop: More fine-grained policies for netlink message validation

There is currently one policy that covers all attributes for next hop
object management. Actual validation is then done in code, which makes it
unobvious which attributes are acceptable when, and indeed that everything
is rejected as necessary.

In this series, split rtm_nh_policy to several policies that cover various
aspects of the next hop object configuration, and instead of open-coding
the validation, defer to nlmsg_parse(). This should make extending the next
hop code simpler as well, which will be relevant in near future for
resilient hashing implementation.

This was tested by running tools/testing/selftests/net/fib_nexthops.sh.
Additionally iproute2 was tweaked to issue "nexthop list id" as an
RTM_GETNEXTHOP dump request, instead of a straight get to test that
unexpected attributes are indeed rejected.
====================

Link: https://lore.kernel.org/r/cover.1611156111.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>