diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 20:54:47 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:14 -0400 |
commit | 0660e03f6b18f19b6bbafe7583265a51b90daf36 (patch) | |
tree | 82cc819ead5ab7858ba211ee8719a3e6d2bb984f /net/ipv6/xfrm6_mode_tunnel.c | |
parent | d0a92be05ed4aea7d35c2b257e3f9173565fe4eb (diff) |
[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
Now the skb->nh union has just one member, .raw, i.e. it is just like the
skb->mac union, strange, no? I'm just leaving it like that till the transport
layer is done with, when we'll rename skb->mac.raw to skb->mac_header (or
->mac_header_offset?), ditto for ->{h,nh}.
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_tunnel.c')
-rw-r--r-- | net/ipv6/xfrm6_mode_tunnel.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 498f17b5c42f..28f36b363d1f 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) | 19 | static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) |
20 | { | 20 | { |
21 | struct ipv6hdr *outer_iph = skb->nh.ipv6h; | 21 | struct ipv6hdr *outer_iph = ipv6_hdr(skb); |
22 | struct ipv6hdr *inner_iph = skb->h.ipv6h; | 22 | struct ipv6hdr *inner_iph = skb->h.ipv6h; |
23 | 23 | ||
24 | if (INET_ECN_is_ce(ipv6_get_dsfield(outer_iph))) | 24 | if (INET_ECN_is_ce(ipv6_get_dsfield(outer_iph))) |
@@ -27,7 +27,7 @@ static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) | |||
27 | 27 | ||
28 | static inline void ip6ip_ecn_decapsulate(struct sk_buff *skb) | 28 | static inline void ip6ip_ecn_decapsulate(struct sk_buff *skb) |
29 | { | 29 | { |
30 | if (INET_ECN_is_ce(ipv6_get_dsfield(skb->nh.ipv6h))) | 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(skb->h.ipiph); |
32 | } | 32 | } |
33 | 33 | ||
@@ -51,10 +51,10 @@ static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
51 | int dsfield; | 51 | int dsfield; |
52 | 52 | ||
53 | skb_push(skb, x->props.header_len); | 53 | skb_push(skb, x->props.header_len); |
54 | iph = skb->nh.ipv6h; | 54 | iph = ipv6_hdr(skb); |
55 | 55 | ||
56 | skb_reset_network_header(skb); | 56 | skb_reset_network_header(skb); |
57 | top_iph = skb->nh.ipv6h; | 57 | top_iph = ipv6_hdr(skb); |
58 | skb->nh.raw = &top_iph->nexthdr; | 58 | skb->nh.raw = &top_iph->nexthdr; |
59 | skb->h.ipv6h = top_iph + 1; | 59 | skb->h.ipv6h = top_iph + 1; |
60 | 60 | ||
@@ -102,7 +102,7 @@ static int xfrm6_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) | |||
102 | nh = skb_network_header(skb); | 102 | nh = skb_network_header(skb); |
103 | if (nh[IP6CB(skb)->nhoff] == IPPROTO_IPV6) { | 103 | if (nh[IP6CB(skb)->nhoff] == IPPROTO_IPV6) { |
104 | if (x->props.flags & XFRM_STATE_DECAP_DSCP) | 104 | if (x->props.flags & XFRM_STATE_DECAP_DSCP) |
105 | ipv6_copy_dscp(skb->nh.ipv6h, skb->h.ipv6h); | 105 | ipv6_copy_dscp(ipv6_hdr(skb), skb->h.ipv6h); |
106 | if (!(x->props.flags & XFRM_STATE_NOECN)) | 106 | if (!(x->props.flags & XFRM_STATE_NOECN)) |
107 | ipip6_ecn_decapsulate(skb); | 107 | ipip6_ecn_decapsulate(skb); |
108 | } else { | 108 | } else { |