#include <net/route.h>
#include <net/xfrm.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
-#define GROUP_ID(grp) 0
-#else
+#ifdef HAVE_GENL_MULTICAST_GROUP_WITH_ID
#define GROUP_ID(grp) ((grp)->id)
+#else
+#define GROUP_ID(grp) 0
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
{
struct rtable *rt;
/* Tunnel configuration keeps DSCP part of TOS bits, But Linux
- * router expect RT_TOS bits only. */
+ * router expect RT_TOS bits only.
+ */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
struct flowi fl = { .nl_u = { .ip4_u = {
return rt;
#endif
}
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+static inline bool skb_encapsulation(struct sk_buff *skb)
+{
+ return skb->encapsulation;
+}
+#else
+#define skb_encapsulation(skb) false
+#endif
+
#endif /* compat.h */