aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mip6.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 21:04:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:31 -0400
commit9c70220b73908f64792422a2c39c593c4792f2c5 (patch)
tree2090ea10aaa2714a5e095bae8cc02e743c378a3a /net/ipv6/mip6.c
parenta27ef749e7be3b06fb58df53d94eb97a21f18707 (diff)
[SK_BUFF]: Introduce skb_transport_header(skb)
For the places where we need a pointer to the transport header, it is still legal to touch skb->h.raw directly if just adding to, subtracting from or setting it to another layer header. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/mip6.c')
-rw-r--r--net/ipv6/mip6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c
index 85202891644e..f0288e92fb52 100644
--- a/net/ipv6/mip6.c
+++ b/net/ipv6/mip6.c
@@ -92,10 +92,10 @@ int mip6_mh_filter(struct sock *sk, struct sk_buff *skb)
92 92
93 if (!pskb_may_pull(skb, (skb_transport_offset(skb)) + 8) || 93 if (!pskb_may_pull(skb, (skb_transport_offset(skb)) + 8) ||
94 !pskb_may_pull(skb, (skb_transport_offset(skb) + 94 !pskb_may_pull(skb, (skb_transport_offset(skb) +
95 ((skb->h.raw[1] + 1) << 3)))) 95 ((skb_transport_header(skb)[1] + 1) << 3))))
96 return -1; 96 return -1;
97 97
98 mh = (struct ip6_mh *)skb->h.raw; 98 mh = (struct ip6_mh *)skb_transport_header(skb);
99 99
100 if (mh->ip6mh_hdrlen < mip6_mh_len(mh->ip6mh_type)) { 100 if (mh->ip6mh_hdrlen < mip6_mh_len(mh->ip6mh_type)) {
101 LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH message too short: %d vs >=%d\n", 101 LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH message too short: %d vs >=%d\n",
@@ -158,7 +158,7 @@ static int mip6_destopt_output(struct xfrm_state *x, struct sk_buff *skb)
158 nexthdr = *skb_network_header(skb); 158 nexthdr = *skb_network_header(skb);
159 *skb_network_header(skb) = IPPROTO_DSTOPTS; 159 *skb_network_header(skb) = IPPROTO_DSTOPTS;
160 160
161 dstopt = (struct ipv6_destopt_hdr *)skb->h.raw; 161 dstopt = (struct ipv6_destopt_hdr *)skb_transport_header(skb);
162 dstopt->nexthdr = nexthdr; 162 dstopt->nexthdr = nexthdr;
163 163
164 hao = mip6_padn((char *)(dstopt + 1), 164 hao = mip6_padn((char *)(dstopt + 1),
@@ -370,7 +370,7 @@ static int mip6_rthdr_output(struct xfrm_state *x, struct sk_buff *skb)
370 nexthdr = *skb_network_header(skb); 370 nexthdr = *skb_network_header(skb);
371 *skb_network_header(skb) = IPPROTO_ROUTING; 371 *skb_network_header(skb) = IPPROTO_ROUTING;
372 372
373 rt2 = (struct rt2_hdr *)skb->h.raw; 373 rt2 = (struct rt2_hdr *)skb_transport_header(skb);
374 rt2->rt_hdr.nexthdr = nexthdr; 374 rt2->rt_hdr.nexthdr = nexthdr;
375 rt2->rt_hdr.hdrlen = (x->props.header_len >> 3) - 1; 375 rt2->rt_hdr.hdrlen = (x->props.header_len >> 3) - 1;
376 rt2->rt_hdr.type = IPV6_SRCRT_TYPE_2; 376 rt2->rt_hdr.type = IPV6_SRCRT_TYPE_2;