summaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_mode_transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/xfrm4_mode_transport.c')
-rw-r--r--net/ipv4/xfrm4_mode_transport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c
index 290c0f2..a820dde 100644
--- a/net/ipv4/xfrm4_mode_transport.c
+++ b/net/ipv4/xfrm4_mode_transport.c
@@ -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;
OpenPOWER on IntegriCloud