summaryrefslogtreecommitdiffhomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-02-27 14:07:22 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2017-02-27 15:03:15 -0800
commit5763a32e962eeeedb270080a6b082ab94c872d47 (patch)
treedd2ec3be81c2b9a21ca3d6e9bb906b78e8b3c9ab /src/compat/compat.h
parent11a6272ef82c37764ae57ee8ff64ac49e0d61352 (diff)
data: transition to skb_reset_tc for 4.11
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 277e7e7..c3b4289 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -161,6 +161,16 @@ static inline bool ipv6_mod_enabled(void)
}
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+#include <linux/skbuff.h>
+static inline void skb_reset_tc(struct sk_buff *skb)
+{
+#ifdef CONFIG_NET_CLS_ACT
+ skb->tc_verd = 0;
+#endif
+}
+#endif
+
/* https://lkml.org/lkml/2015/6/12/415 */
#include <linux/netdevice.h>
static inline struct net_device *netdev_pub(void *dev)