summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/esp4.c2
-rw-r--r--net/ipv4/udp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index ed3deed66445..957674562801 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -27,7 +27,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
int nfrags;
/* Strip IP+ESP header. */
- __skb_pull(skb, skb->h.raw - skb->data);
+ __skb_pull(skb, skb_transport_offset(skb));
/* Now skb is pure payload to encrypt */
err = -ENOMEM;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 13739cd8206f..13875e8419a7 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -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;