Johannes Berg 1501d13596 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 <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-28 10:24:39 -07:00
..
2018-08-14 23:49:13 +02:00
2018-08-25 14:12:36 -07:00
2018-08-20 15:38:44 -07:00
2018-08-23 15:34:48 -07:00
2018-08-15 22:06:26 -07:00
2018-07-26 00:12:56 -07:00
2018-09-17 18:59:21 +02:00
2018-08-23 15:44:58 -07:00