aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_mode_tunnel.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_tunnel.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_tunnel.c')
-rw-r--r--net/ipv4/xfrm4_mode_tunnel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c
index bec851f278e5..faa1b9a76e76 100644
--- a/net/ipv4/xfrm4_mode_tunnel.c
+++ b/net/ipv4/xfrm4_mode_tunnel.c
@@ -16,7 +16,7 @@
16 16
17static inline void ipip_ecn_decapsulate(struct sk_buff *skb) 17static inline void ipip_ecn_decapsulate(struct sk_buff *skb)
18{ 18{
19 struct iphdr *outer_iph = skb->nh.iph; 19 struct iphdr *outer_iph = ip_hdr(skb);
20 struct iphdr *inner_iph = skb->h.ipiph; 20 struct iphdr *inner_iph = skb->h.ipiph;
21 21
22 if (INET_ECN_is_ce(outer_iph->tos)) 22 if (INET_ECN_is_ce(outer_iph->tos))
@@ -46,12 +46,12 @@ static int xfrm4_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
46 struct iphdr *iph, *top_iph; 46 struct iphdr *iph, *top_iph;
47 int flags; 47 int flags;
48 48
49 iph = skb->nh.iph; 49 iph = ip_hdr(skb);
50 skb->h.ipiph = iph; 50 skb->h.ipiph = iph;
51 51
52 skb_push(skb, x->props.header_len); 52 skb_push(skb, x->props.header_len);
53 skb_reset_network_header(skb); 53 skb_reset_network_header(skb);
54 top_iph = skb->nh.iph; 54 top_iph = ip_hdr(skb);
55 55
56 top_iph->ihl = 5; 56 top_iph->ihl = 5;
57 top_iph->version = 4; 57 top_iph->version = 4;
@@ -91,7 +91,7 @@ static int xfrm4_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
91 91
92static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) 92static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
93{ 93{
94 struct iphdr *iph = skb->nh.iph; 94 struct iphdr *iph = ip_hdr(skb);
95 const unsigned char *old_mac; 95 const unsigned char *old_mac;
96 int err = -EINVAL; 96 int err = -EINVAL;
97 97
@@ -113,7 +113,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
113 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) 113 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
114 goto out; 114 goto out;
115 115
116 iph = skb->nh.iph; 116 iph = ip_hdr(skb);
117 if (iph->protocol == IPPROTO_IPIP) { 117 if (iph->protocol == IPPROTO_IPIP) {
118 if (x->props.flags & XFRM_STATE_DECAP_DSCP) 118 if (x->props.flags & XFRM_STATE_DECAP_DSCP)
119 ipv4_copy_dscp(iph, skb->h.ipiph); 119 ipv4_copy_dscp(iph, skb->h.ipiph);