aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 83dafa528936..0607ee3a0eac 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -369,15 +369,11 @@ static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
369 369
370static bool rt6_check_expired(const struct rt6_info *rt) 370static bool rt6_check_expired(const struct rt6_info *rt)
371{ 371{
372 struct rt6_info *ort = NULL;
373
374 if (rt->rt6i_flags & RTF_EXPIRES) { 372 if (rt->rt6i_flags & RTF_EXPIRES) {
375 if (time_after(jiffies, rt->dst.expires)) 373 if (time_after(jiffies, rt->dst.expires))
376 return true; 374 return true;
377 } else if (rt->dst.from) { 375 } else if (rt->dst.from) {
378 ort = (struct rt6_info *) rt->dst.from; 376 return rt6_check_expired((struct rt6_info *) rt->dst.from);
379 return (ort->rt6i_flags & RTF_EXPIRES) &&
380 time_after(jiffies, ort->dst.expires);
381 } 377 }
382 return false; 378 return false;
383} 379}