Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
#include <linux/version.h>
#include <net/ipv6.h>
#include <linux/version.h>
#include <net/ipv6.h>
-#ifndef HAVE_IP6_FH_F_SKIP_RH
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
int rpl_ipv6_skip_exthdr(const struct sk_buff *skb, int start,
u8 *nexthdrp, __be16 *frag_offp)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
int rpl_ipv6_skip_exthdr(const struct sk_buff *skb, int start,
u8 *nexthdrp, __be16 *frag_offp)
}
#endif /* Kernel version < 3.3 */
}
#endif /* Kernel version < 3.3 */
+#ifndef HAVE_IP6_FH_F_SKIP_RH
/*
* find the offset to specified header or the protocol number of last header
* if target < 0. "last header" is transport protocol header, ESP, or
/*
* find the offset to specified header or the protocol number of last header
* if target < 0. "last header" is transport protocol header, ESP, or
#define NEXTHDR_SCTP 132 /* Stream Control Transport Protocol */
#endif
#define NEXTHDR_SCTP 132 /* Stream Control Transport Protocol */
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
+#define ipv6_skip_exthdr rpl_ipv6_skip_exthdr
+extern int ipv6_skip_exthdr(const struct sk_buff *skb, int start,
+ u8 *nexthdrp, __be16 *frag_offp);
+#endif
+
#ifndef HAVE_IP6_FH_F_SKIP_RH
enum {
#ifndef HAVE_IP6_FH_F_SKIP_RH
enum {
IP6_FH_F_SKIP_RH = (1 << 2),
};
IP6_FH_F_SKIP_RH = (1 << 2),
};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
-#define ipv6_skip_exthdr rpl_ipv6_skip_exthdr
-extern int ipv6_skip_exthdr(const struct sk_buff *skb, int start,
- u8 *nexthdrp, __be16 *frag_offp);
-#endif
-
/* This function is upstream, but not the version which skips routing
* headers with 0 segments_left. We fixed it when we introduced
* IP6_FH_F_SKIP_RH.
/* This function is upstream, but not the version which skips routing
* headers with 0 segments_left. We fixed it when we introduced
* IP6_FH_F_SKIP_RH.