From e0af0f44fd66669367fb61159decf752c46eeb9e Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 23 Feb 2018 00:06:18 +0100 Subject: compat: workaround netlink refcount bug For now it looks like only 4.16 has this, but we'll keep track in case others add it too. Upstream-fix: b87b6194be63 ("netlink: put module reference if dump start fails") --- src/compat/compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compat/compat.h b/src/compat/compat.h index ba251a0..f92fe54 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -482,7 +482,7 @@ static inline struct nlattr **genl_family_attrbuf(const struct genl_family *fami #else #define ___COMPAT_NETLINK_DUMP_BLOCK return get_device_dump_real(skb, cb); #endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 14) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 63) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) #define get_device_dump(a, b) get_device_dump_real(a, b); \ static int get_device_dump(a, b) { \ struct wireguard_device *wg = (struct wireguard_device *)cb->args[0]; \ -- cgit v1.2.3-59-g8ed1b