aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 16:47:33 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 17:01:55 +0200
commitfaa21039618bbb21f7c2fc263d7f538befb53c5d (patch)
tree2b0e0ec9add859e59ce7323008c1fb930300026a /src/compat/compat.h
parentcompat: handle RHEL 7.5's recent backports (diff)
downloadwireguard-monolithic-historical-faa21039618bbb21f7c2fc263d7f538befb53c5d.tar.xz
wireguard-monolithic-historical-faa21039618bbb21f7c2fc263d7f538befb53c5d.zip
compat: don't clear header bits on RHEL
The 3.10 kernel from Red Hat puts head_frag in between headers_start and headers_end. This is triggered on the latest i40e driver. This results in the packet being freed incorrectly, crashing the system. So, this patch just ensures we don't zero any of the header bits. The whole issue of zeroing header bits probably should be revisited sometime somewhat soon.
Diffstat (limited to '')
-rw-r--r--src/compat/compat.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 1317345..27f22b3 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -34,7 +34,10 @@
#error "WireGuard requires Linux >= 3.10"
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && !defined(ISRHEL7)
+#if defined(ISRHEL7)
+#include <linux/skbuff.h>
+#define headers_end headers_start
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
#define headers_start data
#define headers_end data
#endif