aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_mode_transport.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-21 01:47:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:10 -0400
commiteddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch)
tree4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /net/ipv4/xfrm4_mode_transport.c
parente023dd643798c4f06c16466af90b4d250e4b8bd7 (diff)
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_mode_transport.c')
-rw-r--r--net/ipv4/xfrm4_mode_transport.c11
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 */
24static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb) 24static 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}