X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv6%2Fxfrm6_input.c;h=0791594f8878ac6e1a326c95f53ea833fd981d1d;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=c679a3ce4e165c4861c299052bf52f0cc139467d;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c index c679a3ce4..0791594f8 100644 --- a/net/ipv6/xfrm6_input.c +++ b/net/ipv6/xfrm6_input.c @@ -34,12 +34,11 @@ int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) struct xfrm_state *x; int xfrm_nr = 0; int decaps = 0; - int nexthdr = 0; - u8 *prevhdr = NULL; + int nexthdr; + unsigned int nhoff; - ip6_find_1stfragopt(skb, &prevhdr); - nexthdr = *prevhdr; - *nhoffp = prevhdr - skb->nh.raw; + nhoff = *nhoffp; + nexthdr = skb->nh.raw[nhoff]; if ((err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) goto drop; @@ -67,6 +66,8 @@ 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);