netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2] ipv6: enable anycast addresses as source addresses in ICMPv6 error messages
@ 2014-01-19 16:00 Francois-Xavier Le Bail
  2014-01-20 15:54 ` Hannes Frederic Sowa
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Francois-Xavier Le Bail @ 2014-01-19 16:00 UTC (permalink / raw)
  To: netdev
  Cc: David Stevens, Bill Fink, Hannes Frederic Sowa, David S. Miller,
	Alexey Kuznetsov, James Morris, Hideaki Yoshifuji,
	Patrick McHardy, Francois-Xavier Le Bail

- 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>
---
v2: Consideration of a Hannes's concern : No sysctl is needed for this change.
    No need for a new check function.

 net/ipv6/icmp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 902405d..f81f596 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;
 
 	/*

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-05 15:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-19 16:00 [PATCH net-next v2] ipv6: enable anycast addresses as source addresses in ICMPv6 error messages Francois-Xavier Le Bail
2014-01-20 15:54 ` Hannes Frederic Sowa
2014-01-22  0:53 ` David Miller
2014-02-06  9:37 ` Nicolas Dichtel
2014-02-06 12:38   ` François-Xavier Le Bail
2014-02-06 14:01     ` Nicolas Dichtel
2014-02-06 14:30       ` François-Xavier Le Bail
2014-02-06 16:29         ` Nicolas Dichtel
2014-02-07  9:33         ` Nicolas Dichtel
2014-02-07 10:04           ` François-Xavier Le Bail

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).