summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux/netlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'backport/backport-include/linux/netlink.h')
-rw-r--r--backport/backport-include/linux/netlink.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h
index a40cc0f7..58fad589 100644
--- a/backport/backport-include/linux/netlink.h
+++ b/backport/backport-include/linux/netlink.h
@@ -3,6 +3,23 @@
#include_next <linux/netlink.h>
#include <linux/version.h>
+#if LINUX_VERSION_IS_LESS(4,12,0)
+#define NETLINK_MAX_COOKIE_LEN 20
+
+struct netlink_ext_ack {
+ const char *_msg;
+ const struct nlattr *bad_attr;
+ u8 cookie[NETLINK_MAX_COOKIE_LEN];
+ u8 cookie_len;
+};
+
+#define NL_SET_ERR_MSG(extack, msg) do { \
+ static const char _msg[] = (msg); \
+ \
+ (extack)->_msg = _msg; \
+} while (0)
+#endif
+
/* this is for patches we apply */
#if LINUX_VERSION_IS_LESS(3,7,0)
#define netlink_notify_portid(__notify) (__notify->pid)