]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/udp.c
[SK_BUFF]: Introduce skb_transport_offset()
[~andy/linux] / net / ipv4 / udp.c
index b4cad50c18e903e7656dadf1da11ad27965fb007..13875e8419a7467360490fc8915fdf1ad669e84b 100644 (file)
@@ -435,7 +435,7 @@ static void udp4_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb,
                 * fragments on the socket so that all csums of sk_buffs
                 * should be together
                 */
-               offset = skb->h.raw - skb->data;
+               offset = skb_transport_offset(skb);
                skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
 
                skb->ip_summed = CHECKSUM_NONE;
@@ -1002,7 +1002,8 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
         * transport header to point to ESP.  Keep UDP on the stack
         * for later.
         */
-       skb->h.raw = __skb_pull(skb, len);
+       __skb_pull(skb, len);
+       skb_reset_transport_header(skb);
 
        /* modify the protocol (it's ESP!) */
        iph->protocol = IPPROTO_ESP;