diff options
-rw-r--r-- | net/ipv4/xfrm4_mode_beet.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index 89cf59ea7bbe..16efc66a7c3f 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -42,10 +42,9 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
42 | 42 | ||
43 | skb->nh.raw = skb_push(skb, x->props.header_len + hdrlen); | 43 | skb->nh.raw = skb_push(skb, x->props.header_len + hdrlen); |
44 | top_iph = skb->nh.iph; | 44 | top_iph = skb->nh.iph; |
45 | hdrlen = iph->ihl * 4 - optlen; | 45 | skb->h.raw += sizeof(*iph) - hdrlen; |
46 | skb->h.raw += hdrlen; | ||
47 | 46 | ||
48 | memmove(top_iph, iph, hdrlen); | 47 | memmove(top_iph, iph, sizeof(*iph)); |
49 | if (unlikely(optlen)) { | 48 | if (unlikely(optlen)) { |
50 | struct ip_beet_phdr *ph; | 49 | struct ip_beet_phdr *ph; |
51 | 50 | ||