Skip to content

Commit

Permalink
datapath: Fix compat checks for ipv6_skip_exthdr()
Browse files Browse the repository at this point in the history
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
  • Loading branch information
Pravin B Shelar committed Nov 4, 2014
1 parent 5e9a477 commit 02df89d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion datapath/linux/compat/exthdrs_core.c
Expand Up @@ -2,7 +2,6 @@
#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)
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions datapath/linux/compat/include/net/ipv6.h
Expand Up @@ -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 {
Expand All @@ -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.
Expand Down

0 comments on commit 02df89d

Please sign in to comment.