From patchwork Wed Apr 19 19:05:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 752424 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 3w7Wg35PPqz9s7B for ; Thu, 20 Apr 2017 05:05:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b="ENbPYfn0"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969198AbdDSTFt (ORCPT ); Wed, 19 Apr 2017 15:05:49 -0400 Received: from mail-yb0-f170.google.com ([209.85.213.170]:35653 "EHLO mail-yb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969179AbdDSTFr (ORCPT ); Wed, 19 Apr 2017 15:05:47 -0400 Received: by mail-yb0-f170.google.com with SMTP id 6so11727915ybq.2 for ; Wed, 19 Apr 2017 12:05:47 -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=cYr41FLGi07dg8kN+7GMDBcLq72hzdqS1gOhk0V2erw=; b=ENbPYfn0u5N2he8D7NPQNJC4jeg/k3G4RZgNeVCap2Fcv8M0R7L1jxhn7HYJz6Kov7 P4HADEWRCKbuWhoifdn7/ADxWDwS2zHc+Bkg6f//3Ysu3xuu80To0k98/f9eHBNvstOa zNBI1UJfeqibqvMuw0EfKUUGpcmlgXX6+i9M8= 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=cYr41FLGi07dg8kN+7GMDBcLq72hzdqS1gOhk0V2erw=; b=IzUQNzw4sRR7W/9s6L5et1SQH/Jsa0ETGxg2O+6Rt2+nbX+MFWBEvbDv9u2kLrRr6W m7gAIk1c74kCKK1h2hp3jaOKwPug/YeoUPgF8Pf/PCNtYpXu2IDlW/P3+mdwBVl2lInx 1J9webK1OHiy/sA927R4yYRjwqBAWG2jMlkMcFt+un/n3cPak/IknSrdjDEA5njcjzAc AcgfqGOvWAE7nk+VJHQUfIvLQlwgO+I0mURo9ZZzWFHO8swwEPzQEFpTEBdkuriXVtnD epco8akmxFIW8T9fJwTf/q97UuK9qEjwxh3yoldvGU4JPGC+fGwzHVPCiw7VqAxJWSS/ 7g2Q== X-Gm-Message-State: AN3rC/6f5wGserYoKQEu4K5eAAQP1QhKiyyBgbeWNVyi2RFuthU3TMJ6 WBuh+KaEl7iDLUeI X-Received: by 10.98.19.12 with SMTP id b12mr4392487pfj.21.1492628741696; Wed, 19 Apr 2017 12:05:41 -0700 (PDT) Received: from kenny.it.cumulusnetworks.com. ([216.129.126.126]) by smtp.googlemail.com with ESMTPSA id p6sm6007483pgn.9.2017.04.19.12.05.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Apr 2017 12:05:41 -0700 (PDT) From: David Ahern To: netdev@vger.kernel.org Cc: hannes@stressinduktion.org, David Ahern Subject: [PATCH net-next] net: ipv6: send unsolicited NA if enabled for all interfaces Date: Wed, 19 Apr 2017 12:05:36 -0700 Message-Id: <1492628736-26696-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 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 --- 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;