genetlink: bring back per op policy
authorJakub Kicinski <kuba@kernel.org>
Fri, 2 Oct 2020 21:49:57 +0000 (14:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Oct 2020 02:11:12 +0000 (19:11 -0700)
commit48526a0f4ca2b484cab4318dc0b2c2be1d8685b7
tree4f3c795650dde693e5238ec4ffde5aa80c343d4f
parent78ade619c16599c8a962451aad15f56bceed316b
genetlink: bring back per op policy

Add policy to the struct genl_ops structure, this time
with maxattr, so it can be used properly.

Propagate .policy and .maxattr from the family
in genl_get_cmd() if needed, this way the rest of the
code does not have to worry if the policy is per op
or global.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/genetlink.h
net/netlink/genetlink.c