Skip to content

Commit

Permalink
[IPV6]: Fix ipv6 address fetching in raw6_icmp_error().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Apr 14, 2008
1 parent 2ed9926 commit b45e918
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b45e918

Please sign in to comment.