aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-12-08 13:46:21 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-12 12:23:45 +0100
commitf29e3acc336e911e88ffa9bbcba24efaf6caaee7 (patch)
tree563ce60f485cc36500d5f701a781e6dddcd69702 /src/compat
parentversion: bump snapshot (diff)
downloadwireguard-monolithic-historical-f29e3acc336e911e88ffa9bbcba24efaf6caaee7.tar.xz
wireguard-monolithic-historical-f29e3acc336e911e88ffa9bbcba24efaf6caaee7.zip
socket: convert to ipv6_dst_lookup_flow for 5.5
Upstream changed the API, so we introduce this super insane compat hack to make everything work again.
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index ab22fa4..b4a8f8b 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -861,6 +861,10 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
})
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)
+#define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + (void *)0 ?: dst
+#endif
+
#if defined(ISUBUNTU1604)
#include <linux/siphash.h>
#ifndef _WG_LINUX_SIPHASH_H