summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/ntp.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2009-04-22 07:42:18 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2009-04-22 07:42:18 +0000
commit1d5ba041baa7f0924446ec8615ed568eb895fb45 (patch)
tree0aa3d9f173c5d945e40775eaa02624a7555fcf3d /usr.sbin/ntpd/ntp.h
parent751db947d0ffdea38adb7931a5a93702b258abfa (diff)
ignore replies with timestamps after 2030 to prevent time_t / tv_sec wraps
input & ok theo
Diffstat (limited to 'usr.sbin/ntpd/ntp.h')
-rw-r--r--usr.sbin/ntpd/ntp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ntpd/ntp.h b/usr.sbin/ntpd/ntp.h
index 3781fb42a59..fdf3529434d 100644
--- a/usr.sbin/ntpd/ntp.h
+++ b/usr.sbin/ntpd/ntp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.h,v 1.12 2007/05/26 21:20:35 henning Exp $ */
+/* $OpenBSD: ntp.h,v 1.13 2009/04/22 07:42:17 henning Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -141,6 +141,7 @@ struct ntp_query {
#define MODE_RES2 7 /* reserved for private use */
#define JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
+#define JAN_2030 1893456000UL + JAN_1970 /* 1. 1. 2030 00:00:00 */
#define NTP_VERSION 4
#define NTP_MAXSTRATUM 15