diff options
| author | Johannes Berg <[email protected]> | 2018-09-26 09:15:34 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-09-28 17:24:39 +0000 |
| commit | 1501d13596b92d6d1f0ea5e104be838188b6e026 (patch) | |
| tree | 8cce360cee760f94af43ef1c236cdbbbbf57a4d3 /drivers/net/xen-netback/interface.c | |
| parent | netlink: allow NLA_NESTED to specify nested policy to validate (diff) | |
| download | kernel-1501d13596b92d6d1f0ea5e104be838188b6e026.tar.gz kernel-1501d13596b92d6d1f0ea5e104be838188b6e026.zip | |
netlink: add nested array policy validation
Sometimes nested netlink attributes are just used as arrays, with
the nla_type() of each not being used; we have this in nl80211 and
e.g. NFTA_SET_ELEM_LIST_ELEMENTS.
Add the ability to validate this type of message directly in the
policy, by adding the type NLA_NESTED_ARRAY which does exactly
this: require a first level of nesting but ignore the attribute
type, and then inside each require a second level of nested and
validate those attributes against a given policy (if present).
Note that some nested array types actually require that all of
the entries have the same index, this is possible to express in
a nested policy already, apart from the validation that only the
one allowed type is used.
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
