aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2010-03-28 03:15:45 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 19:02:08 -0400
commit9c93e9c757c7d3d96027a06b9b4c4e37ca87ded7 (patch)
treec608433a4455a06becd4197cfe6361e1edf5de1f /net/ipv6
parente9d2d8a8891b98d3217eb008ae9cd8b483e345e3 (diff)
ipv6: Don't drop cache route entry unless timer actually expired.
[ Upstream commit 54c1a859efd9fd6cda05bc700315ba2519c14eba ] This is ipv6 variant of the commit 5e016cbf6.. ("ipv4: Don't drop redirected route cache entry unless PTMU actually expired") by Guenter Roeck <guenter.roeck@ericsson.com>. Remove cache route entry in ipv6_negative_advice() only if the timer is expired. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c2bd74c5f8d9..62322841e2ec 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -897,12 +897,17 @@ static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
897 struct rt6_info *rt = (struct rt6_info *) dst; 897 struct rt6_info *rt = (struct rt6_info *) dst;
898 898
899 if (rt) { 899 if (rt) {
900 if (rt->rt6i_flags & RTF_CACHE) 900 if (rt->rt6i_flags & RTF_CACHE) {
901 ip6_del_rt(rt); 901 if (rt6_check_expired(rt)) {
902 else 902 ip6_del_rt(rt);
903 dst = NULL;
904 }
905 } else {
903 dst_release(dst); 906 dst_release(dst);
907 dst = NULL;
908 }
904 } 909 }
905 return NULL; 910 return dst;
906} 911}
907 912
908static void ip6_link_failure(struct sk_buff *skb) 913static void ip6_link_failure(struct sk_buff *skb)