diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-11 10:51:26 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-12 00:43:28 -0400 |
commit | 05f175cdcf9d3615c1633615d87891ebfb729401 (patch) | |
tree | e1f269fde2bf9033fed165a8899e52f746122a82 /net/ipv6 | |
parent | 876c7f41961dc5172b03cbf2dca65f05003f28a0 (diff) |
[IPV6]: Fix IPV6_RECVERR for connected raw sockets.
Based on patch from Dmitry Butskoy <buc@odusz.so-cdu.ru>.
Closes: 10437
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6')
-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 059298baa1dd..6193b124cbc7 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, | |||
357 | read_lock(&raw_v6_hashinfo.lock); | 357 | read_lock(&raw_v6_hashinfo.lock); |
358 | sk = sk_head(&raw_v6_hashinfo.ht[hash]); | 358 | sk = sk_head(&raw_v6_hashinfo.ht[hash]); |
359 | if (sk != NULL) { | 359 | if (sk != NULL) { |
360 | saddr = &ipv6_hdr(skb)->saddr; | 360 | /* Note: ipv6_hdr(skb) != skb->data */ |
361 | daddr = &ipv6_hdr(skb)->daddr; | 361 | struct ipv6hdr *ip6h = (struct ipv6hdr *)skb->data; |
362 | saddr = &ip6h->saddr; | ||
363 | daddr = &ip6h->daddr; | ||
362 | net = dev_net(skb->dev); | 364 | net = dev_net(skb->dev); |
363 | 365 | ||
364 | while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, | 366 | while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, |