diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-10-02 17:22:45 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-10-02 21:25:49 +0200 |
commit | b49a73b91de67fda787669b0c889fa2c5a24b0a6 (patch) | |
tree | e02472583133b4f00b17b9bd425e164d1c496a33 /backport/backport-include/linux/netlink.h | |
parent | d285fc4bc91fe23500bd78fa8b7bae22e21bddd8 (diff) |
backports: backport most of improved netlink policy validation
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/backport-include/linux/netlink.h')
-rw-r--r-- | backport/backport-include/linux/netlink.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h index 468a12d1..366c9e27 100644 --- a/backport/backport-include/linux/netlink.h +++ b/backport/backport-include/linux/netlink.h @@ -3,6 +3,13 @@ #include_next <linux/netlink.h> #include <linux/version.h> +#if LINUX_VERSION_IS_LESS(4,14,0) +struct nla_bitfield32 { + __u32 value; + __u32 selector; +}; +#endif + #if LINUX_VERSION_IS_LESS(4,12,0) #define NETLINK_MAX_COOKIE_LEN 20 @@ -23,6 +30,18 @@ struct netlink_ext_ack { } while (0) #endif +#ifndef NL_SET_ERR_MSG_ATTR +#define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \ + static const char __msg[] = msg; \ + struct netlink_ext_ack *__extack = (extack); \ + \ + if (__extack) { \ + __extack->_msg = __msg; \ + __extack->bad_attr = (attr); \ + } \ +} while (0) +#endif + /* this is for patches we apply */ #if LINUX_VERSION_IS_LESS(3,7,0) #define netlink_notify_portid(__notify) (__notify->pid) |