This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / net / ipv6 / xfrm6_input.c
index 0791594..c679a3c 100644 (file)
@@ -34,11 +34,12 @@ int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
        struct xfrm_state *x;
        int xfrm_nr = 0;
        int decaps = 0;
-       int nexthdr;
-       unsigned int nhoff;
+       int nexthdr = 0;
+       u8 *prevhdr = NULL;
 
-       nhoff = *nhoffp;
-       nexthdr = skb->nh.raw[nhoff];
+       ip6_find_1stfragopt(skb, &prevhdr);
+       nexthdr = *prevhdr;
+       *nhoffp = prevhdr - skb->nh.raw;
 
        if ((err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0)
                goto drop;
@@ -66,8 +67,6 @@ int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
                if (nexthdr <= 0)
                        goto drop_unlock;
 
-               skb->nh.raw[nhoff] = nexthdr;
-
                if (x->props.replay_window)
                        xfrm_replay_advance(x, seq);