aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 21:02:22 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:27 -0400
commitb0061ce49c83657563b64ffcf1ec137110230d93 (patch)
treebe6788071fdbc53261ee395f596705e1418461d1 /net
parentaa8223c7bb0b05183e1737881ed21827aa5b9e73 (diff)
[SK_BUFF]: Introduce ipip_hdr(), remove skb->h.ipiph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/xfrm4_mode_beet.c6
-rw-r--r--net/ipv4/xfrm4_mode_tunnel.c6
-rw-r--r--net/ipv6/xfrm6_mode_tunnel.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c
index 9e5ba12c6c75..32fcfc0b5c8c 100644
--- a/net/ipv4/xfrm4_mode_beet.c
+++ b/net/ipv4/xfrm4_mode_beet.c
@@ -83,7 +83,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb)
83 83
84 if (!pskb_may_pull(skb, sizeof(*ph))) 84 if (!pskb_may_pull(skb, sizeof(*ph)))
85 goto out; 85 goto out;
86 ph = (struct ip_beet_phdr *)(skb->h.ipiph + 1); 86 ph = (struct ip_beet_phdr *)(ipip_hdr(skb) + 1);
87 87
88 phlen = sizeof(*ph) + ph->padlen; 88 phlen = sizeof(*ph) + ph->padlen;
89 optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen); 89 optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen);
@@ -97,9 +97,9 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb)
97 ph_nexthdr = ph->nexthdr; 97 ph_nexthdr = ph->nexthdr;
98 } 98 }
99 99
100 skb->nh.raw = skb->data + (phlen - sizeof(*iph)); 100 skb_set_network_header(skb, phlen - sizeof(*iph));
101 memmove(skb_network_header(skb), iph, sizeof(*iph)); 101 memmove(skb_network_header(skb), iph, sizeof(*iph));
102 skb->h.raw = skb->data + (phlen + optlen); 102 skb_set_transport_header(skb, phlen + optlen);
103 skb->data = skb->h.raw; 103 skb->data = skb->h.raw;
104 104
105 iph = ip_hdr(skb); 105 iph = ip_hdr(skb);
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c
index edba75610a46..521e52f055c1 100644
--- a/net/ipv4/xfrm4_mode_tunnel.c
+++ b/net/ipv4/xfrm4_mode_tunnel.c
@@ -17,7 +17,7 @@
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 = ip_hdr(skb); 19 struct iphdr *outer_iph = ip_hdr(skb);
20 struct iphdr *inner_iph = skb->h.ipiph; 20 struct iphdr *inner_iph = ipip_hdr(skb);
21 21
22 if (INET_ECN_is_ce(outer_iph->tos)) 22 if (INET_ECN_is_ce(outer_iph->tos))
23 IP_ECN_set_ce(inner_iph); 23 IP_ECN_set_ce(inner_iph);
@@ -47,7 +47,7 @@ static int xfrm4_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
47 int flags; 47 int flags;
48 48
49 iph = ip_hdr(skb); 49 iph = ip_hdr(skb);
50 skb->h.ipiph = iph; 50 skb->h.raw = skb->nh.raw;
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);
@@ -116,7 +116,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
116 iph = ip_hdr(skb); 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, ipip_hdr(skb));
120 if (!(x->props.flags & XFRM_STATE_NOECN)) 120 if (!(x->props.flags & XFRM_STATE_NOECN))
121 ipip_ecn_decapsulate(skb); 121 ipip_ecn_decapsulate(skb);
122 } 122 }
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c
index 28f36b363d1f..9d3bd338e5d0 100644
--- a/net/ipv6/xfrm6_mode_tunnel.c
+++ b/net/ipv6/xfrm6_mode_tunnel.c
@@ -28,7 +28,7 @@ static inline void ipip6_ecn_decapsulate(struct sk_buff *skb)
28static inline void ip6ip_ecn_decapsulate(struct sk_buff *skb) 28static inline void ip6ip_ecn_decapsulate(struct sk_buff *skb)
29{ 29{
30 if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6_hdr(skb)))) 30 if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6_hdr(skb))))
31 IP_ECN_set_ce(skb->h.ipiph); 31 IP_ECN_set_ce(ipip_hdr(skb));
32} 32}
33 33
34/* Add encapsulation header. 34/* Add encapsulation header.