From: FX Le Bail Date: Sun, 19 Jan 2014 16:00:36 +0000 (+0100) Subject: ipv6: enable anycast addresses as source addresses in ICMPv6 error messages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=446fab59333dea91e54688f033dd8d788d0486fb;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ipv6: enable anycast addresses as source addresses in ICMPv6 error messages - Uses ipv6_anycast_destination() in icmp6_send(). Suggested-by: Bill Fink Signed-off-by: Francois-Xavier Le Bail Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller --- 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; /*