diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 21:04:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:31 -0400 |
commit | 9c70220b73908f64792422a2c39c593c4792f2c5 (patch) | |
tree | 2090ea10aaa2714a5e095bae8cc02e743c378a3a /net/ipv6/xfrm6_mode_transport.c | |
parent | a27ef749e7be3b06fb58df53d94eb97a21f18707 (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/xfrm6_mode_transport.c')
-rw-r--r-- | net/ipv6/xfrm6_mode_transport.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c index 0134d74ef087..d526f4e9c65e 100644 --- a/net/ipv6/xfrm6_mode_transport.c +++ b/net/ipv6/xfrm6_mode_transport.c | |||
@@ -51,10 +51,11 @@ static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb) | |||
51 | */ | 51 | */ |
52 | static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb) | 52 | static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb) |
53 | { | 53 | { |
54 | int ihl = skb->data - skb->h.raw; | 54 | int ihl = skb->data - skb_transport_header(skb); |
55 | 55 | ||
56 | if (skb->h.raw != skb->nh.raw) { | 56 | if (skb->h.raw != skb->nh.raw) { |
57 | memmove(skb->h.raw, skb_network_header(skb), ihl); | 57 | memmove(skb_transport_header(skb), |
58 | skb_network_header(skb), ihl); | ||
58 | skb->nh.raw = skb->h.raw; | 59 | skb->nh.raw = skb->h.raw; |
59 | } | 60 | } |
60 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - | 61 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - |