An upcoming backport adds skb_dst() to a pre-2.6.31 Linux kernel, so we
have to check for the presence of an skb_dst() definition instead of for
the particular kernel version.
[OVS_DEFINE([HAVE_PROTO_DATA_VALID])])
OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [raw],
[OVS_DEFINE([HAVE_MAC_RAW])])
[OVS_DEFINE([HAVE_PROTO_DATA_VALID])])
OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [raw],
[OVS_DEFINE([HAVE_MAC_RAW])])
+ OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_dst(],
+ [OVS_DEFINE([HAVE_SKB_DST_ACCESSOR_FUNCS])])
OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h],
[skb_copy_from_linear_data_offset],
[OVS_DEFINE([HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET])])
OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h],
[skb_copy_from_linear_data_offset],
[OVS_DEFINE([HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET])])
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+#ifndef HAVE_SKB_DST_ACCESSOR_FUNCS
static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
{
return (struct dst_entry *)skb->dst;
static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
{
return (struct dst_entry *)skb->dst;