]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: compare policy more accurately
authorJohannes Berg <johannes.berg@intel.com>
Sat, 3 Oct 2020 08:44:42 +0000 (10:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Oct 2020 21:18:29 +0000 (14:18 -0700)
commitddd9710c4c562980e1cf0cde6b3b6537490ef5ad
treeeffd964f707ecb11e584b9979138bbf5d6dc2458
parent586390a7d8ec6e7b5e10ce24f699c2cc40524b1b
netlink: compare policy more accurately

The maxtype is really an integral part of the policy, and while we
haven't gotten into a situation yet where this happens, it seems
that some developer might eventually have two places pointing to
identical policies, with different maxattr to exclude some attrs
in one of the places.

Even if not, it's really the right thing to compare both since the
two data items fundamentally belong together.

v2:
 - also do the proper comparison in get_policy_idx()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/policy.c