From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCHv2 net] ipv6: use rt6_info members when dst is set in rt6_fill_node Date: Thu, 13 Sep 2018 08:21:50 -0700 (PDT) Message-ID: <20180913.082150.1784634454675045279.davem@davemloft.net> References: <84d6cd6a280394837623ddb49186e5c299eb7a03.1536647638.git.lucien.xin@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dsa@cumulusnetworks.com, roopa@cumulusnetworks.com To: lucien.xin@gmail.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:49912 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727004AbeIMUbt (ORCPT ); Thu, 13 Sep 2018 16:31:49 -0400 In-Reply-To: <84d6cd6a280394837623ddb49186e5c299eb7a03.1536647638.git.lucien.xin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Xin Long Date: Tue, 11 Sep 2018 14:33:58 +0800 > In inet6_rtm_getroute, since Commit 93531c674315 ("net/ipv6: separate > handling of FIB entries from dst based routes"), it has used rt->from > to dump route info instead of rt. > > However for some route like cache, some of its information like flags > or gateway is not the same as that of the 'from' one. It caused 'ip > route get' to dump the wrong route information. > > In Jianlin's testing, the output information even lost the expiration > time for a pmtu route cache due to the wrong fib6_flags. > > So change to use rt6_info members for dst addr, src addr, flags and > gateway when it tries to dump a route entry without fibmatch set. > > v1->v2: > - not use rt6i_prefsrc. > - also fix the gw dump issue. > > Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes") > Reported-by: Jianlin Shi > Signed-off-by: Xin Long Applied and queued up for -stable, thanks Xin.