]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commit9a659a35ba177cec30676e170fb6ed98157bcb0d
tree0a551784a6b946553793306790e75e1bb69d4f83
parentc29f1845b2b22974411278bad3a2ac0b7815dfb4
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