dect
/
linux-2.6
Archived
13
0
Fork 0

[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>
This commit is contained in:
YOSHIFUJI Hideaki 2008-04-11 23:51:26 +09:00
parent 876c7f4196
commit 05f175cdcf
1 changed files with 4 additions and 2 deletions

View File

@ -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,