diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-11 00:06:25 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:28 -0400 |
commit | 39b89160df691045d1449cbaef43c02084c7543a (patch) | |
tree | bbe217599a1b84f3bf33c053e2c7d3bdf8bdd571 /net/ipv6 | |
parent | b0061ce49c83657563b64ffcf1ec137110230d93 (diff) |
[SK_BUFF]: Introduce ipipv6_hdr(), remove skb->h.ipv6h
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/xfrm6_mode_beet.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_tunnel.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c index abac09409ded..0cc96ece003d 100644 --- a/net/ipv6/xfrm6_mode_beet.c +++ b/net/ipv6/xfrm6_mode_beet.c | |||
@@ -47,8 +47,8 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
47 | 47 | ||
48 | skb_reset_network_header(skb); | 48 | skb_reset_network_header(skb); |
49 | top_iph = ipv6_hdr(skb); | 49 | top_iph = ipv6_hdr(skb); |
50 | skb->nh.raw = &top_iph->nexthdr; | 50 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); |
51 | skb->h.ipv6h = top_iph + 1; | 51 | skb->nh.raw += offsetof(struct ipv6hdr, nexthdr); |
52 | 52 | ||
53 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); | 53 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); |
54 | ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); | 54 | ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 9d3bd338e5d0..21d65df7479e 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -19,7 +19,7 @@ | |||
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 = ipv6_hdr(skb); | 21 | struct ipv6hdr *outer_iph = ipv6_hdr(skb); |
22 | struct ipv6hdr *inner_iph = skb->h.ipv6h; | 22 | struct ipv6hdr *inner_iph = ipipv6_hdr(skb); |
23 | 23 | ||
24 | if (INET_ECN_is_ce(ipv6_get_dsfield(outer_iph))) | 24 | if (INET_ECN_is_ce(ipv6_get_dsfield(outer_iph))) |
25 | IP6_ECN_set_ce(inner_iph); | 25 | IP6_ECN_set_ce(inner_iph); |
@@ -55,8 +55,8 @@ static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
55 | 55 | ||
56 | skb_reset_network_header(skb); | 56 | skb_reset_network_header(skb); |
57 | top_iph = ipv6_hdr(skb); | 57 | top_iph = ipv6_hdr(skb); |
58 | skb->nh.raw = &top_iph->nexthdr; | 58 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); |
59 | skb->h.ipv6h = top_iph + 1; | 59 | skb->nh.raw += offsetof(struct ipv6hdr, nexthdr); |
60 | 60 | ||
61 | top_iph->version = 6; | 61 | top_iph->version = 6; |
62 | if (xdst->route->ops->family == AF_INET6) { | 62 | if (xdst->route->ops->family == AF_INET6) { |
@@ -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(ipv6_hdr(skb), skb->h.ipv6h); | 105 | ipv6_copy_dscp(ipv6_hdr(skb), ipipv6_hdr(skb)); |
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 { |