Received: by 10.213.65.68 with SMTP id h4csp1629641imn; Mon, 19 Mar 2018 09:09:37 -0700 (PDT) X-Google-Smtp-Source: AG47ELt+Mh7m/++NSYEUYLsgQpyeker4RCOR57t7r2gyKaKb8bdDAjexKUvMBAKyA2yszCXJaIWA X-Received: by 2002:a17:902:b288:: with SMTP id u8-v6mr12848805plr.339.1521475777902; Mon, 19 Mar 2018 09:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521475777; cv=none; d=google.com; s=arc-20160816; b=kmCM/g0TJjHVB8E9cwDmslqLgBGB3QlQ2gCqeptiRZs6iVwvcI/lB4O0lHwyO9DBD3 wS4WBtlhwsPi/Mp1M8FW8utWhlFhZYaf6ya6oQI5f2guyjuUDbLr6ueE+i6Tf24Eak// 7hKumE/J9QlZUZbK6sPQxlZfjY/3LkklIQXKoQgvuHZXl/UgZ5r1yeQ3Gir482vDMTkP OQAjIAmorRHoF9KSZkwWjjWqOGqKXqFk+RE+QdDmMTCHPQRX/GpUCGQaXiFFhF2u+9v0 ox3Gcwjy9GDxvPuPPl/AsiY0bQSu9Ax4utFijgfT1bHPwka4nGkzb6V7DYFlJSOxev/0 EmKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=9h5IaTRjMbNmEKkMSoUvI/WtiM5PeVHXOwCJflW89FU=; b=MT3tpxT7uG52fL77jTirc8D7x5alvkgqDGFKZT4d7QlBjtoHd4CFbTnayikuW6ewnS xQxZQvTxaxkha1xTSLHjbdGAmMTXurVV0OJIyKQLJmYOp0TQ195BeyHxq9R1M2AgO3Lf GFAgyKzGwkW7AQ0JWX6n8+ccT3IpX1O6nKQY8rGDdm1SP+J0oQTrbVS86BWQn27mI9IX txu5VFa25PL6ZOG5FvMEkQn7PlpTF+IeGhnrc5Jnm9SseQ3Gju3xS9+2TKXd05SnqxEY YClIQTPdm+puWDaqzkh2rGKqB7DBk+dU/V1QvCZU1pnocCZvFTxZBFCKQFbUGAcp4CS2 /30A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cCkY0fib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18-v6si206709plq.357.2018.03.19.09.09.23; Mon, 19 Mar 2018 09:09:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cCkY0fib; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966252AbeCSQH5 (ORCPT + 99 others); Mon, 19 Mar 2018 12:07:57 -0400 Received: from mail-by2nam03on0137.outbound.protection.outlook.com ([104.47.42.137]:54368 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966174AbeCSQHm (ORCPT ); Mon, 19 Mar 2018 12:07:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9h5IaTRjMbNmEKkMSoUvI/WtiM5PeVHXOwCJflW89FU=; b=cCkY0fiboRYsyzPuVD5W7g8JiOixCjiN7+SahPl1KZcEncFzsm0TihP0qAX1eCytBh5fB/6fIMeggPDM02yAzipgzrgGfzTIu9iPNwx/O6pFv2u5dAwZcNByOoG/TIihra8HkU8rrj4x6qmlcYPsjOJdJnixxWxB+V+fhkNe+f0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0920.namprd21.prod.outlook.com (52.132.132.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 16:07:37 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 16:07:37 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Mahesh Bandewar , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 037/167] ipv6: avoid dad-failures for addresses with NODAD Thread-Topic: [PATCH AUTOSEL for 4.4 037/167] ipv6: avoid dad-failures for addresses with NODAD Thread-Index: AQHTv5ww/wEP+WJJwkm/ymD0E6TBfg== Date: Mon, 19 Mar 2018 16:06:07 +0000 Message-ID: <20180319160513.16384-37-alexander.levin@microsoft.com> References: <20180319160513.16384-1-alexander.levin@microsoft.com> In-Reply-To: <20180319160513.16384-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0920;7:p8zo9PWA+uBqQRLaEdVKNd6320n4wEGMUfF0FEm/bHzz5MLJIgTAO0XcRxQ2DgVpxd0lw04zgsXuTKEItFZy3+bhlZDgrybe46TXX90QkrbZDLnJ1u4syPDsgVH/3mawbIQT/UEv1ndduvm2ejQUNgvEoEoIKgiW4F5Wgl9QOQligHpnnZ573nIoGI4stWXysqI6jabzGslkdczMQGiJazgESX8o4fX9DcHtQdPORyRzL4nwgUpOW5rWy+9E0+Ma;20:X2/V0RjxJjHuK9eZNPW3PrkDa5mS4sJOWc2yhjQicillPC9RS8AUz5+vOKaSIUgprg7L3uu+u1oNBtTSoih0GzkOm35bqKyvZY8rgQ8aJDKVS/qQyTZFXV1U7ARPhbM7WhQyom0ShBGGMXiUy5tmGd1PdoDGA8vypmJX7Bv+dJ0= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9c3e367a-e095-4abb-46c9-08d58db388ab x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0920; x-ms-traffictypediagnostic: DM5PR2101MB0920: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158)(211936372134217)(153496737603132); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0920;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0920; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39380400002)(396003)(376002)(39860400002)(366004)(189003)(199004)(6512007)(14454004)(2906002)(2900100001)(8936002)(186003)(86362001)(5250100002)(316002)(97736004)(2501003)(6116002)(1076002)(3846002)(81166006)(6436002)(6506007)(59450400001)(6486002)(26005)(72206003)(81156014)(53936002)(102836004)(478600001)(10290500003)(8676002)(107886003)(6666003)(4326008)(3660700001)(66066001)(25786009)(2950100002)(86612001)(36756003)(54906003)(110136005)(3280700002)(7736002)(305945005)(5660300001)(76176011)(68736007)(22452003)(10090500001)(105586002)(106356001)(99286004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0920;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: RTogJ/W1e7f1H2ujoNA9WG7nNB5QSoEc2PQoH8GH2PR7bkzINZRvhOUFwWMiF5bdAB/o1VCy0hl/4KmGQl8oJLt2WURa9zqWGB+RjnevDsiAfw6nH6hCtVS//jPxDq6KGNexO6kKYNugbzBpZ15YUXADqb5QHYsjH+CSd+co5iX+BNrGDLfpKT10uvVhoWh1ky+HzfRbqpBqKz5+9cEwUo2K79VAd8CGvr0iQFo9eVHv2ZSwZiheQ50auE7se2+mG6bx3QXDXfV8Dwqr2uRg0T+1Z/KVQhU8tiaFMylOA9fy4ppD59wSEVs5haqcZBZzvehW5Mq67bcwrZXf8cDUMQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c3e367a-e095-4abb-46c9-08d58db388ab X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:06:07.8527 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0920 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mahesh Bandewar [ Upstream commit 66eb9f86e50547ec2a8ff7a75997066a74ef584b ] Every address gets added with TENTATIVE flag even for the addresses with IFA_F_NODAD flag and dad-work is scheduled for them. During this DAD proces= s we realize it's an address with NODAD and complete the process without sending any probe. However the TENTATIVE flags stays on the address for sometime enough to cause misinterpretation when we receive a NS= . While processing NS, if the address has TENTATIVE flag, we mark it DADFAILE= D and endup with an address that was originally configured as NODAD with DADFAILED. We can't avoid scheduling dad_work for addresses with NODAD but we can avoid adding TENTATIVE flag to avoid this racy situation. Signed-off-by: Mahesh Bandewar Acked-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv6/addrconf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 92174881844d..0613be57513e 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -957,7 +957,10 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6= _addr *addr, INIT_HLIST_NODE(&ifa->addr_lst); ifa->scope =3D scope; ifa->prefix_len =3D pfxlen; - ifa->flags =3D flags | IFA_F_TENTATIVE; + ifa->flags =3D flags; + /* No need to add the TENTATIVE flag for addresses with NODAD */ + if (!(flags & IFA_F_NODAD)) + ifa->flags |=3D IFA_F_TENTATIVE; ifa->valid_lft =3D valid_lft; ifa->prefered_lft =3D prefered_lft; ifa->cstamp =3D ifa->tstamp =3D jiffies; --=20 2.14.1