From patchwork Sun Jan 19 16:00:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FX Le Bail X-Patchwork-Id: 312379 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 29AAC2C00AC for ; Mon, 20 Jan 2014 03:21:02 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbaASQUh (ORCPT ); Sun, 19 Jan 2014 11:20:37 -0500 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:55662 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752337AbaASQUf (ORCPT ); Sun, 19 Jan 2014 11:20:35 -0500 Received: from localhost.localdomain ([86.214.166.242]) by mwinf5d36 with ME id FsLQ1n00L5E7JvJ03sLV40; Sun, 19 Jan 2014 17:20:32 +0100 From: Francois-Xavier Le Bail To: netdev@vger.kernel.org Cc: David Stevens , Bill Fink , Hannes Frederic Sowa , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki Yoshifuji , Patrick McHardy , Francois-Xavier Le Bail Subject: [PATCH net-next v2] ipv6: enable anycast addresses as source addresses in ICMPv6 error messages Date: Sun, 19 Jan 2014 17:00:36 +0100 Message-Id: <1390147236-3660-1-git-send-email-fx.lebail@yahoo.com> X-Mailer: git-send-email 1.7.10.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org - Uses ipv6_anycast_destination() in icmp6_send(). Suggested-by: Bill Fink Signed-off-by: Francois-Xavier Le Bail Acked-by: Hannes Frederic Sowa --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; /*