diff options
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 6eab37cf5345..58e5b4710127 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -485,11 +485,11 @@ static void ipip6_tunnel_uninit(struct net_device *dev) | |||
485 | */ | 485 | */ |
486 | static int ipip6_err_gen_icmpv6_unreach(struct sk_buff *skb) | 486 | static int ipip6_err_gen_icmpv6_unreach(struct sk_buff *skb) |
487 | { | 487 | { |
488 | const struct iphdr *iph = (const struct iphdr *) skb->data; | 488 | int ihl = ((const struct iphdr *)skb->data)->ihl*4; |
489 | struct rt6_info *rt; | 489 | struct rt6_info *rt; |
490 | struct sk_buff *skb2; | 490 | struct sk_buff *skb2; |
491 | 491 | ||
492 | if (!pskb_may_pull(skb, iph->ihl * 4 + sizeof(struct ipv6hdr) + 8)) | 492 | if (!pskb_may_pull(skb, ihl + sizeof(struct ipv6hdr) + 8)) |
493 | return 1; | 493 | return 1; |
494 | 494 | ||
495 | skb2 = skb_clone(skb, GFP_ATOMIC); | 495 | skb2 = skb_clone(skb, GFP_ATOMIC); |
@@ -498,7 +498,7 @@ static int ipip6_err_gen_icmpv6_unreach(struct sk_buff *skb) | |||
498 | return 1; | 498 | return 1; |
499 | 499 | ||
500 | skb_dst_drop(skb2); | 500 | skb_dst_drop(skb2); |
501 | skb_pull(skb2, iph->ihl * 4); | 501 | skb_pull(skb2, ihl); |
502 | skb_reset_network_header(skb2); | 502 | skb_reset_network_header(skb2); |
503 | 503 | ||
504 | rt = rt6_lookup(dev_net(skb->dev), &ipv6_hdr(skb2)->saddr, NULL, 0, 0); | 504 | rt = rt6_lookup(dev_net(skb->dev), &ipv6_hdr(skb2)->saddr, NULL, 0, 0); |