]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: allow NLA_NESTED to specify nested policy to validate
authorJohannes Berg <johannes.berg@intel.com>
Wed, 26 Sep 2018 09:15:33 +0000 (11:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Sep 2018 17:24:39 +0000 (10:24 -0700)
commitd40af33fb054678b9ff89fe813c0a1ce66629600
tree0a551784a6b946553793306790e75e1bb69d4f83
parentcc41ae1da2303c5c88a4d503c254c3c114db208a
netlink: allow NLA_NESTED to specify nested policy to validate

Now that we have a validation_data pointer, and the len field in
the policy is unused for NLA_NESTED, we can allow using them both
to have nested validation. This can be nice in code, although we
still have to use nla_parse_nested() or similar which would also
take a policy; however, it also serves as documentation in the
policy without requiring a look at the code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/netlink.h
lib/nlattr.c