• Johannes Berg's avatar
    genetlink: properly support per-op policy dumping · 50a896cf
    Johannes Berg authored
    Add support for per-op policy dumping. The data is pretty much
    as before, except that now the assumption that the policy with
    index 0 is "the" policy no longer holds - you now need to look
    at the new CTRL_ATTR_OP_POLICY attribute which is a nested attr
    (indexed by op) containing attributes for do and dump policies.
    
    When a single op is requested, the CTRL_ATTR_OP_POLICY will be
    added in the same way, since do and dump policies may differ.
    
    v2:
     - conditionally advertise per-command policies only if there
       actually is a policy being used for the do/dump and it's
       present at all
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    50a896cf
genetlink.c 32.6 KB