aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/xfrm6_input.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-10 23:50:43 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:59 -0400
commitd56f90a7c96da5187f0cdf07ee7434fe6aa78bbc (patch)
tree3b9073cecfbb3b6a1e25ab2b5dd2a22a43aef238 /net/ipv6/xfrm6_input.c
parentbbe735e4247dba32568a305553b010081c8dea99 (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/xfrm6_input.c')
-rw-r--r--net/ipv6/xfrm6_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c
index 33a1b9200431..5c929f886129 100644
--- a/net/ipv6/xfrm6_input.c
+++ b/net/ipv6/xfrm6_input.c
@@ -28,7 +28,7 @@ int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi)
28 unsigned int nhoff; 28 unsigned int nhoff;
29 29
30 nhoff = IP6CB(skb)->nhoff; 30 nhoff = IP6CB(skb)->nhoff;
31 nexthdr = skb->nh.raw[nhoff]; 31 nexthdr = skb_network_header(skb)[nhoff];
32 32
33 seq = 0; 33 seq = 0;
34 if (!spi && (err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) 34 if (!spi && (err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0)
@@ -58,7 +58,7 @@ int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi)
58 if (nexthdr <= 0) 58 if (nexthdr <= 0)
59 goto drop_unlock; 59 goto drop_unlock;
60 60
61 skb->nh.raw[nhoff] = nexthdr; 61 skb_network_header(skb)[nhoff] = nexthdr;
62 62
63 if (x->props.replay_window) 63 if (x->props.replay_window)
64 xfrm_replay_advance(x, seq); 64 xfrm_replay_advance(x, seq);
@@ -113,7 +113,7 @@ int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi)
113 } else { 113 } else {
114#ifdef CONFIG_NETFILTER 114#ifdef CONFIG_NETFILTER
115 skb->nh.ipv6h->payload_len = htons(skb->len); 115 skb->nh.ipv6h->payload_len = htons(skb->len);
116 __skb_push(skb, skb->data - skb->nh.raw); 116 __skb_push(skb, skb->data - skb_network_header(skb));
117 117
118 NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL, 118 NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL,
119 ip6_rcv_finish); 119 ip6_rcv_finish);