summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFX Le Bail <fx.lebail@yahoo.com>2014-01-19 20:00:36 +0400
committerDavid S. Miller <davem@davemloft.net>2014-01-22 04:53:23 +0400
commit446fab59333dea91e54688f033dd8d788d0486fb (patch)
tree150f6ac56310118cf633d7c26982940c0a4bd07a
parent4d83e1773031c2b7bbcfeb3736ad20980785dd93 (diff)
downloadlinux-446fab59333dea91e54688f033dd8d788d0486fb.tar.xz
ipv6: enable anycast addresses as source addresses in ICMPv6 error messages
- 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>
-rw-r--r--net/ipv6/icmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 902405dc258c..f81f59686f21 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -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;
/*