diff options
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 6a3bb6077e19..7d5cb975cc6f 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -803,8 +803,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
803 | ip6_del_rt(rt); | 803 | ip6_del_rt(rt); |
804 | rt = NULL; | 804 | rt = NULL; |
805 | } else if (!(rt->rt6i_flags & RTF_EXPIRES)) { | 805 | } else if (!(rt->rt6i_flags & RTF_EXPIRES)) { |
806 | rt->dst.expires = expires; | 806 | rt6_set_expires(rt, expires); |
807 | rt->rt6i_flags |= RTF_EXPIRES; | ||
808 | } | 807 | } |
809 | } | 808 | } |
810 | dst_release(&rt->dst); | 809 | dst_release(&rt->dst); |
@@ -1887,11 +1886,9 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao) | |||
1887 | rt = NULL; | 1886 | rt = NULL; |
1888 | } else if (addrconf_finite_timeout(rt_expires)) { | 1887 | } else if (addrconf_finite_timeout(rt_expires)) { |
1889 | /* not infinity */ | 1888 | /* not infinity */ |
1890 | rt->dst.expires = jiffies + rt_expires; | 1889 | rt6_set_expires(rt, jiffies + rt_expires); |
1891 | rt->rt6i_flags |= RTF_EXPIRES; | ||
1892 | } else { | 1890 | } else { |
1893 | rt->rt6i_flags &= ~RTF_EXPIRES; | 1891 | rt6_clean_expires(rt); |
1894 | rt->dst.expires = 0; | ||
1895 | } | 1892 | } |
1896 | } else if (valid_lft) { | 1893 | } else if (valid_lft) { |
1897 | clock_t expires = 0; | 1894 | clock_t expires = 0; |