aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 5b27fbcae346..93717435013e 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -673,11 +673,10 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
673 &rt->rt6i_gateway)) { 673 &rt->rt6i_gateway)) {
674 if (!(iter->rt6i_flags & RTF_EXPIRES)) 674 if (!(iter->rt6i_flags & RTF_EXPIRES))
675 return -EEXIST; 675 return -EEXIST;
676 iter->dst.expires = rt->dst.expires; 676 if (!(rt->rt6i_flags & RTF_EXPIRES))
677 if (!(rt->rt6i_flags & RTF_EXPIRES)) { 677 rt6_clean_expires(iter);
678 iter->rt6i_flags &= ~RTF_EXPIRES; 678 else
679 iter->dst.expires = 0; 679 rt6_set_expires(iter, rt->dst.expires);
680 }
681 return -EEXIST; 680 return -EEXIST;
682 } 681 }
683 } 682 }