aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ipcomp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r--net/ipv6/ipcomp6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 91b2a75b7d09..71a14c09975c 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -157,15 +157,15 @@ static int ipcomp6_output(struct xfrm_state *x, struct sk_buff *skb)
157 pskb_trim(skb, hdr_len + dlen + sizeof(struct ip_comp_hdr)); 157 pskb_trim(skb, hdr_len + dlen + sizeof(struct ip_comp_hdr));
158 158
159 /* insert ipcomp header and replace datagram */ 159 /* insert ipcomp header and replace datagram */
160 top_iph = (struct ipv6hdr *)skb->data; 160 top_iph = ipv6_hdr(skb);
161 161
162 top_iph->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); 162 top_iph->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
163 163
164 ipch = (struct ipv6_comp_hdr *)start; 164 ipch = (struct ipv6_comp_hdr *)start;
165 ipch->nexthdr = *skb_network_header(skb); 165 ipch->nexthdr = *skb_mac_header(skb);
166 ipch->flags = 0; 166 ipch->flags = 0;
167 ipch->cpi = htons((u16 )ntohl(x->id.spi)); 167 ipch->cpi = htons((u16 )ntohl(x->id.spi));
168 *skb_network_header(skb) = IPPROTO_COMP; 168 *skb_mac_header(skb) = IPPROTO_COMP;
169 169
170out_ok: 170out_ok:
171 return 0; 171 return 0;