summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6.h
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-10-03 12:33:22 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-10-03 12:33:22 +0000
commit2ccbc991cb3c0ab5161657b9618933487f2e78a4 (patch)
tree0a565920444959cdd6ca3b107811406e2dc5f039 /sys/netinet6/in6.h
parentae60c1c6b0fa997314e9c82471a6e0ac2a7f1ea1 (diff)
Convert some of the remaining usages of time_second to time_uptime.
time_second is unix time so it can be affected by clock changes. time_uptime is monotonic so it isnt affected by clock changes. that in turn means route expiries wont jump with clock changes if set against time_uptime. the expiry is translated into unix time for export to userland though. Should fix mismatch between route timers that were already converted and ND default routers that were still using time_second. Tested by matthieu@ and sthen@ ok sthen@, dlg@
Diffstat (limited to 'sys/netinet6/in6.h')
-rw-r--r--sys/netinet6/in6.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index 8ba57fecae5..524e836c43e 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.h,v 1.90 2016/06/27 16:33:48 jca Exp $ */
+/* $OpenBSD: in6.h,v 1.91 2016/10/03 12:33:21 mpi Exp $ */
/* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */
/*
@@ -280,11 +280,11 @@ struct route_in6 {
#define IFA6_IS_DEPRECATED(a) \
((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \
- (u_int32_t)((time_second - (a)->ia6_updatetime)) > \
+ (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
(a)->ia6_lifetime.ia6t_pltime)
#define IFA6_IS_INVALID(a) \
((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \
- (u_int32_t)((time_second - (a)->ia6_updatetime)) > \
+ (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
(a)->ia6_lifetime.ia6t_vltime)
#endif /* _KERNEL */