Browse Source

[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>
Arnaldo Carvalho de Melo 18 years ago
parent
commit
e4396b544f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      net/ipv4/xfrm4_mode_tunnel.c

+ 1 - 0
net/ipv4/xfrm4_mode_tunnel.c

@@ -111,6 +111,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 (iph->protocol == IPPROTO_IPIP) {
 		if (x->props.flags & XFRM_STATE_DECAP_DSCP)
 			ipv4_copy_dscp(iph, skb->h.ipiph);