From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gao feng Subject: Re: [PATCH V2] ipv6: Fix problem with expired dst cache Date: Wed, 29 Feb 2012 17:26:07 +0800 Message-ID: <4F4DEF2F.7010109@cn.fujitsu.com> References: <1330064404-24763-1-git-send-email-gaofeng@cn.fujitsu.com> <1330324605-26617-1-git-send-email-gaofeng@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, Gao feng To: David Miller Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:59006 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754160Ab2B2JZS convert rfc822-to-8bit (ORCPT ); Wed, 29 Feb 2012 04:25:18 -0500 In-Reply-To: <1330324605-26617-1-git-send-email-gaofeng@cn.fujitsu.com> Sender: netdev-owner@vger.kernel.org List-ID: Hi David. =E4=BA=8E 2012=E5=B9=B402=E6=9C=8827=E6=97=A5 14:36, Gao feng =E5=86=99= =E9=81=93: > 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 fl= ag. > So this dst cache will always be used until the dst gc run. >=20 > 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. >=20 > In func rt6_check_expired check if rt6_info.dst.from is expired. >=20 > In func ip6_rt_copy only set dst.from when the ort has flag RTF_ADDRC= ONF > and RTF_DEFAULT. >=20 I will send the v3 PATCH. This version has some changes. 1,hold the ort in ip6_rt_copy and release it in ip6_dst_destroy just as= Eric said. 2,add some functions to operate the RTF_EXPIRES flag and expires(from). 3,change the code to use the functions added in 2.