OSDN Git Service

genetlink: allow dumping command-specific policy
authorJakub Kicinski <kuba@kernel.org>
Sat, 3 Oct 2020 08:44:46 +0000 (10:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Oct 2020 21:18:29 +0000 (14:18 -0700)
commite992a6eda9a1eeeab73a8d2792464e4a2b1ebc3b
tree292af9635b3bb0714677337afc0effaff69d0406
parent50a896cf2d6f34e884a00139d6e6012c9833ace3
genetlink: allow dumping command-specific policy

Right now CTRL_CMD_GETPOLICY can only dump the family-wide
policy. Support dumping policy of a specific op.

v3:
 - rebase after per-op policy export and handle that
v2:
 - make cmd U32, just in case.
v1:
 - don't echo op in the output in a naive way, this should
   make it cleaner to extend the output format for dumping
   policies for all the commands at once in the future.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20201001225933.1373426-11-kuba@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/genetlink.h
net/netlink/genetlink.c