ipv6: enable anycast addresses as source addresses in ICMPv6 error messages
authorFX Le Bail <fx.lebail@yahoo.com>
Sun, 19 Jan 2014 16:00:36 +0000 (17:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jan 2014 00:53:23 +0000 (16:53 -0800)
- Uses ipv6_anycast_destination() in icmp6_send().

Suggested-by: Bill Fink <billfink@mindspring.com>
Signed-off-by: Francois-Xavier Le Bail <fx.lebail@yahoo.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/icmp.c

index 902405dc258cdebbc496d5ab945e7db9e9a42665..f81f59686f21b222047793f0c72c99ce3ceaa82d 100644 (file)
@@ -413,7 +413,8 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
         */
        addr_type = ipv6_addr_type(&hdr->daddr);
 
-       if (ipv6_chk_addr(net, &hdr->daddr, skb->dev, 0))
+       if (ipv6_chk_addr(net, &hdr->daddr, skb->dev, 0) ||
+           ipv6_anycast_destination(skb))
                saddr = &hdr->daddr;
 
        /*