diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-13 23:14:15 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-13 23:14:15 -0700 |
commit | b45e9189c058bfa495073951ff461ee0eea968be (patch) | |
tree | a620ecd6443b456bdc4b2f0d144d11ee953b166d /net/ipv6 | |
parent | 2ed9926e16094ad143b96b09c64cba8bcba05ee1 (diff) | |
download | op-kernel-dev-b45e9189c058bfa495073951ff461ee0eea968be.zip op-kernel-dev-b45e9189c058bfa495073951ff461ee0eea968be.tar.gz |
[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: David S. Miller <davem@davemloft.net>
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 8897ccf..0a6fbc1 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -372,8 +372,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; + struct ipv6hdr *hdr = (struct ipv6hdr *) skb->data; + + saddr = &hdr->saddr; + daddr = &hdr->daddr; net = skb->dev->nd_net; while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, |