Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-drm-fsl-dcu.git] / net / ipv6 / mip6.c
index be7dd7db65d7684424083b66256703f12d3fb182..0afcabdd8ed6c9a52d434cce18ca96495dcc591c 100644 (file)
@@ -89,7 +89,6 @@ static int mip6_mh_len(int type)
 int mip6_mh_filter(struct sock *sk, struct sk_buff *skb)
 {
        struct ip6_mh *mh;
-       int mhlen;
 
        if (!pskb_may_pull(skb, (skb->h.raw - skb->data) + 8) ||
            !pskb_may_pull(skb, (skb->h.raw - skb->data) + ((skb->h.raw[1] + 1) << 3)))
@@ -103,31 +102,6 @@ int mip6_mh_filter(struct sock *sk, struct sk_buff *skb)
                mip6_param_prob(skb, 0, (&mh->ip6mh_hdrlen) - skb->nh.raw);
                return -1;
        }
-       mhlen = (mh->ip6mh_hdrlen + 1) << 3;
-
-       if (skb->ip_summed == CHECKSUM_COMPLETE) {
-               skb->ip_summed = CHECKSUM_UNNECESSARY;
-               if (csum_ipv6_magic(&skb->nh.ipv6h->saddr,
-                                   &skb->nh.ipv6h->daddr,
-                                   mhlen, IPPROTO_MH,
-                                   skb->csum)) {
-                       LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH hw checksum failed\n");
-                       skb->ip_summed = CHECKSUM_NONE;
-               }
-       }
-       if (skb->ip_summed == CHECKSUM_NONE) {
-               if (csum_ipv6_magic(&skb->nh.ipv6h->saddr,
-                                   &skb->nh.ipv6h->daddr,
-                                   mhlen, IPPROTO_MH,
-                                   skb_checksum(skb, 0, mhlen, 0))) {
-                       LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH checksum failed "
-                                      "[" NIP6_FMT " > " NIP6_FMT "]\n",
-                                      NIP6(skb->nh.ipv6h->saddr),
-                                      NIP6(skb->nh.ipv6h->daddr));
-                       return -1;
-               }
-               skb->ip_summed = CHECKSUM_UNNECESSARY;
-       }
 
        if (mh->ip6mh_proto != IPPROTO_NONE) {
                LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH invalid payload proto = %d\n",
@@ -359,7 +333,7 @@ static struct xfrm_type mip6_destopt_type =
        .destructor     = mip6_destopt_destroy,
        .input          = mip6_destopt_input,
        .output         = mip6_destopt_output,
-       .reject         = mip6_destopt_reject,
+       .reject         = mip6_destopt_reject,
        .hdr_offset     = mip6_destopt_offset,
        .local_addr     = mip6_xfrm_addr,
 };