summaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_mode_beet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/xfrm4_mode_beet.c')
-rw-r--r--net/ipv4/xfrm4_mode_beet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c
index eaaf3565f3b2..505fca034a1f 100644
--- a/net/ipv4/xfrm4_mode_beet.c
+++ b/net/ipv4/xfrm4_mode_beet.c
@@ -98,7 +98,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb)
}
skb->nh.raw = skb->data + (phlen - sizeof(*iph));
- memmove(skb->nh.raw, iph, sizeof(*iph));
+ memmove(skb_network_header(skb), iph, sizeof(*iph));
skb->h.raw = skb->data + (phlen + optlen);
skb->data = skb->h.raw;
@@ -112,7 +112,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb)
else
iph->protocol = protocol;
iph->check = 0;
- iph->check = ip_fast_csum(skb->nh.raw, iph->ihl);
+ iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl);
err = 0;
out:
return err;