]> err.no Git - linux-2.6/commitdiff
[SK_BUFF] xfrm4: use skb_reset_network_header
authorArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 10 Mar 2007 22:59:16 +0000 (19:59 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:24:55 +0000 (22:24 -0700)
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 <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/xfrm4_mode_transport.c

index 290c0f2e7c29124a7112a352c20f3f698ef1f430..a820dde2c862a5bf435bb7864a464053d92665a1 100644 (file)
@@ -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;