diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-10 23:50:43 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:59 -0400 |
commit | d56f90a7c96da5187f0cdf07ee7434fe6aa78bbc (patch) | |
tree | 3b9073cecfbb3b6a1e25ab2b5dd2a22a43aef238 /net/ipv6/ip6_tunnel.c | |
parent | bbe735e4247dba32568a305553b010081c8dea99 (diff) |
[SK_BUFF]: Introduce skb_network_header()
For the places where we need a pointer to the network header, it is still legal
to touch skb->nh.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/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index a1e4f39c6793..aafbdfa8d785 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -995,9 +995,10 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) | |||
995 | !ip6_tnl_xmit_ctl(t) || ip6_tnl_addr_conflict(t, ipv6h)) | 995 | !ip6_tnl_xmit_ctl(t) || ip6_tnl_addr_conflict(t, ipv6h)) |
996 | return -1; | 996 | return -1; |
997 | 997 | ||
998 | if ((offset = parse_tlv_tnl_enc_lim(skb, skb->nh.raw)) > 0) { | 998 | offset = parse_tlv_tnl_enc_lim(skb, skb_network_header(skb)); |
999 | if (offset > 0) { | ||
999 | struct ipv6_tlv_tnl_enc_lim *tel; | 1000 | struct ipv6_tlv_tnl_enc_lim *tel; |
1000 | tel = (struct ipv6_tlv_tnl_enc_lim *) &skb->nh.raw[offset]; | 1001 | tel = (struct ipv6_tlv_tnl_enc_lim *)&skb_network_header(skb)[offset]; |
1001 | if (tel->encap_limit == 0) { | 1002 | if (tel->encap_limit == 0) { |
1002 | icmpv6_send(skb, ICMPV6_PARAMPROB, | 1003 | icmpv6_send(skb, ICMPV6_PARAMPROB, |
1003 | ICMPV6_HDR_FIELD, offset + 2, skb->dev); | 1004 | ICMPV6_HDR_FIELD, offset + 2, skb->dev); |