Commit b45e9189 authored by David S. Miller's avatar David S. Miller

[IPV6]: Fix ipv6 address fetching in raw6_icmp_error().

Fixes kernel bugzilla 10437

Based almost entirely upon a patch by Dmitry Butskoy.

When deciding what raw sockets to deliver the ICMPv6
to, we should use the addresses in the ICMPv6 quoted
IPV6 header, not the top-level one.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2ed9926e
...@@ -372,8 +372,10 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr, ...@@ -372,8 +372,10 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr,
read_lock(&raw_v6_hashinfo.lock); read_lock(&raw_v6_hashinfo.lock);
sk = sk_head(&raw_v6_hashinfo.ht[hash]); sk = sk_head(&raw_v6_hashinfo.ht[hash]);
if (sk != NULL) { if (sk != NULL) {
saddr = &ipv6_hdr(skb)->saddr; struct ipv6hdr *hdr = (struct ipv6hdr *) skb->data;
daddr = &ipv6_hdr(skb)->daddr;
saddr = &hdr->saddr;
daddr = &hdr->daddr;
net = skb->dev->nd_net; net = skb->dev->nd_net;
while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment