diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-13 04:30:44 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-13 15:05:46 +0200 |
commit | dfc0e0a6f4ae386cd5ad516356355e4fc790e60e (patch) | |
tree | 9f2d802031516f6e1b7d1ff5cf8a52ddd867ad95 /src/compat | |
parent | skb_reset: do not free socket memory with preemption disabled (diff) | |
download | wireguard-monolithic-historical-jd/partial-preempt-fix.tar.xz wireguard-monolithic-historical-jd/partial-preempt-fix.zip |
compat: backport ipvs_resetjd/partial-preempt-fix
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/compat.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index 2853c09..f040f04 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -591,6 +591,17 @@ static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) +#include <linux/skbuff.h> +static inline void __wgcompat_ipvs_reset(struct sk_buff *skb) +{ +#if IS_ENABLED(CONFIG_IP_VS) + skb->ipvs_property = 0; +#endif +} +#define ipvs_reset __wgcompat_ipvs_reset +#endif + /* https://lkml.org/lkml/2017/6/23/790 */ #if IS_ENABLED(CONFIG_NF_CONNTRACK) #include <linux/ip.h> |