diff options
Diffstat (limited to 'net/ipv4/xfrm4_mode_transport.c')
-rw-r--r-- | net/ipv4/xfrm4_mode_transport.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c index b198087c073e..124f24bc4dbc 100644 --- a/net/ipv4/xfrm4_mode_transport.c +++ b/net/ipv4/xfrm4_mode_transport.c | |||
@@ -23,13 +23,10 @@ | |||
23 | */ | 23 | */ |
24 | static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb) | 24 | static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb) |
25 | { | 25 | { |
26 | struct iphdr *iph; | 26 | struct iphdr *iph = ip_hdr(skb); |
27 | int ihl; | 27 | int ihl = iph->ihl * 4; |
28 | 28 | ||
29 | iph = skb->nh.iph; | 29 | skb->h.raw = skb->nh.raw; |
30 | skb->h.ipiph = iph; | ||
31 | |||
32 | ihl = iph->ihl * 4; | ||
33 | skb->h.raw += ihl; | 30 | skb->h.raw += ihl; |
34 | 31 | ||
35 | skb_push(skb, x->props.header_len); | 32 | skb_push(skb, x->props.header_len); |
@@ -54,7 +51,7 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb) | |||
54 | memmove(skb->h.raw, skb_network_header(skb), ihl); | 51 | memmove(skb->h.raw, skb_network_header(skb), ihl); |
55 | skb->nh.raw = skb->h.raw; | 52 | skb->nh.raw = skb->h.raw; |
56 | } | 53 | } |
57 | skb->nh.iph->tot_len = htons(skb->len + ihl); | 54 | ip_hdr(skb)->tot_len = htons(skb->len + ihl); |
58 | skb->h.raw = skb->data; | 55 | skb->h.raw = skb->data; |
59 | return 0; | 56 | return 0; |
60 | } | 57 | } |