summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-07-19 17:24:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-07-19 17:24:18 +0200
commit08f1bfe29a08d9f10f9fa4c47e07a3501a4a8c8a (patch)
treee548f2ccf7d121d3f1bad1ca89833b4d7c27ef3a
parentnoise: immediately rekey all peers after changing device private key (diff)
downloadwireguard-monolithic-historical-08f1bfe29a08d9f10f9fa4c47e07a3501a4a8c8a.tar.xz
wireguard-monolithic-historical-08f1bfe29a08d9f10f9fa4c47e07a3501a4a8c8a.zip
compat: support running in OpenVZ environments
Overriding LLTX like this is pretty ugly, but at least it means we don't have to let OpenVZ infect the real source tree. Requested-by: Benedikt Braunger <b.braunger@syseleven.de>
-rw-r--r--src/compat/compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 6288550..c98d623 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -844,6 +844,14 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
#define cpu_have_named_feature(name) (elf_hwcap & (HWCAP_ ## name))
#endif
+#ifdef CONFIG_VE
+#include <linux/netdev_features.h>
+#ifdef NETIF_F_VIRTUAL
+#undef NETIF_F_LLTX
+#define NETIF_F_LLTX (__NETIF_F(LLTX) | __NETIF_F(VIRTUAL))
+#endif
+#endif
+
/* https://github.com/ClangBuiltLinux/linux/issues/7 */
#if defined( __clang__) && (!defined(CONFIG_CLANG_VERSION) || CONFIG_CLANG_VERSION < 80000)
#include <linux/bug.h>