]> git.baikalelectronics.ru Git - kernel.git/commit
genetlink: piggy back on resv_op to default to a reject policy
authorJakub Kicinski <kuba@kernel.org>
Fri, 21 Oct 2022 19:35:32 +0000 (12:35 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Oct 2022 02:08:46 +0000 (19:08 -0700)
commitc9c0f6ce387d937342a66de1de5207bd4070211c
treee707212a1ba96a3966ad51ba3f9e8b5ee01e63a5
parent330386d836c0735b1fab3f38df5f7423de799f68
genetlink: piggy back on resv_op to default to a reject policy

To keep backward compatibility we used to leave attribute parsing
to the family if no policy is specified. This becomes tedious as
we move to more strict validation. Families must define reject all
policies if they don't want any attributes accepted.

Piggy back on the resv_start_op field as the switchover point.
AFAICT only ethtool has added new commands since the resv_start_op
was defined, and it has per-op policies so this should be a no-op.

Nonetheless the patch should still go into v6.1 for consistency.

Link: https://lore.kernel.org/all/20221019125745.3f2e7659@kernel.org/
Link: https://lore.kernel.org/r/20221021193532.1511293-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/genetlink.h
net/netlink/genetlink.c