From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v6] ipv6: fix problem with expired dst cache Date: Fri, 13 Apr 2012 12:58:51 -0400 (EDT) Message-ID: <20120413.125851.894792528374368454.davem@davemloft.net> References: <1330064404-24763-1-git-send-email-gaofeng@cn.fujitsu.com> <1333707190-14075-1-git-send-email-gaofeng@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: gaofeng@cn.fujitsu.com Return-path: Received: from shards.monkeyblade.net ([198.137.202.13]:50626 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752380Ab2DMQ65 (ORCPT ); Fri, 13 Apr 2012 12:58:57 -0400 In-Reply-To: <1333707190-14075-1-git-send-email-gaofeng@cn.fujitsu.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Gao feng Date: Fri, 6 Apr 2012 18:13:10 +0800 > If the ipv6 dst cache which copy from the dst generated by ICMPV6 RA packet. > this dst cache will not check expire because it has no RTF_EXPIRES flag. > So this dst cache will always be used until the dst gc run. > > Change the struct dst_entry,add a union contains new pointer from and expires. > When rt6_info.rt6i_flags has no RTF_EXPIRES flag,the dst.expires has no use. > we can use this field to point to where the dst cache copy from. > The dst.from is only used in IPV6. > > rt6_check_expired check if rt6_info.dst.from is expired. > > ip6_rt_copy only set dst.from when the ort has flag RTF_ADDRCONF > and RTF_DEFAULT.then hold the ort. > > ip6_dst_destroy release the ort. > > Add some functions to operate the RTF_EXPIRES flag and expires(from) together. > and change the code to use these new adding functions. > > Changes from v5: > modify ip6_route_add and ndisc_router_discovery to use new adding functions. > > Only set dst.from when the ort has flag RTF_ADDRCONF > and RTF_DEFAULT.then hold the ort. > > Signed-off-by: Gao feng Applied, thanks for doing this work.