From patchwork Sat Apr 22 16:10:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 753784 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 3w9HdX1xZDz9s3s for ; Sun, 23 Apr 2017 02:10:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b="bUcbe5pK"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425607AbdDVQKW (ORCPT ); Sat, 22 Apr 2017 12:10:22 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:38704 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425109AbdDVQKU (ORCPT ); Sat, 22 Apr 2017 12:10:20 -0400 Received: by mail-it0-f46.google.com with SMTP id e132so15228360ite.1 for ; Sat, 22 Apr 2017 09:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=from:to:cc:subject:date:message-id; bh=Lug2f6KOr6BNrn5Q3J1uxShSSmbI0aM3GupP9HHRZWM=; b=bUcbe5pKURqk2tBgKR2kGl81vSP1p8LTk6EWS23lk3P7U6CVPhhY4rlmbhsWm20IRV LqKfjwn/SgYw9KSc7n8o+RAnDss40P+HbMNj3nD9vo51Bj3KNY3Ay3MtCuXN96hioBTK zjjsYV+bDsWRllPBul1N7vnrVqrrsuk8iZpbo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Lug2f6KOr6BNrn5Q3J1uxShSSmbI0aM3GupP9HHRZWM=; b=D/no0Bc8I4z0iJ0kuDmB+w4xuxIKWM0/AbjMnP1fTN3ZgKy1b0uCbiXVi0IhNjH0MD Y/q+FzuoBpMLuR3B0husYCMQJxJjqobVFGg/rac8L6J/KlQPthJEpeXI3ROZ7eNvst2D owWNxNTIN5IXcQGF/KZ4KaJcGR1taSavJDCR291EOJv68HixZ/l40xEUrLM23CuTH+40 IzL0fWrtS09Qe/PX5YRfMEae6lm3mzV4D+TW9T6DdA4m852IDTR6c2lVCAyqNdp8lsPP ocCLjrQN03xe0/S7wMRLEbRGjNfW92bY+Kevtn1wTellRt47bRkeUOu9bT3ElRyLLgS7 x0cw== X-Gm-Message-State: AN3rC/6ZOTvc+STZKTYRoJ3oIeISFQSETdLJpMFJ+9aw9zwXmW7qdp86 Ie04oqcRyCqIUaHAkDo= X-Received: by 10.84.136.70 with SMTP id 64mr22531534plk.82.1492877418761; Sat, 22 Apr 2017 09:10:18 -0700 (PDT) Received: from kenny.it.cumulusnetworks.com. ([216.129.126.126]) by smtp.googlemail.com with ESMTPSA id i73sm22217059pfi.131.2017.04.22.09.10.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 22 Apr 2017 09:10:18 -0700 (PDT) From: David Ahern To: netdev@vger.kernel.org Cc: hannes@stressinduktion.org, David Ahern Subject: [PATCH v2 net-next] net: ipv6: send unsolicited NA if enabled for all interfaces Date: Sat, 22 Apr 2017 09:10:13 -0700 Message-Id: <1492877413-21906-1-git-send-email-dsa@cumulusnetworks.com> X-Mailer: git-send-email 2.1.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When arp_notify is set to 1 for either a specific interface or for 'all' interfaces, gratuitous arp requests are sent. Since ndisc_notify is the ipv6 equivalent to arp_notify, it should follow the same semantics. Commit 4a6e3c5def13 ("net: ipv6: send unsolicited NA on admin up") sends the NA on admin up. The final piece is checking devconf_all->ndisc_notify in addition to the per device setting. Add it. Fixes: 5cb04436eef6 ("ipv6: add knob to send unsolicited ND on link-layer address change") Signed-off-by: David Ahern Reviewed-by: Simon Horman --- v2 - update commit message with subject of commit 4a6e3c5def13 per comment from Sergei net/ipv6/ndisc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index b23822e64228..d310dc41209a 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1753,7 +1753,8 @@ static int ndisc_netdev_event(struct notifier_block *this, unsigned long event, idev = in6_dev_get(dev); if (!idev) break; - if (idev->cnf.ndisc_notify) + if (idev->cnf.ndisc_notify || + net->ipv6.devconf_all->ndisc_notify) ndisc_send_unsol_na(dev); in6_dev_put(idev); break;