summaryrefslogtreecommitdiffhomepage
path: root/src/compat
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
commitff37e4cec3a8b6c7e7fe3db87e91dadb3eecbf11 (patch)
tree68890b641b92ea2c1587877befaa0cc95527641d /src/compat
parent361df1f39aef70bb8ad8ab71f68e417685a53792 (diff)
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> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-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>