From 3120425f69003be287cb2d308f89c7a6a0335ff0 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 17 May 2019 13:10:26 +0200 Subject: netlink: use new strict length types in policy for 5.2 Reported-by: Bruno Wolff III --- src/compat/compat.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/compat') diff --git a/src/compat/compat.h b/src/compat/compat.h index e8fa1ab..436fe44 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -821,6 +821,14 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) +#define NLA_EXACT_LEN NLA_UNSPEC +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) +#define NLA_MIN_LEN NLA_UNSPEC +#define COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY +#endif + /* https://github.com/ClangBuiltLinux/linux/issues/7 */ #if defined( __clang__) && (!defined(CONFIG_CLANG_VERSION) || CONFIG_CLANG_VERSION < 80000) #include -- cgit v1.2.3-59-g8ed1b