diff options
-rw-r--r-- | src/compat/compat.h | 10 | ||||
-rw-r--r-- | src/queueing.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index 42f7bee..fe2d07e 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -1024,6 +1024,16 @@ out: #define COMPAT_CANNOT_USE_MAX_MTU #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) +#include <linux/skbuff.h> +static inline void skb_reset_redirect(struct sk_buff *skb) +{ +#ifdef CONFIG_NET_SCHED + skb_reset_tc(skb); +#endif +} +#endif + #if defined(ISUBUNTU1604) #include <linux/siphash.h> #ifndef _WG_LINUX_SIPHASH_H diff --git a/src/queueing.h b/src/queueing.h index 256c6be..fe6e5c9 100644 --- a/src/queueing.h +++ b/src/queueing.h @@ -103,8 +103,8 @@ static inline void wg_reset_packet(struct sk_buff *skb) skb->dev = NULL; #ifdef CONFIG_NET_SCHED skb->tc_index = 0; - skb_reset_tc(skb); #endif + skb_reset_redirect(skb); skb->hdr_len = skb_headroom(skb); skb_reset_mac_header(skb); skb_reset_network_header(skb); |