Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux...
[powerpc.git] / net / ipv6 / xfrm6_policy.c
index cb5a723..3ec0c47 100644 (file)
@@ -18,7 +18,7 @@
 #include <net/ip.h>
 #include <net/ipv6.h>
 #include <net/ip6_route.h>
-#ifdef CONFIG_IPV6_MIP6
+#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
 #include <net/mip6.h>
 #endif
 
@@ -240,7 +240,8 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
                if (!afinfo) {
                        dst = *dst_p;
                        goto error;
-               };
+               }
+
                dst_prev->output = afinfo->output;
                xfrm_state_put_afinfo(afinfo);
                /* Sheit... I remember I did this right. Apparently,
@@ -270,8 +271,8 @@ error:
 static inline void
 _decode_session6(struct sk_buff *skb, struct flowi *fl)
 {
-       u16 offset = skb->h.raw - skb->nh.raw;
-       struct ipv6hdr *hdr = skb->nh.ipv6h;
+       u16 offset = skb_network_header_len(skb);
+       struct ipv6hdr *hdr = ipv6_hdr(skb);
        struct ipv6_opt_hdr *exthdr;
        const unsigned char *nh = skb_network_header(skb);
        u8 nexthdr = nh[IP6CB(skb)->nhoff];
@@ -317,7 +318,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl)
                        fl->proto = nexthdr;
                        return;
 
-#ifdef CONFIG_IPV6_MIP6
+#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
                case IPPROTO_MH:
                        if (pskb_may_pull(skb, nh + offset + 3 - skb->data)) {
                                struct ip6_mh *mh;
@@ -337,7 +338,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl)
                        fl->fl_ipsec_spi = 0;
                        fl->proto = nexthdr;
                        return;
-               };
+               }
        }
 }