From: Arnaldo Carvalho de Melo Date: Sat, 10 Mar 2007 22:59:16 +0000 (-0300) Subject: [SK_BUFF] xfrm4: use skb_reset_network_header X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=7f5c0cb05f158ee91414e1f99d3fe18349a80371;p=deliverable%2Flinux.git [SK_BUFF] xfrm4: use skb_reset_network_header Setting it to skb->h.raw, which is valid, in the (to become) old pointer based world order and in the new world of offset based layer headers. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c index 290c0f2e7c29..a820dde2c862 100644 --- a/net/ipv4/xfrm4_mode_transport.c +++ b/net/ipv4/xfrm4_mode_transport.c @@ -50,8 +50,10 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb) { int ihl = skb->data - skb->h.raw; - if (skb->h.raw != skb->nh.raw) - skb->nh.raw = memmove(skb->h.raw, skb->nh.raw, ihl); + if (skb->h.raw != skb->nh.raw) { + memmove(skb->h.raw, skb->nh.raw, ihl); + skb->nh.raw = skb->h.raw; + } skb->nh.iph->tot_len = htons(skb->len + ihl); skb->h.raw = skb->data; return 0;