diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-28 19:49:30 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-28 19:56:04 -0600 |
commit | 2d4fa2a6e7903ec3340f1b075456cbd84ba6a744 (patch) | |
tree | d5137425a403fd82b88c3a43d050887890108bc3 /src/compat | |
parent | cf877de9a8b38422aef6beb514b688a0eedae4d8 (diff) |
queueing: backport skb_reset_redirect change from 5.6
This backports upstream commit 2c64605b590edadb3fb46d1ec6badb49e940b479.
It makes no difference for us, but it's nice to keep this code in sync
with upstream as much as possible.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/compat.h | 10 |
1 files changed, 10 insertions, 0 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 |