datapath: remove rpl_ipv6_skip_exthdr
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Thu, 21 Jul 2016 18:14:15 +0000 (11:14 -0700)
committerPravin B Shelar <pshelar@ovn.org>
Tue, 26 Jul 2016 03:58:12 +0000 (20:58 -0700)
This backported functon was only used for Linux 3.2 or older. As we support only
Linux 3.10 or newer, there is no need for it anymore.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
datapath/linux/compat/exthdrs_core.c
datapath/linux/compat/include/net/ipv6.h

index 6692ce3..697f9d0 100644 (file)
@@ -2,52 +2,6 @@
 #include <linux/version.h>
 #include <net/ipv6.h>
 
-#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)
-{
-       u8 nexthdr = *nexthdrp;
-
-       *frag_offp = 0;
-
-       while (ipv6_ext_hdr(nexthdr)) {
-               struct ipv6_opt_hdr _hdr, *hp;
-               int hdrlen;
-
-               if (nexthdr == NEXTHDR_NONE)
-                       return -1;
-               hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr);
-               if (hp == NULL)
-                       return -1;
-               if (nexthdr == NEXTHDR_FRAGMENT) {
-                       __be16 _frag_off, *fp;
-                       fp = skb_header_pointer(skb,
-                                               start+offsetof(struct frag_hdr,
-                                                              frag_off),
-                                               sizeof(_frag_off),
-                                               &_frag_off);
-                       if (fp == NULL)
-                               return -1;
-
-                       *frag_offp = *fp;
-                       if (ntohs(*frag_offp) & ~0x7)
-                               break;
-                       hdrlen = 8;
-               } else if (nexthdr == NEXTHDR_AUTH)
-                       hdrlen = (hp->hdrlen+2)<<2;
-               else
-                       hdrlen = ipv6_optlen(hp);
-
-               nexthdr = hp->nexthdr;
-               start += hdrlen;
-       }
-
-       *nexthdrp = nexthdr;
-       return start;
-}
-EXPORT_SYMBOL_GPL(rpl_ipv6_skip_exthdr);
-#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
index dbb66e1..48a307a 100644 (file)
@@ -9,12 +9,6 @@
 #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 rpl_ipv6_skip_exthdr(const struct sk_buff *skb, int start,
-                               u8 *nexthdrp, __be16 *frag_offp);
-#endif
-
 #ifndef HAVE_IP6_FH_F_SKIP_RH
 
 enum {