From: Pravin B Shelar Date: Mon, 3 Nov 2014 16:55:12 +0000 (-0800) Subject: datapath: Fix compat checks for ipv6_skip_exthdr() X-Git-Tag: v2.3.1~8 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=390a6ec40c9d38e82870359bf44e0427da6b0025 datapath: Fix compat checks for ipv6_skip_exthdr() Signed-off-by: Pravin B Shelar --- diff --git a/datapath/linux/compat/exthdrs_core.c b/datapath/linux/compat/exthdrs_core.c index 29e4e056d..56a17daaf 100644 --- a/datapath/linux/compat/exthdrs_core.c +++ b/datapath/linux/compat/exthdrs_core.c @@ -2,7 +2,6 @@ #include #include -#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) @@ -48,6 +47,7 @@ int rpl_ipv6_skip_exthdr(const struct sk_buff *skb, int start, } #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 diff --git a/datapath/linux/compat/include/net/ipv6.h b/datapath/linux/compat/include/net/ipv6.h index 1762a4d45..450e3079a 100644 --- a/datapath/linux/compat/include/net/ipv6.h +++ b/datapath/linux/compat/include/net/ipv6.h @@ -9,6 +9,12 @@ #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 { @@ -17,12 +23,6 @@ enum { 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.