]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Fix skb data reallocation handling in IPSEC
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 27 Feb 2007 19:08:33 +0000 (11:08 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 18:50:26 +0000 (10:50 -0800)
[XFRM_TUNNEL]: Reload header pointer after pskb_may_pull/pskb_expand_head

Please consider applying, this was found on your latest
net-2.6 tree while playing around with that ip_hdr() + turn
skb->nh/h/mac pointers  as offsets on 64 bits idea :-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/xfrm4_mode_tunnel.c

index e23c21d31a531ba927956f9a61b28d63caec72d7..21ed667c23ccff7cc49b24882a5f2815cf117c8a 100644 (file)
@@ -84,6 +84,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
            (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
                goto out;
 
+       iph = skb->nh.iph;
        if (x->props.flags & XFRM_STATE_DECAP_DSCP)
                ipv4_copy_dscp(iph, skb->h.ipiph);
        if (!(x->props.flags & XFRM_STATE_NOECN))