aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compat/compat.h5
-rw-r--r--src/queueing.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index e08edca..7a61e4c 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -773,6 +773,11 @@ struct __kernel_timespec {
#endif
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
+#include <linux/skbuff.h>
+#define skb_probe_transport_header(a) skb_probe_transport_header(a, 0)
+#endif
+
/* https://github.com/ClangBuiltLinux/linux/issues/7 */
#if defined( __clang__) && (!defined(CONFIG_CLANG_VERSION) || CONFIG_CLANG_VERSION < 80000)
#include <linux/bug.h>
diff --git a/src/queueing.h b/src/queueing.h
index dcfe938..f8de703 100644
--- a/src/queueing.h
+++ b/src/queueing.h
@@ -102,7 +102,8 @@ static inline void wg_reset_packet(struct sk_buff *skb)
skb->hdr_len = skb_headroom(skb);
skb_reset_mac_header(skb);
skb_reset_network_header(skb);
- skb_probe_transport_header(skb, 0);
+ skb_reset_transport_header(skb);
+ skb_probe_transport_header(skb);
skb_reset_inner_headers(skb);
}