Received: by 10.213.65.68 with SMTP id h4csp1860776imn; Mon, 19 Mar 2018 15:31:07 -0700 (PDT) X-Google-Smtp-Source: AG47ELv2SSmmm3cd5Y3Y/aeD66NUmZegGUY2McwLfbJVRMyRpqRy4OdLSwXGXTqF0GXOvyj+T/gL X-Received: by 10.101.75.135 with SMTP id t7mr3895412pgq.235.1521498667597; Mon, 19 Mar 2018 15:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498667; cv=none; d=google.com; s=arc-20160816; b=N7dliysy/LNxvgBodA+VYCaRcuhug4lP/cr6L/ALdHOnLUFjT0FKNaWHJzJpHmWslt RtPLOaVb6rtMPHfFCBAfAxG6J42TyB0qqUdTWkyliviExL9ogFJtX8wFl0Kja9BKryaW psif34sFyQejd7cOtws5wL7wvIMBGacYul0fMP1SlYK4u/ariGcytm/s65FYYMBBSDI+ FV3Eu/8t8Swl0lruvazk9ywsKwRJcnFSaHrIcbNYK10/us74RI7wUDDL2XzBjfad5gY7 CTKAjkdIs27FRagt6PH4O6AR3jdUqWNxCTRyQcQxMgrEwM3/JSunrqkBaQF5C6/qNcT4 /69A== 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=v4IohqqvswwGGChZ0ypfxilgvrBcG4JuenKfKq9fi7Q=; b=Mb1xXd76WJt+7zbE1YjDXrtFdmwMOJvoX0g+AHhAYMYRmjl6onurX3dnTLxH5ojCKw 1LvQs8vSwO2ChDGB56Fkg6VboULvN/4GyF3/QoE0Xy8cIwxawiE64Z4GH3o6hQ50hMcl kwVhUDDndU80S/z6WdabEtKSIAnPWi30+oTT4vl5QT3ZxzAlNMFmbegLTm9peHXB1REk vfmIGojVgII/wKHNVcZ/5vcnClq7o2SzAxvt7jRJXXJHFN9qZPoSZAphWiX7DY9dqKEq CR+1ywgTUyMF7UCqH82BuNfYhyb1tQYH5l7u1MbjZqRrq9OYA/JudoZBSneMwSp9B/Ia OOEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cy0RKD5Z; 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 p29si182689pgn.123.2018.03.19.15.30.52; Mon, 19 Mar 2018 15:31:07 -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=cy0RKD5Z; 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 S972372AbeCSW2p (ORCPT + 99 others); Mon, 19 Mar 2018 18:28:45 -0400 Received: from mail-by2nam01on0106.outbound.protection.outlook.com ([104.47.34.106]:16179 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933810AbeCSPsr (ORCPT ); Mon, 19 Mar 2018 11:48:47 -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=v4IohqqvswwGGChZ0ypfxilgvrBcG4JuenKfKq9fi7Q=; b=cy0RKD5ZWnC96h1J1npqK48meoEdwL/an/7K6SEkzKkT0O6PwwVKGURQjBVmMHW5Jyk4nbSpGC4V/9AVV/RdpgDH8i0OL2CKMUgG0ndgJf7OWp6F8D9/SBV/VODHHK4A9KL4Dgdm8KObkS0ZH9ZGS1BfbhEGgMxLoQR76kCYTz0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) 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 15:48:17 +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 15:48:17 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Ido Schimmel , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation Thread-Topic: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation Thread-Index: AQHTv5mo//FsBdCFtkuOTa0rN5EV2A== Date: Mon, 19 Mar 2018 15:48:00 +0000 Message-ID: <20180319154645.11350-58-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-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;DM5PR2101MB1031;7:QnCsqq4oBvcFcuXiQCKGWzoim0cOvptN2Sgh6RFCDcGnIVsc43u4KPCT5fz2U23QU8KAZR4xOIDE/bycF/t2TBfZlsATI34DQLVUi8znVaGqGYWhN0UjMxNde+SyZ3T4/0OyMLPDgFGUTEXnH9Sbwpi5P4Mayk0tf8UlFoXpwVkxVBrUxGi4B5skdL1wobBUPdaBOX4Z3I+XHrA0ybm5XwEiD3ZyMRCg3+VTPv99okE0MEsFwAMlgbyjgnw1t6sz;20:FUOdPDVRsCMYH+FqLjQLUaTMX2s7L96pHfoyA+iAPmRNOLLeesVXGRv2I99c1rfEtiv6A5rNSRoJtSudhjj7sdl6dFypvmc6Q9V+Se1Davn5Xx4/d4b8aVP76f+ClzmjJelOlNwdm7bYr98bPg2nlS/BK7jYy6/yWXZMG2i0lp8= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f8c7a211-5fd0-4af8-fb62-08d58db0d52c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: 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); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501300)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1031;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1031; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(396003)(39860400002)(39380400002)(376002)(189003)(199004)(6436002)(6512007)(6666003)(3280700002)(2950100002)(7736002)(6116002)(3846002)(10090500001)(105586002)(4326008)(5660300001)(305945005)(1076002)(81156014)(2906002)(6486002)(81166006)(8676002)(8936002)(2900100001)(106356001)(36756003)(68736007)(54906003)(3660700001)(22452003)(97736004)(6506007)(25786009)(99286004)(10290500003)(76176011)(66066001)(14454004)(72206003)(478600001)(102836004)(26005)(186003)(316002)(2501003)(110136005)(5250100002)(86362001)(53936002)(107886003)(86612001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1031;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: PVFUZDB1qTi+bVWzQMXRBb9TixnaZTKPg8hKS5xZwAWeJFqIxzoKy2LM91ZgpF5ZObiFmT5agYTbY0fUJ2vVRhf7SK1u1iGCMTm6BlajqTBciBZ+OQnuGKJ9h/87gddnP3wT+Kj1ZQwYDfid1cVrSP/iph7AN41B8RAEvU/IkcYW4pYiANs5PW1db8JIHyHo+kPYB4AMrevPSBBpLHnCwtFvMwzd8CIc08Fu5kWSN0O1d1JE0KMyIOcOySdTYFKP6kHt5yAnoEBtO2f2StRXGgQafKdEMqNl5svZxm6id4iIbl0TeEdF5iOY1ZukvLCQ9QZTkTWbwOTLEIPH9mtUuQ== 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: f8c7a211-5fd0-4af8-fb62-08d58db0d52c X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:48:00.9624 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ido Schimmel [ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ] It is valid to install routes with a nexthop device that does not have a carrier, so we need to make sure they're marked accordingly. As explained in the previous patch, host and anycast routes are never marked with the 'linkdown' flag. Note that reject routes are unaffected, as these use the loopback device which always has a carrier. Signed-off-by: Ido Schimmel Acked-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv6/route.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a560fb1d0230..b2d6377f1ef5 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2750,6 +2750,9 @@ static struct rt6_info *ip6_route_info_create(struct = fib6_config *cfg, rt->rt6i_flags =3D cfg->fc_flags; =20 install_route: + if (!(rt->rt6i_flags & (RTF_LOCAL | RTF_ANYCAST)) && + !netif_carrier_ok(dev)) + rt->rt6i_nh_flags |=3D RTNH_F_LINKDOWN; rt->dst.dev =3D dev; rt->rt6i_idev =3D idev; rt->rt6i_table =3D table; --=20 2.14.1