diff options
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 { |