summaryrefslogtreecommitdiffhomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-08-27 09:55:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-08-27 09:55:29 +0200
commitdace9d04b9ab94e07104ffa8435ec49af48f7e3f (patch)
tree118e9d5300c61ebce34768080b8faf2ed9f56939 /src/compat/compat.h
parenta28032f2d1251daa717143c239451678e9481266 (diff)
compat: backport NLA policy macros
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 4dff967..9f6e725 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -834,10 +834,10 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) && !defined(ISRHEL8)
-#define NLA_EXACT_LEN NLA_UNSPEC
+#define NLA_POLICY_EXACT_LEN(_len) { .type = NLA_UNSPEC, .len = _len }
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) && !defined(ISRHEL8)
-#define NLA_MIN_LEN NLA_UNSPEC
+#define NLA_POLICY_MIN_LEN(_len) { .type = NLA_UNSPEC, .len = _len }
#define COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY
#endif