]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/xfrm4_mode_transport.c
[SK_BUFF]: Introduce skb_network_header()
[net-next-2.6.git] / net / ipv4 / xfrm4_mode_transport.c
index a820dde2c862a5bf435bb7864a464053d92665a1..b198087c073ec4b68f964ab1ea8fb1c116950393 100644 (file)
@@ -34,7 +34,7 @@ static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb)
 
        skb_push(skb, x->props.header_len);
        skb_reset_network_header(skb);
-       memmove(skb->nh.raw, iph, ihl);
+       memmove(skb_network_header(skb), iph, ihl);
        return 0;
 }
 
@@ -51,7 +51,7 @@ 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) {
-               memmove(skb->h.raw, skb->nh.raw, ihl);
+               memmove(skb->h.raw, skb_network_header(skb), ihl);
                skb->nh.raw = skb->h.raw;
        }
        skb->nh.iph->tot_len = htons(skb->len + ihl);