Module Name: src Committed By: ozaki-r Date: Fri Aug 7 08:11:33 UTC 2015
Modified Files: src/sys/net: rtsock.c src/sys/netinet: if_arp.c ip_input.c ip_output.c src/sys/netinet6: icmp6.c in6.c in6.h ip6_forward.c ip6_id.c ip6_mroute.c nd6.c nd6_rtr.c src/sys/sys: timevar.h Log Message: Use time_uptime instead of time_second to avoid time leaps Some codes in sys/net* use time_second to manage time periods such as cache expirations. However, time_second doesn't increase monotonically and can leap by say settimeofday(2) according to time_second(9). We should use time_uptime instead of it to avoid such time leaps. This change replaces time_second with time_uptime. Additionally it converts a time based on time_uptime to a time based on time_second when the kernel passes the time to userland programs that expect the latter, and vice versa. Note that we shouldn't leak time_uptime to other hosts over the netowrk. My investigation shows there is no such leak: http://mail-index.netbsd.org/tech-net/2015/08/06/msg005332.html Discussed on tech-kern and tech-net. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/net/rtsock.c cvs rdiff -u -r1.170 -r1.171 src/sys/netinet/if_arp.c cvs rdiff -u -r1.322 -r1.323 src/sys/netinet/ip_input.c cvs rdiff -u -r1.244 -r1.245 src/sys/netinet/ip_output.c cvs rdiff -u -r1.172 -r1.173 src/sys/netinet6/icmp6.c cvs rdiff -u -r1.188 -r1.189 src/sys/netinet6/in6.c cvs rdiff -u -r1.84 -r1.85 src/sys/netinet6/in6.h cvs rdiff -u -r1.76 -r1.77 src/sys/netinet6/ip6_forward.c cvs rdiff -u -r1.17 -r1.18 src/sys/netinet6/ip6_id.c cvs rdiff -u -r1.107 -r1.108 src/sys/netinet6/ip6_mroute.c cvs rdiff -u -r1.165 -r1.166 src/sys/netinet6/nd6.c cvs rdiff -u -r1.101 -r1.102 src/sys/netinet6/nd6_rtr.c cvs rdiff -u -r1.33 -r1.34 src/sys/sys/timevar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.