diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/raw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 059298b..6193b12 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -357,8 +357,10 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr, read_lock(&raw_v6_hashinfo.lock); sk = sk_head(&raw_v6_hashinfo.ht[hash]); if (sk != NULL) { - saddr = &ipv6_hdr(skb)->saddr; - daddr = &ipv6_hdr(skb)->daddr; + /* Note: ipv6_hdr(skb) != skb->data */ + struct ipv6hdr *ip6h = (struct ipv6hdr *)skb->data; + saddr = &ip6h->saddr; + daddr = &ip6h->daddr; net = dev_net(skb->dev); while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, |