summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpd')
-rw-r--r--contrib/ntp/ntpd/Makefile.am3
-rw-r--r--contrib/ntp/ntpd/Makefile.in17
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.conf.texi2
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.keys.texi2
-rw-r--r--contrib/ntp/ntpd/invoke-ntpd.texi4
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5man8
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5mdoc6
-rw-r--r--contrib/ntp/ntpd/ntp.conf.html2
-rw-r--r--contrib/ntp/ntpd/ntp.conf.man.in8
-rw-r--r--contrib/ntp/ntpd/ntp.conf.mdoc.in6
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5man6
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5mdoc6
-rw-r--r--contrib/ntp/ntpd/ntp.keys.html2
-rw-r--r--contrib/ntp/ntpd/ntp.keys.man.in6
-rw-r--r--contrib/ntp/ntpd/ntp.keys.mdoc.in6
-rw-r--r--contrib/ntp/ntpd/ntp_config.c214
-rw-r--r--contrib/ntp/ntpd/ntp_control.c296
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c19
-rw-r--r--contrib/ntp/ntpd/ntp_io.c21
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c3
-rw-r--r--contrib/ntp/ntpd/ntp_parser.c304
-rw-r--r--contrib/ntp/ntpd/ntp_parser.h2
-rw-r--r--contrib/ntp/ntpd/ntp_peer.c5
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c33
-rw-r--r--contrib/ntp/ntpd/ntp_restrict.c4
-rw-r--r--contrib/ntp/ntpd/ntp_scanner.c1
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.c496
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.h8
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdman8
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdmdoc6
-rw-r--r--contrib/ntp/ntpd/ntpd.c2
-rw-r--r--contrib/ntp/ntpd/ntpd.html4
-rw-r--r--contrib/ntp/ntpd/ntpd.man.in8
-rw-r--r--contrib/ntp/ntpd/ntpd.mdoc.in6
-rw-r--r--contrib/ntp/ntpd/refclock_datum.c19
-rw-r--r--contrib/ntp/ntpd/refclock_gpsdjson.c14
-rw-r--r--contrib/ntp/ntpd/refclock_jjy.c17
-rw-r--r--contrib/ntp/ntpd/refclock_mx4200.c32
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c3
-rw-r--r--contrib/ntp/ntpd/refclock_oncore.c8
-rw-r--r--contrib/ntp/ntpd/refclock_parse.c30
41 files changed, 832 insertions, 815 deletions
diff --git a/contrib/ntp/ntpd/Makefile.am b/contrib/ntp/ntpd/Makefile.am
index a5690b7..60c5de8 100644
--- a/contrib/ntp/ntpd/Makefile.am
+++ b/contrib/ntp/ntpd/Makefile.am
@@ -7,12 +7,15 @@ sbin_PROGRAMS= $(NTPD_DS) $(NTPDSIM_DS)
noinst_LIBRARIES= libntpd.a
AM_CFLAGS = $(CFLAGS_NTP)
+AM_CFLAGS += $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
+AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(LDFLAGS_NTP)
+AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB.
LDADD = version.o libntpd.a $(LIBPARSE)
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index 2304e33..b5950c4 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -117,6 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
$(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
$(top_srcdir)/sntp/m4/ntp_libevent.m4 \
@@ -361,10 +362,6 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -417,6 +414,7 @@ LN_S = @LN_S@
LSCF = @LSCF@
LTHREAD_LIBS = @LTHREAD_LIBS@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
@@ -480,6 +478,9 @@ NTPTRACE_DL = @NTPTRACE_DL@
NTPTRACE_DS = @NTPTRACE_DS@
NTPTRACE_MS = @NTPTRACE_MS@
NTPTRACE_NI = @NTPTRACE_NI@
+NTP_HARD_CFLAGS = @NTP_HARD_CFLAGS@
+NTP_HARD_CPPFLAGS = @NTP_HARD_CPPFLAGS@
+NTP_HARD_LDFLAGS = @NTP_HARD_LDFLAGS@
NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
@@ -553,7 +554,6 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -606,9 +606,10 @@ bin_PROGRAMS = $(NTPD_DB) $(NTPDSIM_DB)
libexec_PROGRAMS = $(NTPD_DL) $(NTPDSIM_DL)
sbin_PROGRAMS = $(NTPD_DS) $(NTPDSIM_DS)
noinst_LIBRARIES = libntpd.a
-AM_CFLAGS = $(CFLAGS_NTP)
-AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP)
-AM_LDFLAGS = $(LDFLAGS_NTP)
+AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
+AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP) \
+ $(NTP_HARD_CPPFLAGS)
+AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB.
LDADD = version.o libntpd.a $(LIBPARSE)
diff --git a/contrib/ntp/ntpd/invoke-ntp.conf.texi b/contrib/ntp/ntpd/invoke-ntp.conf.texi
index afd92ff..ff8dbdf 100644
--- a/contrib/ntp/ntpd/invoke-ntp.conf.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed November 21, 2016 at 08:01:55 AM by AutoGen 5.18.5
+# It has been AutoGen-ed March 21, 2017 at 10:44:16 AM by AutoGen 5.18.5
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/contrib/ntp/ntpd/invoke-ntp.keys.texi b/contrib/ntp/ntpd/invoke-ntp.keys.texi
index 5982f03..f1b1f32 100644
--- a/contrib/ntp/ntpd/invoke-ntp.keys.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed November 21, 2016 at 08:01:58 AM by AutoGen 5.18.5
+# It has been AutoGen-ed March 21, 2017 at 10:31:04 AM by AutoGen 5.18.5
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/contrib/ntp/ntpd/invoke-ntpd.texi b/contrib/ntp/ntpd/invoke-ntpd.texi
index 975494b..0b881db 100644
--- a/contrib/ntp/ntpd/invoke-ntpd.texi
+++ b/contrib/ntp/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed November 21, 2016 at 08:02:00 AM by AutoGen 5.18.5
+# It has been AutoGen-ed March 21, 2017 at 10:44:20 AM by AutoGen 5.18.5
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -142,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.8p9
+ntpd - NTP daemon program - Ver. 4.2.8p10-beta
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/ntpd/ntp.conf.5man b/contrib/ntp/ntpd/ntp.conf.5man
index 35fa0aa..846465a 100644
--- a/contrib/ntp/ntpd/ntp.conf.5man
+++ b/contrib/ntp/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "21 Nov 2016" "4.2.8p9" "File Formats"
+.TH ntp.conf 5man "21 Mar 2017" "4.2.8p10-beta" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Q_ai3f/ag-2_aa2f)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-UAaqtC/ag-6AaisC)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:01:41 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:30:48 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -3182,7 +3182,7 @@ RFC5905
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.conf.5mdoc b/contrib/ntp/ntpd/ntp.conf.5mdoc
index 3d328eb..46e8cab 100644
--- a/contrib/ntp/ntpd/ntp.conf.5mdoc
+++ b/contrib/ntp/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd November 21 2016
+.Dd March 21 2017
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:02:03 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:31:09 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -2987,7 +2987,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.conf.html b/contrib/ntp/ntpd/ntp.conf.html
index 31cf87e..5718a01 100644
--- a/contrib/ntp/ntpd/ntp.conf.html
+++ b/contrib/ntp/ntpd/ntp.conf.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the configuration file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.8p9 of <code>ntp.conf</code>.
+ <p>This document applies to version 4.2.8p10 of <code>ntp.conf</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/contrib/ntp/ntpd/ntp.conf.man.in b/contrib/ntp/ntpd/ntp.conf.man.in
index d6ee791..cd6faaa 100644
--- a/contrib/ntp/ntpd/ntp.conf.man.in
+++ b/contrib/ntp/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "21 Nov 2016" "4.2.8p9" "File Formats"
+.TH ntp.conf 5 "21 Mar 2017" "4.2.8p10-beta" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Q_ai3f/ag-2_aa2f)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-UAaqtC/ag-6AaisC)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:01:41 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:30:48 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -3182,7 +3182,7 @@ RFC5905
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.conf.mdoc.in b/contrib/ntp/ntpd/ntp.conf.mdoc.in
index ea6fe4e..1d5d3b6 100644
--- a/contrib/ntp/ntpd/ntp.conf.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd November 21 2016
+.Dd March 21 2017
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:02:03 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:31:09 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -2987,7 +2987,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/contrib/ntp/ntpd/ntp.keys.5man b/contrib/ntp/ntpd/ntp.keys.5man
index 2125af0..9daf75f 100644
--- a/contrib/ntp/ntpd/ntp.keys.5man
+++ b/contrib/ntp/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "21 Nov 2016" "4.2.8p9" "File Formats"
+.TH ntp.keys 5man "21 Mar 2017" "4.2.8p10" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:01:46 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:10 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -168,7 +168,7 @@ the default name of the configuration file
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp.keys.5mdoc b/contrib/ntp/ntpd/ntp.keys.5mdoc
index 33d1b8b..02664db 100644
--- a/contrib/ntp/ntpd/ntp.keys.5mdoc
+++ b/contrib/ntp/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd November 21 2016
+.Dd March 21 2017
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:02:06 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:22 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -155,7 +155,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp.keys.html b/contrib/ntp/ntpd/ntp.keys.html
index 63e7002..7713789 100644
--- a/contrib/ntp/ntpd/ntp.keys.html
+++ b/contrib/ntp/ntpd/ntp.keys.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the symmetric key file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.8p9 of <code>ntp.keys</code>.
+ <p>This document applies to version 4.2.8p10 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/contrib/ntp/ntpd/ntp.keys.man.in b/contrib/ntp/ntpd/ntp.keys.man.in
index 49465e0..a88bf58 100644
--- a/contrib/ntp/ntpd/ntp.keys.man.in
+++ b/contrib/ntp/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "21 Nov 2016" "4.2.8p9" "File Formats"
+.TH ntp.keys 5 "21 Mar 2017" "4.2.8p10" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:01:46 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:10 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -168,7 +168,7 @@ the default name of the configuration file
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp.keys.mdoc.in b/contrib/ntp/ntpd/ntp.keys.mdoc.in
index 3ace854..fb2f7ea 100644
--- a/contrib/ntp/ntpd/ntp.keys.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd November 21 2016
+.Dd March 21 2017
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:02:06 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:22 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -155,7 +155,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
index c36a218..428ab9f 100644
--- a/contrib/ntp/ntpd/ntp_config.c
+++ b/contrib/ntp/ntpd/ntp_config.c
@@ -361,13 +361,32 @@ static char * normal_dtoa(double);
static u_int32 get_pfxmatch(const char **, struct masks *);
static u_int32 get_match(const char *, struct masks *);
static u_int32 get_logmask(const char *);
+static int/*BOOL*/ is_refclk_addr(const address_node * addr);
+
+
#ifndef SIM
static int getnetnum(const char *num, sockaddr_u *addr, int complain,
enum gnn_type a_type);
#endif
+#if defined(__GNUC__) /* this covers CLANG, too */
+static void __attribute__((noreturn,format(printf,1,2))) fatal_error(const char *fmt, ...)
+#elif defined(_MSC_VER)
+static void __declspec(noreturn) fatal_error(const char *fmt, ...)
+#else
+static void fatal_error(const char *fmt, ...)
+#endif
+{
+ va_list va;
+
+ va_start(va, fmt);
+ mvsyslog(LOG_EMERG, fmt, va);
+ va_end(va);
+ _exit(1);
+}
+
/* FUNCTIONS FOR INITIALIZATION
* ----------------------------
*/
@@ -1266,7 +1285,10 @@ create_peer_node(
break;
case T_Ttl:
- if (option->value.u >= MAX_TTL) {
+ if (is_refclk_addr(addr)) {
+ msyslog(LOG_ERR, "'ttl' does not apply for refclocks");
+ errflag = 1;
+ } else if (option->value.u >= MAX_TTL) {
msyslog(LOG_ERR, "ttl: invalid argument");
errflag = 1;
} else {
@@ -1275,7 +1297,12 @@ create_peer_node(
break;
case T_Mode:
- my_node->ttl = option->value.u;
+ if (is_refclk_addr(addr)) {
+ my_node->ttl = option->value.u;
+ } else {
+ msyslog(LOG_ERR, "'mode' does not apply for network peers");
+ errflag = 1;
+ }
break;
case T_Key:
@@ -1328,8 +1355,8 @@ create_unpeer_node(
)
{
unpeer_node * my_node;
- u_int u;
- char * pch;
+ u_long u;
+ const u_char * pch;
my_node = emalloc_zero(sizeof(*my_node));
@@ -1338,16 +1365,15 @@ create_unpeer_node(
* its generic T_String definition of a name/address "address".
* We treat all valid 16-bit numbers as association IDs.
*/
- pch = addr->address;
- while (*pch && isdigit((unsigned char)*pch))
- pch++;
-
- if (!*pch
- && 1 == sscanf(addr->address, "%u", &u)
- && u <= ASSOCID_MAX) {
+ for (u = 0, pch = (u_char*)addr->address; isdigit(*pch); ++pch) {
+ /* accumulate with overflow retention */
+ u = (10 * u + *pch - '0') | (u & 0xFF000000u);
+ }
+
+ if (!*pch && u <= ASSOCID_MAX) {
my_node->assocID = (associd_t)u;
- destroy_address_node(addr);
my_node->addr = NULL;
+ destroy_address_node(addr);
} else {
my_node->assocID = 0;
my_node->addr = addr;
@@ -1841,16 +1867,12 @@ config_auth(
/* Crypto Command */
#ifdef AUTOKEY
-# ifdef __GNUC__
- item = -1; /* quiet warning */
-# endif
my_val = HEAD_PFIFO(ptree->auth.crypto_cmd_list);
for (; my_val != NULL; my_val = my_val->link) {
switch (my_val->attr) {
default:
- INSIST(0);
- break;
+ fatal_error("config_auth: attr-token=%d", my_val->attr);
case T_Host:
item = CRYPTO_CONF_PRIV;
@@ -1996,40 +2018,96 @@ config_tos(
int item;
double val;
-#ifdef __GNUC__
- item = -1; /* quiet warning */
-#endif
+ /* [Bug 2896] For the daemon to work properly it is essential
+ * that minsane < minclock <= maxclock.
+ *
+ * If either constraint is violated, the daemon will be or might
+ * become dysfunctional. Fixing the values is too fragile here,
+ * since three variables with interdependecies are involved. We
+ * just log an error but do not stop: This might be caused by
+ * remote config, and it might be fixed by remote config, too.
+ */
+ int l_maxclock = sys_maxclock;
+ int l_minclock = sys_minclock;
+ int l_minsane = sys_minsane;
+
+ /* -*- phase one: inspect / sanitize the values */
tos = HEAD_PFIFO(ptree->orphan_cmds);
for (; tos != NULL; tos = tos->link) {
val = tos->value.d;
switch(tos->attr) {
-
default:
- INSIST(0);
break;
case T_Bcpollbstep:
if (val > 4) {
msyslog(LOG_WARNING,
- "Using maximum bcpollbstep ceiling %d, %g requested",
- 4, val);
- val = 4;
+ "Using maximum bcpollbstep ceiling %d, %d requested",
+ 4, (int)val);
+ tos->value.d = 4;
} else if (val < 0) {
msyslog(LOG_WARNING,
- "Using minimum bcpollbstep floor %d, %g requested",
- 0, val);
- val = 0;
+ "Using minimum bcpollbstep floor %d, %d requested",
+ 0, (int)val);
+ tos->value.d = 0;
}
- item = PROTO_BCPOLLBSTEP;
break;
-
+
case T_Ceiling:
if (val > STRATUM_UNSPEC - 1) {
msyslog(LOG_WARNING,
- "Using maximum tos ceiling %d, %g requested",
- STRATUM_UNSPEC - 1, val);
- val = STRATUM_UNSPEC - 1;
+ "Using maximum tos ceiling %d, %d requested",
+ STRATUM_UNSPEC - 1, (int)val);
+ tos->value.d = STRATUM_UNSPEC - 1;
+ } else if (val < 1) {
+ msyslog(LOG_WARNING,
+ "Using minimum tos floor %d, %d requested",
+ 1, (int)val);
+ tos->value.d = 1;
}
+ break;
+
+ case T_Minclock:
+ if ((int)tos->value.d < 1)
+ tos->value.d = 1;
+ l_minclock = (int)tos->value.d;
+ break;
+
+ case T_Maxclock:
+ if ((int)tos->value.d < 1)
+ tos->value.d = 1;
+ l_maxclock = (int)tos->value.d;
+ break;
+
+ case T_Minsane:
+ if ((int)tos->value.d < 1)
+ tos->value.d = 1;
+ l_minsane = (int)tos->value.d;
+ break;
+ }
+ }
+
+ if ( ! (l_minsane < l_minclock && l_minclock <= l_maxclock)) {
+ msyslog(LOG_ERR,
+ "tos error: must have minsane (%d) < minclock (%d) <= maxclock (%d)"
+ " - daemon will not operate properly!",
+ l_minsane, l_minclock, l_maxclock);
+ }
+
+ /* -*- phase two: forward the values to the protocol machinery */
+ tos = HEAD_PFIFO(ptree->orphan_cmds);
+ for (; tos != NULL; tos = tos->link) {
+ val = tos->value.d;
+ switch(tos->attr) {
+
+ default:
+ fatal_error("config-tos: attr-token=%d", tos->attr);
+
+ case T_Bcpollbstep:
+ item = PROTO_BCPOLLBSTEP;
+ break;
+
+ case T_Ceiling:
item = PROTO_CEILING;
break;
@@ -2172,8 +2250,7 @@ config_monitor(
switch (my_opts->value.i) {
default:
- INSIST(0);
- break;
+ fatal_error("config-monitor: type-token=%d", my_opts->value.i);
case T_None:
filegen_type = FILEGEN_NONE;
@@ -2409,8 +2486,7 @@ config_access(
switch (curr_flag->i) {
default:
- INSIST(0);
- break;
+ fatal_error("config-access: flag-type-token=%d", curr_flag->i);
case T_Ntpport:
mflags |= RESM_NTPONLY;
@@ -2640,8 +2716,7 @@ config_rlimit(
switch (rlimit_av->attr) {
default:
- INSIST(0);
- break;
+ fatal_error("config-rlimit: value-token=%d", rlimit_av->attr);
case T_Memlock:
/* What if we HAVE_OPT(SAVECONFIGQUIT) ? */
@@ -2714,16 +2789,12 @@ config_tinker(
attr_val * tinker;
int item;
-#ifdef __GNUC__
- item = -1; /* quiet warning */
-#endif
tinker = HEAD_PFIFO(ptree->tinker);
for (; tinker != NULL; tinker = tinker->link) {
switch (tinker->attr) {
default:
- INSIST(0);
- break;
+ fatal_error("config_tinker: attr-token=%d", tinker->attr);
case T_Allan:
item = LOOP_ALLAN;
@@ -2830,16 +2901,7 @@ config_nic_rules(
switch (curr_node->match_class) {
default:
-#ifdef __GNUC__
- /*
- * this assignment quiets a gcc "may be used
- * uninitialized" warning and is here for no
- * other reason.
- */
- match_type = MATCH_ALL;
-#endif
- INSIST(FALSE);
- break;
+ fatal_error("config_nic_rules: match-class-token=%d", curr_node->match_class);
case 0:
/*
@@ -2890,16 +2952,7 @@ config_nic_rules(
switch (curr_node->action) {
default:
-#ifdef __GNUC__
- /*
- * this assignment quiets a gcc "may be used
- * uninitialized" warning and is here for no
- * other reason.
- */
- action = ACTION_LISTEN;
-#endif
- INSIST(FALSE);
- break;
+ fatal_error("config_nic_rules: action-token=%d", curr_node->action);
case T_Listen:
action = ACTION_LISTEN;
@@ -3087,8 +3140,7 @@ config_logconfig(
ntp_syslogmask = get_logmask(my_lc->value.s);
break;
default:
- INSIST(0);
- break;
+ fatal_error("config-logconfig: modifier='%c'", my_lc->attr);
}
}
}
@@ -3210,7 +3262,7 @@ config_ttl(
"ttl: Number of TTL entries exceeds %zu. Ignoring TTL %d...",
COUNTOF(sys_ttl), curr_ttl->i);
}
- sys_ttlmax = i - 1;
+ sys_ttlmax = (i) ? (i - 1) : 0;
}
#endif /* !SIM */
@@ -3738,8 +3790,7 @@ peerflag_bits(
switch (option->value.i) {
default:
- INSIST(0);
- break;
+ fatal_error("peerflag_bits: option-token=%d", option->value.i);
case T_Autokey:
peerflags |= FLAG_SKEY;
@@ -4040,10 +4091,10 @@ config_unpeers(
curr_unpeer = HEAD_PFIFO(ptree->unpeers);
for (; curr_unpeer != NULL; curr_unpeer = curr_unpeer->link) {
/*
- * Either AssocID will be zero, and we unpeer by name/
- * address addr, or it is nonzero and addr NULL.
+ * If we have no address attached, assume we have to
+ * unpeer by AssocID.
*/
- if (curr_unpeer->assocID) {
+ if (!curr_unpeer->addr) {
p = findpeerbyassoc(curr_unpeer->assocID);
if (p != NULL) {
msyslog(LOG_NOTICE, "unpeered %s",
@@ -4051,7 +4102,6 @@ config_unpeers(
peer_clear(p, "GONE");
unpeer(p);
}
-
continue;
}
@@ -4070,7 +4120,6 @@ config_unpeers(
peer_clear(p, "GONE");
unpeer(p);
}
-
continue;
}
/*
@@ -4384,11 +4433,11 @@ config_ntpd(
config_mdnstries(ptree);
config_setvar(ptree);
config_ttl(ptree);
- config_trap(ptree);
config_vars(ptree);
- io_open_sockets();
+ io_open_sockets(); /* [bug 2837] dep. on config_vars() */
+ config_trap(ptree); /* [bug 2923] dep. on io_open_sockets() */
config_other_modes(ptree);
config_peers(ptree);
config_unpeers(ptree);
@@ -4636,6 +4685,16 @@ save_and_apply_config_tree(int/*BOOL*/ input_from_file)
#endif
}
+/* Hack to disambiguate 'server' statements for refclocks and network peers.
+ * Please note the qualification 'hack'. It's just that.
+ */
+static int/*BOOL*/
+is_refclk_addr(
+ const address_node * addr
+ )
+{
+ return addr && addr->address && !strncmp(addr->address, "127.127.", 6);
+}
static void
ntpd_set_tod_using(
@@ -5041,8 +5100,7 @@ ntp_rlimit(
# endif /* RLIMIT_STACK */
default:
- INSIST(!"Unexpected setrlimit() case!");
- break;
+ fatal_error("ntp_rlimit: unexpected RLIMIT case: %d", rl_what);
}
}
#endif /* HAVE_SETRLIMIT */
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index fac17a7..a18a4d3 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -33,8 +33,6 @@
# include "ntp_syscall.h"
#endif
-#include "libssl_compat.h"
-
/*
* Structure to hold request procedure information
*/
@@ -1549,21 +1547,15 @@ ctl_putstr(
)
{
char buffer[512];
- char *cp;
- size_t tl;
-
- tl = strlen(tag);
- memcpy(buffer, tag, tl);
- cp = buffer + tl;
- if (len > 0) {
- INSIST(tl + 3 + len <= sizeof(buffer));
- *cp++ = '=';
- *cp++ = '"';
- memcpy(cp, data, len);
- cp += len;
- *cp++ = '"';
- }
- ctl_putdata(buffer, (u_int)(cp - buffer), 0);
+ int rc;
+
+ INSIST(len < sizeof(buffer));
+ if (len)
+ rc = snprintf(buffer, sizeof(buffer), "%s=\"%.*s\"", tag, (int)len, data);
+ else
+ rc = snprintf(buffer, sizeof(buffer), "%s", tag);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
@@ -1584,19 +1576,15 @@ ctl_putunqstr(
)
{
char buffer[512];
- char *cp;
- size_t tl;
-
- tl = strlen(tag);
- memcpy(buffer, tag, tl);
- cp = buffer + tl;
- if (len > 0) {
- INSIST(tl + 1 + len <= sizeof(buffer));
- *cp++ = '=';
- memcpy(cp, data, len);
- cp += len;
- }
- ctl_putdata(buffer, (u_int)(cp - buffer), 0);
+ int rc;
+
+ INSIST(len < sizeof(buffer));
+ if (len)
+ rc = snprintf(buffer, sizeof(buffer), "%s=%.*s", tag, (int)len, data);
+ else
+ rc = snprintf(buffer, sizeof(buffer), "%s", tag);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
@@ -1611,20 +1599,14 @@ ctl_putdblf(
double d
)
{
- char *cp;
- const char *cq;
char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
- *cp++ = '=';
- INSIST((size_t)(cp - buffer) < sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), use_f ? "%.*f" : "%.*g",
- precision, d);
- cp += strlen(cp);
- ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
+ int rc;
+
+ rc = snprintf(buffer, sizeof(buffer),
+ (use_f ? "%s=%.*f" : "%s=%.*g"),
+ tag, precision, d);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
/*
@@ -1636,25 +1618,19 @@ ctl_putuint(
u_long uval
)
{
- register char *cp;
- register const char *cq;
char buffer[200];
+ int rc;
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- INSIST((cp - buffer) < (int)sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), "%lu", uval);
- cp += strlen(cp);
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
+ rc = snprintf(buffer, sizeof(buffer), "%s=%lu", tag, uval);
+ INSIST(rc >= 0 && rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
/*
- * ctl_putcal - write a decoded calendar data into the response
+ * ctl_putcal - write a decoded calendar data into the response.
+ * only used with AUTOKEY currently, so compiled conditional
*/
+#ifdef AUTOKEY
static void
ctl_putcal(
const char *tag,
@@ -1662,22 +1638,18 @@ ctl_putcal(
)
{
char buffer[100];
- unsigned numch;
-
- numch = snprintf(buffer, sizeof(buffer),
- "%s=%04d%02d%02d%02d%02d",
- tag,
- pcal->year,
- pcal->month,
- pcal->monthday,
- pcal->hour,
- pcal->minute
- );
- INSIST(numch < sizeof(buffer));
- ctl_putdata(buffer, numch, 0);
+ int rc;
- return;
+ rc = snprintf(buffer, sizeof(buffer),
+ "%s=%04d%02d%02d%02d%02d",
+ tag,
+ pcal->year, pcal->month, pcal->monthday,
+ pcal->hour, pcal->minute
+ );
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
+#endif
/*
* ctl_putfs - write a decoded filestamp into the response
@@ -1688,28 +1660,23 @@ ctl_putfs(
tstamp_t uval
)
{
- register char *cp;
- register const char *cq;
char buffer[200];
struct tm *tm = NULL;
time_t fstamp;
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- fstamp = uval - JAN_1970;
+ int rc;
+
+ fstamp = (time_t)uval - JAN_1970;
tm = gmtime(&fstamp);
- if (NULL == tm)
+ if (NULL == tm)
return;
- INSIST((cp - buffer) < (int)sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer),
- "%04d%02d%02d%02d%02d", tm->tm_year + 1900,
- tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min);
- cp += strlen(cp);
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
+
+ rc = snprintf(buffer, sizeof(buffer),
+ "%s=%04d%02d%02d%02d%02d",
+ tag,
+ tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
@@ -1723,20 +1690,12 @@ ctl_puthex(
u_long uval
)
{
- register char *cp;
- register const char *cq;
char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- INSIST((cp - buffer) < (int)sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%lx", uval);
- cp += strlen(cp);
- ctl_putdata(buffer,(unsigned)( cp - buffer ), 0);
+ int rc;
+
+ rc = snprintf(buffer, sizeof(buffer), "%s=0x%lx", tag, uval);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
@@ -1749,20 +1708,12 @@ ctl_putint(
long ival
)
{
- register char *cp;
- register const char *cq;
char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- INSIST((cp - buffer) < (int)sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), "%ld", ival);
- cp += strlen(cp);
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
+ int rc;
+
+ rc = snprintf(buffer, sizeof(buffer), "%s=%ld", tag, ival);
+ INSIST(rc >= 0 && rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
@@ -1775,21 +1726,14 @@ ctl_putts(
l_fp *ts
)
{
- register char *cp;
- register const char *cq;
char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- INSIST((size_t)(cp - buffer) < sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%08x.%08x",
- (u_int)ts->l_ui, (u_int)ts->l_uf);
- cp += strlen(cp);
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
+ int rc;
+
+ rc = snprintf(buffer, sizeof(buffer),
+ "%s=0x%08lx.%08lx",
+ tag, (u_long)ts->l_ui, (u_long)ts->l_uf);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
@@ -1803,24 +1747,17 @@ ctl_putadr(
sockaddr_u *addr
)
{
- register char *cp;
- register const char *cq;
+ const char *cq;
char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
+ int rc;
+
if (NULL == addr)
cq = numtoa(addr32);
else
cq = stoa(addr);
- INSIST((cp - buffer) < (int)sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), "%s", cq);
- cp += strlen(cp);
- ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
+ rc = snprintf(buffer, sizeof(buffer), "%s=%s", tag, cq);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, 0);
}
@@ -1833,34 +1770,22 @@ ctl_putrefid(
u_int32 refid
)
{
- char output[16];
- char * optr;
- char * oplim;
- char * iptr;
- char * iplim;
- char * past_eq;
-
- optr = output;
- oplim = output + sizeof(output);
- while (optr < oplim && '\0' != *tag)
- *optr++ = *tag++;
- if (optr < oplim) {
- *optr++ = '=';
- past_eq = optr;
- }
- if (!(optr < oplim))
- return;
- iptr = (char *)&refid;
- iplim = iptr + sizeof(refid);
- for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
- iptr++, optr++)
- if (isprint((int)*iptr))
- *optr = *iptr;
- else
- *optr = '.';
- if (!(optr <= oplim))
- optr = past_eq;
- ctl_putdata(output, (u_int)(optr - output), FALSE);
+ char buffer[128];
+ int rc, i;
+
+ union {
+ uint32_t w;
+ uint8_t b[sizeof(uint32_t)];
+ } bytes;
+
+ bytes.w = refid;
+ for (i = 0; i < sizeof(bytes.b); ++i)
+ if (bytes.b[i] && !isprint(bytes.b[i]))
+ bytes.b[i] = '.';
+ rc = snprintf(buffer, sizeof(buffer), "%s=%.*s",
+ tag, (int)sizeof(bytes.b), bytes.b);
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
+ ctl_putdata(buffer, (u_int)rc, FALSE);
}
@@ -1874,26 +1799,27 @@ ctl_putarray(
int start
)
{
- register char *cp;
- register const char *cq;
+ char *cp, *ep;
char buffer[200];
- int i;
+ int i, rc;
+
cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
- *cp++ = '=';
+ ep = buffer + sizeof(buffer);
+
+ rc = snprintf(cp, (size_t)(ep - cp), "%s=", tag);
+ INSIST(rc >= 0 && rc < (ep - cp));
+ cp += rc;
+
i = start;
do {
if (i == 0)
i = NTP_SHIFT;
i--;
- INSIST((cp - buffer) < (int)sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer),
- " %.2f", arr[i] * 1e3);
- cp += strlen(cp);
+ rc = snprintf(cp, (size_t)(ep - cp), " %.2f", arr[i] * 1e3);
+ INSIST(rc >= 0 && rc < (ep - cp));
+ cp += rc;
} while (i != start);
- ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
+ ctl_putdata(buffer, (u_int)(cp - buffer), 0);
}
/*
@@ -2087,7 +2013,7 @@ ctl_putsys(
buffp = buf;
buffend = buf + sizeof(buf);
- if (buffp + strlen(sys_var[CS_VARLIST].text) + 4 > buffend)
+ if (strlen(sys_var[CS_VARLIST].text) > (sizeof(buf) - 4))
break; /* really long var name */
snprintf(buffp, sizeof(buf), "%s=\"",sys_var[CS_VARLIST].text);
@@ -2097,7 +2023,7 @@ ctl_putsys(
if (k->flags & PADDING)
continue;
len = strlen(k->text);
- if (buffp + len + 1 >= buffend)
+ if (len + 1 >= buffend - buffp)
break;
if (!firstVarName)
*buffp++ = ',';
@@ -2117,7 +2043,7 @@ ctl_putsys(
len = strlen(k->text);
else
len = ss1 - k->text;
- if (buffp + len + 1 >= buffend)
+ if (len + 1 >= buffend - buffp)
break;
if (firstVarName) {
*buffp++ = ',';
@@ -2126,7 +2052,7 @@ ctl_putsys(
memcpy(buffp, k->text,(unsigned)len);
buffp += len;
}
- if (buffp + 2 >= buffend)
+ if (2 >= buffend - buffp)
break;
*buffp++ = '"';
@@ -4995,7 +4921,7 @@ report_event(
u_char errlast;
errlast = (u_char)err & ~PEER_EVENT;
- if (peer->last_event == errlast)
+ if (peer->last_event != errlast)
peer->num_events = 0;
if (peer->num_events >= CTL_PEER_MAXEVENTS)
return;
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
index 956875d..36b43cf 100644
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ b/contrib/ntp/ntpd/ntp_crypto.c
@@ -22,11 +22,15 @@
#include "ntp_calendar.h"
#include "ntp_leapsec.h"
+#include "openssl/asn1.h"
#include "openssl/bn.h"
+#include "openssl/crypto.h"
#include "openssl/err.h"
#include "openssl/evp.h"
+#include "openssl/opensslv.h"
#include "openssl/pem.h"
#include "openssl/rand.h"
+#include "openssl/x509.h"
#include "openssl/x509v3.h"
#include "libssl_compat.h"
@@ -193,7 +197,7 @@ static int crypto_gq (struct exten *, struct peer *);
static int crypto_mv (struct exten *, struct peer *);
static int crypto_send (struct exten *, struct value *, int);
static tstamp_t crypto_time (void);
-static void asn_to_calendar (ASN1_TIME *, struct calendar*);
+static void asn_to_calendar (const ASN1_TIME *, struct calendar*);
static struct cert_info *cert_parse (const u_char *, long, tstamp_t);
static int cert_sign (struct exten *, struct value *);
static struct cert_info *cert_install (struct exten *, struct peer *);
@@ -2010,7 +2014,7 @@ crypto_time()
static
void
asn_to_calendar (
- ASN1_TIME *asn1time, /* pointer to ASN1_TIME structure */
+ const ASN1_TIME *asn1time, /* pointer to ASN1_TIME structure */
struct calendar *pjd /* pointer to result */
)
{
@@ -3187,8 +3191,8 @@ cert_sign(
serial = ASN1_INTEGER_new();
ASN1_INTEGER_set(serial, tstamp);
X509_set_serialNumber(cert, serial);
- X509_gmtime_adj(X509_get_notBefore(cert), 0L);
- X509_gmtime_adj(X509_get_notAfter(cert), YEAR);
+ X509_gmtime_adj(X509_getm_notBefore(cert), 0L);
+ X509_gmtime_adj(X509_getm_notAfter(cert), YEAR);
subj = X509_get_issuer_name(cert);
X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
hostval.ptr, strlen((const char *)hostval.ptr), -1, 0);
@@ -3497,8 +3501,8 @@ cert_parse(
return (NULL);
}
ret->issuer = estrdup(pch + 3);
- asn_to_calendar(X509_get_notBefore(cert), &(ret->first));
- asn_to_calendar(X509_get_notAfter(cert), &(ret->last));
+ asn_to_calendar(X509_get0_notBefore(cert), &(ret->first));
+ asn_to_calendar(X509_get0_notAfter(cert), &(ret->last));
/*
* Extract extension fields. These are ad hoc ripoffs of
@@ -3922,7 +3926,8 @@ crypto_setup(void)
RAND_seed(&seed, sizeof(l_fp));
RAND_write_file(randfile);
DPRINTF(1, ("crypto_setup: OpenSSL version %lx random seed file %s bytes read %d\n",
- SSLeay(), randfile, bytes));
+ OpenSSL_version_num(), randfile, bytes));
+
}
/*
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index 8064252..fe62ec5 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -516,13 +516,17 @@ io_open_sockets(void)
/*
* function to dump the contents of the interface structure
* for debugging use only.
+ * We face a dilemma here -- sockets are FDs under POSIX and
+ * actually HANDLES under Windows. So we use '%lld' as format
+ * and cast the value to 'long long'; this should not hurt
+ * with UNIX-like systems and does not truncate values on Win64.
*/
void
interface_dump(const endpt *itf)
{
printf("Dumping interface: %p\n", itf);
- printf("fd = %d\n", itf->fd);
- printf("bfd = %d\n", itf->bfd);
+ printf("fd = %lld\n", (long long)itf->fd);
+ printf("bfd = %lld\n", (long long)itf->bfd);
printf("sin = %s,\n", stoa(&itf->sin));
sockaddr_dump(&itf->sin);
printf("bcast = %s,\n", stoa(&itf->bcast));
@@ -570,11 +574,11 @@ sockaddr_dump(const sockaddr_u *psau)
static void
print_interface(const endpt *iface, const char *pfx, const char *sfx)
{
- printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, ifindex=%u, sin=%s",
+ printf("%sinterface #%d: fd=%lld, bfd=%lld, name=%s, flags=0x%x, ifindex=%u, sin=%s",
pfx,
iface->ifnum,
- iface->fd,
- iface->bfd,
+ (long long)iface->fd,
+ (long long)iface->bfd,
iface->name,
iface->flags,
iface->ifindex,
@@ -2561,7 +2565,7 @@ io_setbclient(void)
{
#ifdef OPEN_BCAST_SOCKET
struct interface * interf;
- int nif;
+ unsigned int nif;
nif = 0;
set_reuseaddr(1);
@@ -2638,11 +2642,10 @@ io_setbclient(void)
}
}
set_reuseaddr(0);
- if (nif > 0) {
+ if (nif != 0) {
broadcast_client_enabled = ISC_TRUE;
DPRINTF(1, ("io_setbclient: listening to %d broadcast addresses\n", nif));
- }
- else if (!nif) {
+ } else {
broadcast_client_enabled = ISC_FALSE;
msyslog(LOG_ERR,
"Unable to listen for broadcasts, no broadcast interfaces available");
diff --git a/contrib/ntp/ntpd/ntp_loopfilter.c b/contrib/ntp/ntpd/ntp_loopfilter.c
index c8320c4..8d44fb1 100644
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ b/contrib/ntp/ntpd/ntp_loopfilter.c
@@ -1307,8 +1307,7 @@ loop_config(
if (freq < HUFFPUFF)
freq = HUFFPUFF;
sys_hufflen = (int)(freq / HUFFPUFF);
- sys_huffpuff = emalloc(sizeof(sys_huffpuff[0]) *
- sys_hufflen);
+ sys_huffpuff = eallocarray(sys_hufflen, sizeof(sys_huffpuff[0]));
for (i = 0; i < sys_hufflen; i++)
sys_huffpuff[i] = 1e9;
sys_mindly = 1e9;
diff --git a/contrib/ntp/ntpd/ntp_parser.c b/contrib/ntp/ntpd/ntp_parser.c
index acf0ad7..7114a65 100644
--- a/contrib/ntp/ntpd/ntp_parser.c
+++ b/contrib/ntp/ntpd/ntp_parser.c
@@ -62,7 +62,7 @@
/* Copy the first part of user declarations. */
-#line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339 */
+#line 11 "ntp_parser.y" /* yacc.c:339 */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -532,7 +532,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
+#line 51 "ntp_parser.y" /* yacc.c:355 */
char * String;
double Double;
@@ -894,7 +894,7 @@ static const yytype_uint16 yyrline[] =
536, 538, 549, 556, 558, 563, 565, 567, 569, 571,
580, 586, 587, 595, 597, 609, 610, 611, 612, 613,
622, 627, 632, 640, 642, 644, 649, 650, 651, 652,
- 653, 654, 655, 659, 660, 661, 662, 671, 673, 682,
+ 653, 654, 655, 656, 657, 661, 662, 671, 673, 682,
692, 697, 705, 706, 707, 708, 709, 710, 711, 712,
717, 718, 726, 736, 745, 760, 765, 766, 770, 771,
775, 776, 777, 778, 779, 780, 781, 790, 794, 798,
@@ -1111,8 +1111,8 @@ static const yytype_uint16 yydefact[] =
135, 29, 30, 135, 135, 26, 68, 189, 187, 188,
183, 185, 0, 0, 233, 97, 101, 98, 212, 213,
214, 215, 216, 217, 218, 219, 220, 221, 208, 210,
- 0, 86, 92, 87, 0, 88, 96, 94, 95, 93,
- 91, 89, 90, 80, 82, 0, 0, 252, 284, 0,
+ 0, 86, 87, 88, 0, 89, 90, 96, 91, 95,
+ 92, 93, 94, 80, 82, 0, 0, 252, 284, 0,
69, 283, 285, 281, 235, 1, 0, 4, 31, 55,
295, 294, 224, 225, 226, 227, 269, 268, 267, 0,
0, 79, 75, 76, 77, 78, 0, 72, 0, 192,
@@ -1373,7 +1373,7 @@ static const yytype_uint16 yyr1[] =
223, 223, 224, 224, 224, 224, 224, 224, 224, 224,
224, 225, 225, 226, 226, 227, 227, 227, 227, 227,
228, 229, 229, 230, 230, 230, 231, 231, 231, 231,
- 231, 231, 231, 232, 232, 232, 232, 233, 233, 233,
+ 231, 231, 231, 231, 231, 232, 232, 233, 233, 233,
234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
236, 236, 237, 237, 237, 237, 238, 238, 239, 239,
240, 240, 240, 240, 240, 240, 240, 241, 241, 241,
@@ -2109,7 +2109,7 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 378 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 378 "ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2126,7 +2126,7 @@ yyreduce:
break;
case 20:
-#line 414 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 414 "ntp_parser.y" /* yacc.c:1646 */
{
peer_node *my_node;
@@ -2137,37 +2137,37 @@ yyreduce:
break;
case 27:
-#line 433 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 433 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
#line 2143 "ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-#line 438 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 438 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
#line 2149 "ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-#line 443 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 443 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
#line 2155 "ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-#line 445 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 445 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
#line 2161 "ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-#line 450 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 450 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
#line 2167 "ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-#line 452 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 452 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2176,31 +2176,31 @@ yyreduce:
break;
case 36:
-#line 466 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 466 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
#line 2182 "ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-#line 482 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 482 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
#line 2188 "ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-#line 484 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 484 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
#line 2194 "ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-#line 498 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 498 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
#line 2200 "ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-#line 512 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 512 "ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
@@ -2212,31 +2212,31 @@ yyreduce:
break;
case 58:
-#line 533 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 533 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
#line 2218 "ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-#line 535 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 535 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
#line 2224 "ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-#line 537 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 537 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
#line 2230 "ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-#line 539 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 539 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.mdnstries = (yyvsp[0].Integer); }
#line 2236 "ntp_parser.c" /* yacc.c:1646 */
break;
case 62:
-#line 550 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 550 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *atrv;
@@ -2247,13 +2247,13 @@ yyreduce:
break;
case 63:
-#line 557 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 557 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
#line 2253 "ntp_parser.c" /* yacc.c:1646 */
break;
case 64:
-#line 559 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 559 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
@@ -2262,31 +2262,31 @@ yyreduce:
break;
case 65:
-#line 564 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 564 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keys = (yyvsp[0].String); }
#line 2268 "ntp_parser.c" /* yacc.c:1646 */
break;
case 66:
-#line 566 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 566 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keysdir = (yyvsp[0].String); }
#line 2274 "ntp_parser.c" /* yacc.c:1646 */
break;
case 67:
-#line 568 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 568 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
#line 2280 "ntp_parser.c" /* yacc.c:1646 */
break;
case 68:
-#line 570 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 570 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
#line 2286 "ntp_parser.c" /* yacc.c:1646 */
break;
case 69:
-#line 572 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 572 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
@@ -2299,19 +2299,19 @@ yyreduce:
break;
case 70:
-#line 581 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 581 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
#line 2305 "ntp_parser.c" /* yacc.c:1646 */
break;
case 71:
-#line 586 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 586 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
#line 2311 "ntp_parser.c" /* yacc.c:1646 */
break;
case 72:
-#line 588 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 588 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2320,13 +2320,13 @@ yyreduce:
break;
case 73:
-#line 596 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 596 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
#line 2326 "ntp_parser.c" /* yacc.c:1646 */
break;
case 74:
-#line 598 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 598 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2339,13 +2339,13 @@ yyreduce:
break;
case 80:
-#line 623 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 623 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
#line 2345 "ntp_parser.c" /* yacc.c:1646 */
break;
case 81:
-#line 628 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 628 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2354,7 +2354,7 @@ yyreduce:
break;
case 82:
-#line 633 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 633 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2363,31 +2363,31 @@ yyreduce:
break;
case 83:
-#line 641 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 641 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
#line 2369 "ntp_parser.c" /* yacc.c:1646 */
break;
case 84:
-#line 643 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 643 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
#line 2375 "ntp_parser.c" /* yacc.c:1646 */
break;
case 85:
-#line 645 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 645 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
#line 2381 "ntp_parser.c" /* yacc.c:1646 */
break;
case 97:
-#line 672 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 672 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
#line 2387 "ntp_parser.c" /* yacc.c:1646 */
break;
case 98:
-#line 674 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 674 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2400,7 +2400,7 @@ yyreduce:
break;
case 99:
-#line 683 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 683 "ntp_parser.y" /* yacc.c:1646 */
{
filegen_node *fgn;
@@ -2411,7 +2411,7 @@ yyreduce:
break;
case 100:
-#line 693 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 693 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
@@ -2420,7 +2420,7 @@ yyreduce:
break;
case 101:
-#line 698 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 698 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
@@ -2429,13 +2429,13 @@ yyreduce:
break;
case 110:
-#line 717 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 717 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
#line 2435 "ntp_parser.c" /* yacc.c:1646 */
break;
case 111:
-#line 719 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 719 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2444,7 +2444,7 @@ yyreduce:
break;
case 112:
-#line 727 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 727 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2458,7 +2458,7 @@ yyreduce:
break;
case 113:
-#line 737 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 737 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2471,7 +2471,7 @@ yyreduce:
break;
case 114:
-#line 746 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 746 "ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
@@ -2490,13 +2490,13 @@ yyreduce:
break;
case 115:
-#line 761 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 761 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
#line 2496 "ntp_parser.c" /* yacc.c:1646 */
break;
case 127:
-#line 791 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 791 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
@@ -2504,7 +2504,7 @@ yyreduce:
break;
case 128:
-#line 795 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 795 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
@@ -2512,7 +2512,7 @@ yyreduce:
break;
case 129:
-#line 799 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 799 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2524,7 +2524,7 @@ yyreduce:
break;
case 130:
-#line 807 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 807 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2536,7 +2536,7 @@ yyreduce:
break;
case 131:
-#line 815 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 815 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2548,7 +2548,7 @@ yyreduce:
break;
case 132:
-#line 823 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 823 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2567,7 +2567,7 @@ yyreduce:
break;
case 133:
-#line 838 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 838 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2586,7 +2586,7 @@ yyreduce:
break;
case 134:
-#line 853 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 853 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
@@ -2599,13 +2599,13 @@ yyreduce:
break;
case 135:
-#line 865 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 865 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
#line 2605 "ntp_parser.c" /* yacc.c:1646 */
break;
case 136:
-#line 867 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 867 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
@@ -2614,7 +2614,7 @@ yyreduce:
break;
case 152:
-#line 893 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 893 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2623,7 +2623,7 @@ yyreduce:
break;
case 153:
-#line 898 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 898 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2632,13 +2632,13 @@ yyreduce:
break;
case 154:
-#line 906 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 906 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
#line 2638 "ntp_parser.c" /* yacc.c:1646 */
break;
case 158:
-#line 917 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 917 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2647,7 +2647,7 @@ yyreduce:
break;
case 159:
-#line 922 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 922 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2656,13 +2656,13 @@ yyreduce:
break;
case 160:
-#line 930 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 930 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
#line 2662 "ntp_parser.c" /* yacc.c:1646 */
break;
case 169:
-#line 950 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 950 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
@@ -2673,7 +2673,7 @@ yyreduce:
break;
case 170:
-#line 960 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 960 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2682,7 +2682,7 @@ yyreduce:
break;
case 171:
-#line 965 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 965 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2691,19 +2691,19 @@ yyreduce:
break;
case 172:
-#line 973 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 973 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
#line 2697 "ntp_parser.c" /* yacc.c:1646 */
break;
case 173:
-#line 975 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 975 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
#line 2703 "ntp_parser.c" /* yacc.c:1646 */
break;
case 174:
-#line 977 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 977 "ntp_parser.y" /* yacc.c:1646 */
{
if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2716,25 +2716,25 @@ yyreduce:
break;
case 175:
-#line 986 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 986 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
#line 2722 "ntp_parser.c" /* yacc.c:1646 */
break;
case 176:
-#line 988 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 988 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
#line 2728 "ntp_parser.c" /* yacc.c:1646 */
break;
case 183:
-#line 1009 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1009 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
#line 2734 "ntp_parser.c" /* yacc.c:1646 */
break;
case 184:
-#line 1014 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1014 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2743,7 +2743,7 @@ yyreduce:
break;
case 185:
-#line 1019 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1019 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2752,25 +2752,25 @@ yyreduce:
break;
case 186:
-#line 1027 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1027 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
#line 2758 "ntp_parser.c" /* yacc.c:1646 */
break;
case 190:
-#line 1043 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1043 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
#line 2764 "ntp_parser.c" /* yacc.c:1646 */
break;
case 191:
-#line 1045 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1045 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
#line 2770 "ntp_parser.c" /* yacc.c:1646 */
break;
case 192:
-#line 1050 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1050 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2779,7 +2779,7 @@ yyreduce:
break;
case 193:
-#line 1055 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1055 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2788,13 +2788,13 @@ yyreduce:
break;
case 194:
-#line 1063 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1063 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
#line 2794 "ntp_parser.c" /* yacc.c:1646 */
break;
case 195:
-#line 1065 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1065 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2812,13 +2812,13 @@ yyreduce:
break;
case 208:
-#line 1104 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1104 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
#line 2818 "ntp_parser.c" /* yacc.c:1646 */
break;
case 209:
-#line 1109 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1109 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2827,7 +2827,7 @@ yyreduce:
break;
case 210:
-#line 1114 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1114 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -2836,13 +2836,13 @@ yyreduce:
break;
case 211:
-#line 1122 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1122 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
#line 2842 "ntp_parser.c" /* yacc.c:1646 */
break;
case 224:
-#line 1147 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1147 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
@@ -2853,7 +2853,7 @@ yyreduce:
break;
case 225:
-#line 1154 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1154 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
@@ -2864,7 +2864,7 @@ yyreduce:
break;
case 226:
-#line 1161 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1161 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
@@ -2875,7 +2875,7 @@ yyreduce:
break;
case 227:
-#line 1168 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1168 "ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
@@ -2895,7 +2895,7 @@ yyreduce:
break;
case 228:
-#line 1184 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1184 "ntp_parser.y" /* yacc.c:1646 */
{
if (!lex_from_file()) {
YYFREE((yyvsp[-1].String)); /* avoid leak */
@@ -2918,37 +2918,37 @@ yyreduce:
break;
case 229:
-#line 1203 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1203 "ntp_parser.y" /* yacc.c:1646 */
{ lex_flush_stack(); }
#line 2924 "ntp_parser.c" /* yacc.c:1646 */
break;
case 230:
-#line 1205 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1205 "ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
#line 2930 "ntp_parser.c" /* yacc.c:1646 */
break;
case 231:
-#line 1207 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1207 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
#line 2936 "ntp_parser.c" /* yacc.c:1646 */
break;
case 232:
-#line 1209 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1209 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
#line 2942 "ntp_parser.c" /* yacc.c:1646 */
break;
case 233:
-#line 1211 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1211 "ntp_parser.y" /* yacc.c:1646 */
{ APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
#line 2948 "ntp_parser.c" /* yacc.c:1646 */
break;
case 234:
-#line 1213 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1213 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
@@ -2959,13 +2959,13 @@ yyreduce:
break;
case 235:
-#line 1220 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1220 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
#line 2965 "ntp_parser.c" /* yacc.c:1646 */
break;
case 240:
-#line 1235 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1235 "ntp_parser.y" /* yacc.c:1646 */
{
#ifndef LEAP_SMEAR
yyerror("Built without LEAP_SMEAR support.");
@@ -2975,7 +2975,7 @@ yyreduce:
break;
case 246:
-#line 1255 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1255 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -2990,7 +2990,7 @@ yyreduce:
break;
case 247:
-#line 1266 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1266 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -3007,7 +3007,7 @@ yyreduce:
break;
case 248:
-#line 1279 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1279 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -3021,25 +3021,25 @@ yyreduce:
break;
case 249:
-#line 1292 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1292 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
#line 3027 "ntp_parser.c" /* yacc.c:1646 */
break;
case 251:
-#line 1298 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1298 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
#line 3033 "ntp_parser.c" /* yacc.c:1646 */
break;
case 252:
-#line 1303 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1303 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
#line 3039 "ntp_parser.c" /* yacc.c:1646 */
break;
case 253:
-#line 1305 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1305 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -3048,13 +3048,13 @@ yyreduce:
break;
case 254:
-#line 1313 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1313 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
#line 3054 "ntp_parser.c" /* yacc.c:1646 */
break;
case 255:
-#line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1315 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
destroy_address_node((yyvsp[0].Address_node));
@@ -3063,7 +3063,7 @@ yyreduce:
break;
case 256:
-#line 1323 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1323 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -3072,7 +3072,7 @@ yyreduce:
break;
case 257:
-#line 1328 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1328 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -3081,7 +3081,7 @@ yyreduce:
break;
case 258:
-#line 1336 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1336 "ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
@@ -3107,7 +3107,7 @@ yyreduce:
break;
case 259:
-#line 1361 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1361 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
@@ -3118,7 +3118,7 @@ yyreduce:
break;
case 260:
-#line 1368 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1368 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
@@ -3129,13 +3129,13 @@ yyreduce:
break;
case 270:
-#line 1396 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1396 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
#line 3135 "ntp_parser.c" /* yacc.c:1646 */
break;
case 271:
-#line 1401 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1401 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
@@ -3144,7 +3144,7 @@ yyreduce:
break;
case 272:
-#line 1406 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1406 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
@@ -3153,7 +3153,7 @@ yyreduce:
break;
case 280:
-#line 1430 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1430 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
@@ -3162,7 +3162,7 @@ yyreduce:
break;
case 281:
-#line 1435 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1435 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
@@ -3171,7 +3171,7 @@ yyreduce:
break;
case 282:
-#line 1443 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1443 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -3180,7 +3180,7 @@ yyreduce:
break;
case 283:
-#line 1448 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1448 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
@@ -3189,19 +3189,19 @@ yyreduce:
break;
case 284:
-#line 1456 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1456 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
#line 3195 "ntp_parser.c" /* yacc.c:1646 */
break;
case 286:
-#line 1462 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1462 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
#line 3201 "ntp_parser.c" /* yacc.c:1646 */
break;
case 287:
-#line 1467 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1467 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = (yyvsp[-1].String_fifo);
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
@@ -3210,7 +3210,7 @@ yyreduce:
break;
case 288:
-#line 1472 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1472 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
@@ -3219,7 +3219,7 @@ yyreduce:
break;
case 289:
-#line 1480 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1480 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
@@ -3228,7 +3228,7 @@ yyreduce:
break;
case 290:
-#line 1485 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1485 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
@@ -3237,7 +3237,7 @@ yyreduce:
break;
case 291:
-#line 1493 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1493 "ntp_parser.y" /* yacc.c:1646 */
{
if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
yyerror("Integer value is not boolean (0 or 1). Assuming 1");
@@ -3250,25 +3250,25 @@ yyreduce:
break;
case 292:
-#line 1501 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1501 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
#line 3256 "ntp_parser.c" /* yacc.c:1646 */
break;
case 293:
-#line 1502 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1502 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
#line 3262 "ntp_parser.c" /* yacc.c:1646 */
break;
case 294:
-#line 1506 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1506 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (double)(yyvsp[0].Integer); }
#line 3268 "ntp_parser.c" /* yacc.c:1646 */
break;
case 296:
-#line 1517 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1517 "ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
@@ -3282,13 +3282,13 @@ yyreduce:
break;
case 297:
-#line 1534 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1534 "ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
#line 3288 "ntp_parser.c" /* yacc.c:1646 */
break;
case 298:
-#line 1539 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1539 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
@@ -3297,7 +3297,7 @@ yyreduce:
break;
case 299:
-#line 1544 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1544 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
@@ -3306,13 +3306,13 @@ yyreduce:
break;
case 300:
-#line 1552 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1552 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
#line 3312 "ntp_parser.c" /* yacc.c:1646 */
break;
case 303:
-#line 1562 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1562 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
@@ -3321,7 +3321,7 @@ yyreduce:
break;
case 304:
-#line 1567 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1567 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
@@ -3330,25 +3330,25 @@ yyreduce:
break;
case 305:
-#line 1575 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1575 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
#line 3336 "ntp_parser.c" /* yacc.c:1646 */
break;
case 306:
-#line 1580 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1580 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (yyvsp[-1].Double); }
#line 3342 "ntp_parser.c" /* yacc.c:1646 */
break;
case 307:
-#line 1585 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1585 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
#line 3348 "ntp_parser.c" /* yacc.c:1646 */
break;
case 308:
-#line 1590 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1590 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
@@ -3357,7 +3357,7 @@ yyreduce:
break;
case 309:
-#line 1595 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1595 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
@@ -3366,13 +3366,13 @@ yyreduce:
break;
case 310:
-#line 1603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1603 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
#line 3372 "ntp_parser.c" /* yacc.c:1646 */
break;
case 311:
-#line 1608 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1608 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
@@ -3381,7 +3381,7 @@ yyreduce:
break;
case 312:
-#line 1613 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1613 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
@@ -3390,7 +3390,7 @@ yyreduce:
break;
case 313:
-#line 1621 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1621 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
#line 3396 "ntp_parser.c" /* yacc.c:1646 */
break;
@@ -3624,7 +3624,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1632 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
+#line 1632 "ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/contrib/ntp/ntpd/ntp_parser.h b/contrib/ntp/ntpd/ntp_parser.h
index cfb9f0e..10c0cfd 100644
--- a/contrib/ntp/ntpd/ntp_parser.h
+++ b/contrib/ntp/ntpd/ntp_parser.h
@@ -446,7 +446,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:1909 */
+#line 51 "ntp_parser.y" /* yacc.c:1909 */
char * String;
double Double;
diff --git a/contrib/ntp/ntpd/ntp_peer.c b/contrib/ntp/ntpd/ntp_peer.c
index 04dee20..a296ea7 100644
--- a/contrib/ntp/ntpd/ntp_peer.c
+++ b/contrib/ntp/ntpd/ntp_peer.c
@@ -161,7 +161,7 @@ getmorepeermem(void)
int i;
struct peer *peers;
- peers = emalloc_zero(INC_PEER_ALLOC * sizeof(*peers));
+ peers = eallocarray(INC_PEER_ALLOC, sizeof(*peers));
for (i = INC_PEER_ALLOC - 1; i >= 0; i--)
LINK_SLIST(peer_free, &peers[i], p_link);
@@ -309,7 +309,8 @@ findpeer(
for (p = peer_hash[hash]; p != NULL; p = p->adr_link) {
/* [Bug 3072] ensure interface of peer matches */
- if (p->dstadr != rbufp->dstadr)
+ /* [Bug 3356] ... if NOT a broadcast peer! */
+ if (p->hmode != MODE_BCLIENT && p->dstadr != rbufp->dstadr)
continue;
/* ensure peer source address matches */
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
index ad04ed4..c5d7cc6 100644
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ b/contrib/ntp/ntpd/ntp_proto.c
@@ -147,7 +147,7 @@ int sys_cohort = 0; /* cohort switch */
int sys_orphan = STRATUM_UNSPEC + 1; /* orphan stratum */
int sys_orphwait = NTP_ORPHWAIT; /* orphan wait */
int sys_beacon = BEACON; /* manycast beacon interval */
-int sys_ttlmax; /* max ttl mapping vector index */
+u_int sys_ttlmax; /* max ttl mapping vector index */
u_char sys_ttl[MAX_TTL]; /* ttl mapping vector */
/*
@@ -401,7 +401,7 @@ transmit(
peer_xmit(peer);
} else if ( sys_survivors < sys_minclock
|| peer_associations < sys_maxclock) {
- if (peer->ttl < (u_int32)sys_ttlmax)
+ if (peer->ttl < sys_ttlmax)
peer->ttl++;
peer_xmit(peer);
}
@@ -1691,9 +1691,13 @@ receive(
if (0) {
} else if (L_ISZERO(&p_org)) {
- char *action;
+ const char *action;
+#ifdef BUG3361
+ msyslog(LOG_INFO,
+ "receive: BUG 3361: Clearing peer->aorg ");
L_CLR(&peer->aorg);
+#endif
/**/
switch (hismode) {
/* We allow 0org for: */
@@ -1712,6 +1716,7 @@ receive(
peer->flash |= TEST2; /* bogus */
break;
default:
+ action = ""; /* for cranky compilers / MSVC */
INSIST(!"receive(): impossible hismode");
break;
}
@@ -3719,8 +3724,9 @@ peer_xmit(
}
}
peer->t21_bytes = sendlen;
- sendpkt(&peer->srcadr, peer->dstadr, sys_ttl[peer->ttl],
- &xpkt, sendlen);
+ sendpkt(&peer->srcadr, peer->dstadr,
+ sys_ttl[(peer->ttl >= sys_ttlmax) ? sys_ttlmax : peer->ttl],
+ &xpkt, sendlen);
peer->sent++;
peer->throttle += (1 << peer->minpoll) - 2;
@@ -4030,8 +4036,9 @@ peer_xmit(
exit (-1);
}
peer->t21_bytes = sendlen;
- sendpkt(&peer->srcadr, peer->dstadr, sys_ttl[peer->ttl], &xpkt,
- sendlen);
+ sendpkt(&peer->srcadr, peer->dstadr,
+ sys_ttl[(peer->ttl >= sys_ttlmax) ? sys_ttlmax : peer->ttl],
+ &xpkt, sendlen);
peer->sent++;
peer->throttle += (1 << peer->minpoll) - 2;
@@ -4054,7 +4061,7 @@ peer_xmit(
ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
peer->keynumber));
#else /* !AUTOKEY follows */
- DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %d\n",
+ DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %zu\n",
current_time, peer->dstadr ?
ntoa(&peer->dstadr->sin) : "-",
ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen));
@@ -4352,8 +4359,9 @@ pool_xmit(
get_systime(&xmt_tx);
pool->aorg = xmt_tx;
HTONL_FP(&xmt_tx, &xpkt.xmt);
- sendpkt(rmtadr, lcladr, sys_ttl[pool->ttl], &xpkt,
- LEN_PKT_NOMAC);
+ sendpkt(rmtadr, lcladr,
+ sys_ttl[(pool->ttl >= sys_ttlmax) ? sys_ttlmax : pool->ttl],
+ &xpkt, LEN_PKT_NOMAC);
pool->sent++;
pool->throttle += (1 << pool->minpoll) - 2;
DPRINTF(1, ("pool_xmit: at %ld %s->%s pool\n",
@@ -4722,10 +4730,9 @@ init_proto(void)
sys_stattime = current_time;
orphwait = current_time + sys_orphwait;
proto_clr_stats();
- for (i = 0; i < MAX_TTL; i++) {
+ for (i = 0; i < MAX_TTL; ++i)
sys_ttl[i] = (u_char)((i * 256) / MAX_TTL);
- sys_ttlmax = i;
- }
+ sys_ttlmax = (MAX_TTL - 1);
hardpps_enable = 0;
stats_control = 1;
}
diff --git a/contrib/ntp/ntpd/ntp_restrict.c b/contrib/ntp/ntpd/ntp_restrict.c
index 0b5fa2e..ad6c82a 100644
--- a/contrib/ntp/ntpd/ntp_restrict.c
+++ b/contrib/ntp/ntpd/ntp_restrict.c
@@ -166,7 +166,7 @@ alloc_res4(void)
if (res != NULL)
return res;
- rl = emalloc_zero(count * cb);
+ rl = eallocarray(count, cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
for (i = count - 1; i > 0; i--) {
@@ -192,7 +192,7 @@ alloc_res6(void)
if (res != NULL)
return res;
- rl = emalloc_zero(count * cb);
+ rl = eallocarray(count, cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
for (i = count - 1; i > 0; i--) {
diff --git a/contrib/ntp/ntpd/ntp_scanner.c b/contrib/ntp/ntpd/ntp_scanner.c
index 631c218..6cfbeef 100644
--- a/contrib/ntp/ntpd/ntp_scanner.c
+++ b/contrib/ntp/ntpd/ntp_scanner.c
@@ -892,7 +892,6 @@ yylex(void)
}
}
- instring = FALSE;
if (FOLLBY_STRING == followedby)
followedby = FOLLBY_TOKEN;
diff --git a/contrib/ntp/ntpd/ntpd-opts.c b/contrib/ntp/ntpd/ntpd-opts.c
index 4983964..82ce754 100644
--- a/contrib/ntp/ntpd/ntpd-opts.c
+++ b/contrib/ntp/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed November 21, 2016 at 07:59:43 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed March 21, 2017 at 10:42:12 AM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -50,7 +50,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntpd_opt_strs+0)
-#define zLicenseDescrip (ntpd_opt_strs+340)
+#define zLicenseDescrip (ntpd_opt_strs+341)
/*
* global included definitions
@@ -74,15 +74,15 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpd options
*/
-static char const ntpd_opt_strs[3129] =
-/* 0 */ "ntpd 4.2.8p9\n"
- "Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+static char const ntpd_opt_strs[3132] =
+/* 0 */ "ntpd 4.2.8p10\n"
+ "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 340 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 341 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
@@ -92,136 +92,136 @@ static char const ntpd_opt_strs[3129] =
"Time Foundation makes no representations about the suitability this\n"
"software for any purpose. It is provided \"as is\" without express or\n"
"implied warranty.\n\0"
-/* 1008 */ "Force IPv4 DNS name resolution\0"
-/* 1039 */ "IPV4\0"
-/* 1044 */ "ipv4\0"
-/* 1049 */ "Force IPv6 DNS name resolution\0"
-/* 1080 */ "IPV6\0"
-/* 1085 */ "ipv6\0"
-/* 1090 */ "Require crypto authentication\0"
-/* 1120 */ "AUTHREQ\0"
-/* 1128 */ "authreq\0"
-/* 1136 */ "Do not require crypto authentication\0"
-/* 1173 */ "AUTHNOREQ\0"
-/* 1183 */ "authnoreq\0"
-/* 1193 */ "Allow us to sync to broadcast servers\0"
-/* 1231 */ "BCASTSYNC\0"
-/* 1241 */ "bcastsync\0"
-/* 1251 */ "configuration file name\0"
-/* 1275 */ "CONFIGFILE\0"
-/* 1286 */ "configfile\0"
-/* 1297 */ "Increase debug verbosity level\0"
-/* 1328 */ "DEBUG_LEVEL\0"
-/* 1340 */ "debug-level\0"
-/* 1352 */ "Set the debug verbosity level\0"
-/* 1382 */ "SET_DEBUG_LEVEL\0"
-/* 1398 */ "set-debug-level\0"
-/* 1414 */ "frequency drift file name\0"
-/* 1440 */ "DRIFTFILE\0"
-/* 1450 */ "driftfile\0"
-/* 1460 */ "Allow the first adjustment to be Big\0"
-/* 1497 */ "PANICGATE\0"
-/* 1507 */ "panicgate\0"
-/* 1517 */ "Step any initial offset correction.\0"
-/* 1553 */ "FORCE_STEP_ONCE\0"
-/* 1569 */ "force-step-once\0"
-/* 1585 */ "Jail directory\0"
-/* 1600 */ "JAILDIR\0"
-/* 1608 */ "jaildir\0"
-/* 1616 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
-/* 1695 */ "Listen on an interface name or address\0"
-/* 1734 */ "INTERFACE\0"
-/* 1744 */ "interface\0"
-/* 1754 */ "path to symmetric keys\0"
-/* 1777 */ "KEYFILE\0"
-/* 1785 */ "keyfile\0"
-/* 1793 */ "path to the log file\0"
-/* 1814 */ "LOGFILE\0"
-/* 1822 */ "logfile\0"
-/* 1830 */ "Do not listen to virtual interfaces\0"
-/* 1866 */ "NOVIRTUALIPS\0"
-/* 1879 */ "novirtualips\0"
-/* 1892 */ "Modify Multimedia Timer (Windows only)\0"
-/* 1931 */ "MODIFYMMTIMER\0"
-/* 1945 */ "modifymmtimer\0"
-/* 1959 */ "Do not fork\0"
-/* 1971 */ "NOFORK\0"
-/* 1978 */ "nofork\0"
-/* 1985 */ "Run at high priority\0"
-/* 2006 */ "NICE\0"
-/* 2011 */ "nice\0"
-/* 2016 */ "path to the PID file\0"
-/* 2037 */ "PIDFILE\0"
-/* 2045 */ "pidfile\0"
-/* 2053 */ "Process priority\0"
-/* 2070 */ "PRIORITY\0"
-/* 2079 */ "priority\0"
-/* 2088 */ "Set the time and quit\0"
-/* 2110 */ "QUIT\0"
-/* 2115 */ "quit\0"
-/* 2120 */ "Broadcast/propagation delay\0"
-/* 2148 */ "PROPAGATIONDELAY\0"
-/* 2165 */ "propagationdelay\0"
-/* 2182 */ "Save parsed configuration and quit\0"
-/* 2217 */ "SAVECONFIGQUIT\0"
-/* 2232 */ "saveconfigquit\0"
-/* 2247 */ "Statistics file location\0"
-/* 2272 */ "STATSDIR\0"
-/* 2281 */ "statsdir\0"
-/* 2290 */ "Trusted key number\0"
-/* 2309 */ "TRUSTEDKEY\0"
-/* 2320 */ "trustedkey\0"
-/* 2331 */ "Run as userid (or userid:groupid)\0"
-/* 2365 */ "USER\0"
-/* 2370 */ "user\0"
-/* 2375 */ "interval in seconds between scans for new or dropped interfaces\0"
-/* 2439 */ "UPDATEINTERVAL\0"
-/* 2454 */ "updateinterval\0"
-/* 2469 */ "make ARG an ntp variable (RW)\0"
-/* 2499 */ "VAR\0"
-/* 2503 */ "var\0"
-/* 2507 */ "make ARG an ntp variable (RW|DEF)\0"
-/* 2541 */ "DVAR\0"
-/* 2546 */ "dvar\0"
-/* 2551 */ "Seconds to wait for first clock sync\0"
-/* 2588 */ "WAIT_SYNC\0"
-/* 2598 */ "wait-sync\0"
-/* 2608 */ "Slew up to 600 seconds\0"
-/* 2631 */ "SLEW\0"
-/* 2636 */ "slew\0"
-/* 2641 */ "Use CPU cycle counter (Windows only)\0"
-/* 2678 */ "USEPCC\0"
-/* 2685 */ "usepcc\0"
-/* 2692 */ "Force CPU cycle counter use (Windows only)\0"
-/* 2735 */ "PCCFREQ\0"
-/* 2743 */ "pccfreq\0"
-/* 2751 */ "Register with mDNS as a NTP server\0"
-/* 2786 */ "MDNS\0"
-/* 2791 */ "mdns\0"
-/* 2796 */ "display extended usage information and exit\0"
-/* 2840 */ "help\0"
-/* 2845 */ "extended usage information passed thru pager\0"
-/* 2890 */ "more-help\0"
-/* 2900 */ "output version information and exit\0"
-/* 2936 */ "version\0"
-/* 2944 */ "NTPD\0"
-/* 2949 */ "ntpd - NTP daemon program - Ver. 4.2.8p9\n"
+/* 1009 */ "Force IPv4 DNS name resolution\0"
+/* 1040 */ "IPV4\0"
+/* 1045 */ "ipv4\0"
+/* 1050 */ "Force IPv6 DNS name resolution\0"
+/* 1081 */ "IPV6\0"
+/* 1086 */ "ipv6\0"
+/* 1091 */ "Require crypto authentication\0"
+/* 1121 */ "AUTHREQ\0"
+/* 1129 */ "authreq\0"
+/* 1137 */ "Do not require crypto authentication\0"
+/* 1174 */ "AUTHNOREQ\0"
+/* 1184 */ "authnoreq\0"
+/* 1194 */ "Allow us to sync to broadcast servers\0"
+/* 1232 */ "BCASTSYNC\0"
+/* 1242 */ "bcastsync\0"
+/* 1252 */ "configuration file name\0"
+/* 1276 */ "CONFIGFILE\0"
+/* 1287 */ "configfile\0"
+/* 1298 */ "Increase debug verbosity level\0"
+/* 1329 */ "DEBUG_LEVEL\0"
+/* 1341 */ "debug-level\0"
+/* 1353 */ "Set the debug verbosity level\0"
+/* 1383 */ "SET_DEBUG_LEVEL\0"
+/* 1399 */ "set-debug-level\0"
+/* 1415 */ "frequency drift file name\0"
+/* 1441 */ "DRIFTFILE\0"
+/* 1451 */ "driftfile\0"
+/* 1461 */ "Allow the first adjustment to be Big\0"
+/* 1498 */ "PANICGATE\0"
+/* 1508 */ "panicgate\0"
+/* 1518 */ "Step any initial offset correction.\0"
+/* 1554 */ "FORCE_STEP_ONCE\0"
+/* 1570 */ "force-step-once\0"
+/* 1586 */ "Jail directory\0"
+/* 1601 */ "JAILDIR\0"
+/* 1609 */ "jaildir\0"
+/* 1617 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
+/* 1696 */ "Listen on an interface name or address\0"
+/* 1735 */ "INTERFACE\0"
+/* 1745 */ "interface\0"
+/* 1755 */ "path to symmetric keys\0"
+/* 1778 */ "KEYFILE\0"
+/* 1786 */ "keyfile\0"
+/* 1794 */ "path to the log file\0"
+/* 1815 */ "LOGFILE\0"
+/* 1823 */ "logfile\0"
+/* 1831 */ "Do not listen to virtual interfaces\0"
+/* 1867 */ "NOVIRTUALIPS\0"
+/* 1880 */ "novirtualips\0"
+/* 1893 */ "Modify Multimedia Timer (Windows only)\0"
+/* 1932 */ "MODIFYMMTIMER\0"
+/* 1946 */ "modifymmtimer\0"
+/* 1960 */ "Do not fork\0"
+/* 1972 */ "NOFORK\0"
+/* 1979 */ "nofork\0"
+/* 1986 */ "Run at high priority\0"
+/* 2007 */ "NICE\0"
+/* 2012 */ "nice\0"
+/* 2017 */ "path to the PID file\0"
+/* 2038 */ "PIDFILE\0"
+/* 2046 */ "pidfile\0"
+/* 2054 */ "Process priority\0"
+/* 2071 */ "PRIORITY\0"
+/* 2080 */ "priority\0"
+/* 2089 */ "Set the time and quit\0"
+/* 2111 */ "QUIT\0"
+/* 2116 */ "quit\0"
+/* 2121 */ "Broadcast/propagation delay\0"
+/* 2149 */ "PROPAGATIONDELAY\0"
+/* 2166 */ "propagationdelay\0"
+/* 2183 */ "Save parsed configuration and quit\0"
+/* 2218 */ "SAVECONFIGQUIT\0"
+/* 2233 */ "saveconfigquit\0"
+/* 2248 */ "Statistics file location\0"
+/* 2273 */ "STATSDIR\0"
+/* 2282 */ "statsdir\0"
+/* 2291 */ "Trusted key number\0"
+/* 2310 */ "TRUSTEDKEY\0"
+/* 2321 */ "trustedkey\0"
+/* 2332 */ "Run as userid (or userid:groupid)\0"
+/* 2366 */ "USER\0"
+/* 2371 */ "user\0"
+/* 2376 */ "interval in seconds between scans for new or dropped interfaces\0"
+/* 2440 */ "UPDATEINTERVAL\0"
+/* 2455 */ "updateinterval\0"
+/* 2470 */ "make ARG an ntp variable (RW)\0"
+/* 2500 */ "VAR\0"
+/* 2504 */ "var\0"
+/* 2508 */ "make ARG an ntp variable (RW|DEF)\0"
+/* 2542 */ "DVAR\0"
+/* 2547 */ "dvar\0"
+/* 2552 */ "Seconds to wait for first clock sync\0"
+/* 2589 */ "WAIT_SYNC\0"
+/* 2599 */ "wait-sync\0"
+/* 2609 */ "Slew up to 600 seconds\0"
+/* 2632 */ "SLEW\0"
+/* 2637 */ "slew\0"
+/* 2642 */ "Use CPU cycle counter (Windows only)\0"
+/* 2679 */ "USEPCC\0"
+/* 2686 */ "usepcc\0"
+/* 2693 */ "Force CPU cycle counter use (Windows only)\0"
+/* 2736 */ "PCCFREQ\0"
+/* 2744 */ "pccfreq\0"
+/* 2752 */ "Register with mDNS as a NTP server\0"
+/* 2787 */ "MDNS\0"
+/* 2792 */ "mdns\0"
+/* 2797 */ "display extended usage information and exit\0"
+/* 2841 */ "help\0"
+/* 2846 */ "extended usage information passed thru pager\0"
+/* 2891 */ "more-help\0"
+/* 2901 */ "output version information and exit\0"
+/* 2937 */ "version\0"
+/* 2945 */ "NTPD\0"
+/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p10\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
-/* 3080 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 3114 */ "\n\0"
-/* 3116 */ "ntpd 4.2.8p9";
+/* 3082 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 3116 */ "\n\0"
+/* 3118 */ "ntpd 4.2.8p10";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpd_opt_strs+1008)
+#define IPV4_DESC (ntpd_opt_strs+1009)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpd_opt_strs+1039)
+#define IPV4_NAME (ntpd_opt_strs+1040)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpd_opt_strs+1044)
+#define IPV4_name (ntpd_opt_strs+1045)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -233,11 +233,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpd_opt_strs+1049)
+#define IPV6_DESC (ntpd_opt_strs+1050)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpd_opt_strs+1080)
+#define IPV6_NAME (ntpd_opt_strs+1081)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpd_opt_strs+1085)
+#define IPV6_name (ntpd_opt_strs+1086)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -249,11 +249,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authreq option */
-#define AUTHREQ_DESC (ntpd_opt_strs+1090)
+#define AUTHREQ_DESC (ntpd_opt_strs+1091)
/** Upper-cased name for the authreq option */
-#define AUTHREQ_NAME (ntpd_opt_strs+1120)
+#define AUTHREQ_NAME (ntpd_opt_strs+1121)
/** Name string for the authreq option */
-#define AUTHREQ_name (ntpd_opt_strs+1128)
+#define AUTHREQ_name (ntpd_opt_strs+1129)
/** Other options that appear in conjunction with the authreq option */
static int const aAuthreqCantList[] = {
INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
@@ -265,11 +265,11 @@ static int const aAuthreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authnoreq option */
-#define AUTHNOREQ_DESC (ntpd_opt_strs+1136)
+#define AUTHNOREQ_DESC (ntpd_opt_strs+1137)
/** Upper-cased name for the authnoreq option */
-#define AUTHNOREQ_NAME (ntpd_opt_strs+1173)
+#define AUTHNOREQ_NAME (ntpd_opt_strs+1174)
/** Name string for the authnoreq option */
-#define AUTHNOREQ_name (ntpd_opt_strs+1183)
+#define AUTHNOREQ_name (ntpd_opt_strs+1184)
/** Other options that appear in conjunction with the authnoreq option */
static int const aAuthnoreqCantList[] = {
INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
@@ -280,11 +280,11 @@ static int const aAuthnoreqCantList[] = {
* bcastsync option description:
*/
/** Descriptive text for the bcastsync option */
-#define BCASTSYNC_DESC (ntpd_opt_strs+1193)
+#define BCASTSYNC_DESC (ntpd_opt_strs+1194)
/** Upper-cased name for the bcastsync option */
-#define BCASTSYNC_NAME (ntpd_opt_strs+1231)
+#define BCASTSYNC_NAME (ntpd_opt_strs+1232)
/** Name string for the bcastsync option */
-#define BCASTSYNC_name (ntpd_opt_strs+1241)
+#define BCASTSYNC_name (ntpd_opt_strs+1242)
/** Compiled in flag settings for the bcastsync option */
#define BCASTSYNC_FLAGS (OPTST_DISABLED)
@@ -292,11 +292,11 @@ static int const aAuthnoreqCantList[] = {
* configfile option description:
*/
/** Descriptive text for the configfile option */
-#define CONFIGFILE_DESC (ntpd_opt_strs+1251)
+#define CONFIGFILE_DESC (ntpd_opt_strs+1252)
/** Upper-cased name for the configfile option */
-#define CONFIGFILE_NAME (ntpd_opt_strs+1275)
+#define CONFIGFILE_NAME (ntpd_opt_strs+1276)
/** Name string for the configfile option */
-#define CONFIGFILE_name (ntpd_opt_strs+1286)
+#define CONFIGFILE_name (ntpd_opt_strs+1287)
/** Compiled in flag settings for the configfile option */
#define CONFIGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -305,11 +305,11 @@ static int const aAuthnoreqCantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1297)
+#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1298)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1328)
+#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1329)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpd_opt_strs+1340)
+#define DEBUG_LEVEL_name (ntpd_opt_strs+1341)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -317,11 +317,11 @@ static int const aAuthnoreqCantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1352)
+#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1353)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1382)
+#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1383)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1398)
+#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1399)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -330,11 +330,11 @@ static int const aAuthnoreqCantList[] = {
* driftfile option description:
*/
/** Descriptive text for the driftfile option */
-#define DRIFTFILE_DESC (ntpd_opt_strs+1414)
+#define DRIFTFILE_DESC (ntpd_opt_strs+1415)
/** Upper-cased name for the driftfile option */
-#define DRIFTFILE_NAME (ntpd_opt_strs+1440)
+#define DRIFTFILE_NAME (ntpd_opt_strs+1441)
/** Name string for the driftfile option */
-#define DRIFTFILE_name (ntpd_opt_strs+1450)
+#define DRIFTFILE_name (ntpd_opt_strs+1451)
/** Compiled in flag settings for the driftfile option */
#define DRIFTFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -343,11 +343,11 @@ static int const aAuthnoreqCantList[] = {
* panicgate option description:
*/
/** Descriptive text for the panicgate option */
-#define PANICGATE_DESC (ntpd_opt_strs+1460)
+#define PANICGATE_DESC (ntpd_opt_strs+1461)
/** Upper-cased name for the panicgate option */
-#define PANICGATE_NAME (ntpd_opt_strs+1497)
+#define PANICGATE_NAME (ntpd_opt_strs+1498)
/** Name string for the panicgate option */
-#define PANICGATE_name (ntpd_opt_strs+1507)
+#define PANICGATE_name (ntpd_opt_strs+1508)
/** Compiled in flag settings for the panicgate option */
#define PANICGATE_FLAGS (OPTST_DISABLED)
@@ -355,11 +355,11 @@ static int const aAuthnoreqCantList[] = {
* force_step_once option description:
*/
/** Descriptive text for the force_step_once option */
-#define FORCE_STEP_ONCE_DESC (ntpd_opt_strs+1517)
+#define FORCE_STEP_ONCE_DESC (ntpd_opt_strs+1518)
/** Upper-cased name for the force_step_once option */
-#define FORCE_STEP_ONCE_NAME (ntpd_opt_strs+1553)
+#define FORCE_STEP_ONCE_NAME (ntpd_opt_strs+1554)
/** Name string for the force_step_once option */
-#define FORCE_STEP_ONCE_name (ntpd_opt_strs+1569)
+#define FORCE_STEP_ONCE_name (ntpd_opt_strs+1570)
/** Compiled in flag settings for the force_step_once option */
#define FORCE_STEP_ONCE_FLAGS (OPTST_DISABLED)
@@ -368,11 +368,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1585)
+#define JAILDIR_DESC (ntpd_opt_strs+1586)
/** Upper-cased name for the jaildir option */
-#define JAILDIR_NAME (ntpd_opt_strs+1600)
+#define JAILDIR_NAME (ntpd_opt_strs+1601)
/** Name string for the jaildir option */
-#define JAILDIR_name (ntpd_opt_strs+1608)
+#define JAILDIR_name (ntpd_opt_strs+1609)
/** Compiled in flag settings for the jaildir option */
#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -381,19 +381,19 @@ static int const aAuthnoreqCantList[] = {
#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define JAILDIR_NAME NULL
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1616)
-#define JAILDIR_name (ntpd_opt_strs+1608)
+#define JAILDIR_DESC (ntpd_opt_strs+1617)
+#define JAILDIR_name (ntpd_opt_strs+1609)
#endif /* HAVE_DROPROOT */
/**
* interface option description:
*/
/** Descriptive text for the interface option */
-#define INTERFACE_DESC (ntpd_opt_strs+1695)
+#define INTERFACE_DESC (ntpd_opt_strs+1696)
/** Upper-cased name for the interface option */
-#define INTERFACE_NAME (ntpd_opt_strs+1734)
+#define INTERFACE_NAME (ntpd_opt_strs+1735)
/** Name string for the interface option */
-#define INTERFACE_name (ntpd_opt_strs+1744)
+#define INTERFACE_name (ntpd_opt_strs+1745)
/** Compiled in flag settings for the interface option */
#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -402,11 +402,11 @@ static int const aAuthnoreqCantList[] = {
* keyfile option description:
*/
/** Descriptive text for the keyfile option */
-#define KEYFILE_DESC (ntpd_opt_strs+1754)
+#define KEYFILE_DESC (ntpd_opt_strs+1755)
/** Upper-cased name for the keyfile option */
-#define KEYFILE_NAME (ntpd_opt_strs+1777)
+#define KEYFILE_NAME (ntpd_opt_strs+1778)
/** Name string for the keyfile option */
-#define KEYFILE_name (ntpd_opt_strs+1785)
+#define KEYFILE_name (ntpd_opt_strs+1786)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -415,11 +415,11 @@ static int const aAuthnoreqCantList[] = {
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (ntpd_opt_strs+1793)
+#define LOGFILE_DESC (ntpd_opt_strs+1794)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (ntpd_opt_strs+1814)
+#define LOGFILE_NAME (ntpd_opt_strs+1815)
/** Name string for the logfile option */
-#define LOGFILE_name (ntpd_opt_strs+1822)
+#define LOGFILE_name (ntpd_opt_strs+1823)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -428,11 +428,11 @@ static int const aAuthnoreqCantList[] = {
* novirtualips option description:
*/
/** Descriptive text for the novirtualips option */
-#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1830)
+#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1831)
/** Upper-cased name for the novirtualips option */
-#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1866)
+#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1867)
/** Name string for the novirtualips option */
-#define NOVIRTUALIPS_name (ntpd_opt_strs+1879)
+#define NOVIRTUALIPS_name (ntpd_opt_strs+1880)
/** Compiled in flag settings for the novirtualips option */
#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
@@ -441,11 +441,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the modifymmtimer option */
-#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1892)
+#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1893)
/** Upper-cased name for the modifymmtimer option */
-#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1931)
+#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1932)
/** Name string for the modifymmtimer option */
-#define MODIFYMMTIMER_name (ntpd_opt_strs+1945)
+#define MODIFYMMTIMER_name (ntpd_opt_strs+1946)
/** Compiled in flag settings for the modifymmtimer option */
#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
@@ -461,11 +461,11 @@ static int const aAuthnoreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the nofork option */
-#define NOFORK_DESC (ntpd_opt_strs+1959)
+#define NOFORK_DESC (ntpd_opt_strs+1960)
/** Upper-cased name for the nofork option */
-#define NOFORK_NAME (ntpd_opt_strs+1971)
+#define NOFORK_NAME (ntpd_opt_strs+1972)
/** Name string for the nofork option */
-#define NOFORK_name (ntpd_opt_strs+1978)
+#define NOFORK_name (ntpd_opt_strs+1979)
/** Other options that appear in conjunction with the nofork option */
static int const aNoforkCantList[] = {
INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
@@ -476,11 +476,11 @@ static int const aNoforkCantList[] = {
* nice option description:
*/
/** Descriptive text for the nice option */
-#define NICE_DESC (ntpd_opt_strs+1985)
+#define NICE_DESC (ntpd_opt_strs+1986)
/** Upper-cased name for the nice option */
-#define NICE_NAME (ntpd_opt_strs+2006)
+#define NICE_NAME (ntpd_opt_strs+2007)
/** Name string for the nice option */
-#define NICE_name (ntpd_opt_strs+2011)
+#define NICE_name (ntpd_opt_strs+2012)
/** Compiled in flag settings for the nice option */
#define NICE_FLAGS (OPTST_DISABLED)
@@ -488,11 +488,11 @@ static int const aNoforkCantList[] = {
* pidfile option description:
*/
/** Descriptive text for the pidfile option */
-#define PIDFILE_DESC (ntpd_opt_strs+2016)
+#define PIDFILE_DESC (ntpd_opt_strs+2017)
/** Upper-cased name for the pidfile option */
-#define PIDFILE_NAME (ntpd_opt_strs+2037)
+#define PIDFILE_NAME (ntpd_opt_strs+2038)
/** Name string for the pidfile option */
-#define PIDFILE_name (ntpd_opt_strs+2045)
+#define PIDFILE_name (ntpd_opt_strs+2046)
/** Compiled in flag settings for the pidfile option */
#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -501,11 +501,11 @@ static int const aNoforkCantList[] = {
* priority option description:
*/
/** Descriptive text for the priority option */
-#define PRIORITY_DESC (ntpd_opt_strs+2053)
+#define PRIORITY_DESC (ntpd_opt_strs+2054)
/** Upper-cased name for the priority option */
-#define PRIORITY_NAME (ntpd_opt_strs+2070)
+#define PRIORITY_NAME (ntpd_opt_strs+2071)
/** Name string for the priority option */
-#define PRIORITY_name (ntpd_opt_strs+2079)
+#define PRIORITY_name (ntpd_opt_strs+2080)
/** Compiled in flag settings for the priority option */
#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -515,11 +515,11 @@ static int const aNoforkCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the quit option */
-#define QUIT_DESC (ntpd_opt_strs+2088)
+#define QUIT_DESC (ntpd_opt_strs+2089)
/** Upper-cased name for the quit option */
-#define QUIT_NAME (ntpd_opt_strs+2110)
+#define QUIT_NAME (ntpd_opt_strs+2111)
/** Name string for the quit option */
-#define QUIT_name (ntpd_opt_strs+2115)
+#define QUIT_name (ntpd_opt_strs+2116)
/** Other options that appear in conjunction with the quit option */
static int const aQuitCantList[] = {
INDEX_OPT_SAVECONFIGQUIT,
@@ -531,11 +531,11 @@ static int const aQuitCantList[] = {
* propagationdelay option description:
*/
/** Descriptive text for the propagationdelay option */
-#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2120)
+#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2121)
/** Upper-cased name for the propagationdelay option */
-#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2148)
+#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2149)
/** Name string for the propagationdelay option */
-#define PROPAGATIONDELAY_name (ntpd_opt_strs+2165)
+#define PROPAGATIONDELAY_name (ntpd_opt_strs+2166)
/** Compiled in flag settings for the propagationdelay option */
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -546,11 +546,11 @@ static int const aQuitCantList[] = {
*/
#ifdef SAVECONFIG
/** Descriptive text for the saveconfigquit option */
-#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2182)
+#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2183)
/** Upper-cased name for the saveconfigquit option */
-#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2217)
+#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2218)
/** Name string for the saveconfigquit option */
-#define SAVECONFIGQUIT_name (ntpd_opt_strs+2232)
+#define SAVECONFIGQUIT_name (ntpd_opt_strs+2233)
/** Other options that appear in conjunction with the saveconfigquit option */
static int const aSaveconfigquitCantList[] = {
INDEX_OPT_QUIT,
@@ -571,11 +571,11 @@ static int const aSaveconfigquitCantList[] = {
* statsdir option description:
*/
/** Descriptive text for the statsdir option */
-#define STATSDIR_DESC (ntpd_opt_strs+2247)
+#define STATSDIR_DESC (ntpd_opt_strs+2248)
/** Upper-cased name for the statsdir option */
-#define STATSDIR_NAME (ntpd_opt_strs+2272)
+#define STATSDIR_NAME (ntpd_opt_strs+2273)
/** Name string for the statsdir option */
-#define STATSDIR_name (ntpd_opt_strs+2281)
+#define STATSDIR_name (ntpd_opt_strs+2282)
/** Compiled in flag settings for the statsdir option */
#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -584,11 +584,11 @@ static int const aSaveconfigquitCantList[] = {
* trustedkey option description:
*/
/** Descriptive text for the trustedkey option */
-#define TRUSTEDKEY_DESC (ntpd_opt_strs+2290)
+#define TRUSTEDKEY_DESC (ntpd_opt_strs+2291)
/** Upper-cased name for the trustedkey option */
-#define TRUSTEDKEY_NAME (ntpd_opt_strs+2309)
+#define TRUSTEDKEY_NAME (ntpd_opt_strs+2310)
/** Name string for the trustedkey option */
-#define TRUSTEDKEY_name (ntpd_opt_strs+2320)
+#define TRUSTEDKEY_name (ntpd_opt_strs+2321)
/** Compiled in flag settings for the trustedkey option */
#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -598,11 +598,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+2331)
+#define USER_DESC (ntpd_opt_strs+2332)
/** Upper-cased name for the user option */
-#define USER_NAME (ntpd_opt_strs+2365)
+#define USER_NAME (ntpd_opt_strs+2366)
/** Name string for the user option */
-#define USER_name (ntpd_opt_strs+2370)
+#define USER_name (ntpd_opt_strs+2371)
/** Compiled in flag settings for the user option */
#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -611,19 +611,19 @@ static int const aSaveconfigquitCantList[] = {
#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define USER_NAME NULL
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+1616)
-#define USER_name (ntpd_opt_strs+2370)
+#define USER_DESC (ntpd_opt_strs+1617)
+#define USER_name (ntpd_opt_strs+2371)
#endif /* HAVE_DROPROOT */
/**
* updateinterval option description:
*/
/** Descriptive text for the updateinterval option */
-#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2375)
+#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2376)
/** Upper-cased name for the updateinterval option */
-#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2439)
+#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2440)
/** Name string for the updateinterval option */
-#define UPDATEINTERVAL_name (ntpd_opt_strs+2454)
+#define UPDATEINTERVAL_name (ntpd_opt_strs+2455)
/** Compiled in flag settings for the updateinterval option */
#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -632,11 +632,11 @@ static int const aSaveconfigquitCantList[] = {
* var option description:
*/
/** Descriptive text for the var option */
-#define VAR_DESC (ntpd_opt_strs+2469)
+#define VAR_DESC (ntpd_opt_strs+2470)
/** Upper-cased name for the var option */
-#define VAR_NAME (ntpd_opt_strs+2499)
+#define VAR_NAME (ntpd_opt_strs+2500)
/** Name string for the var option */
-#define VAR_name (ntpd_opt_strs+2503)
+#define VAR_name (ntpd_opt_strs+2504)
/** Compiled in flag settings for the var option */
#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -645,11 +645,11 @@ static int const aSaveconfigquitCantList[] = {
* dvar option description:
*/
/** Descriptive text for the dvar option */
-#define DVAR_DESC (ntpd_opt_strs+2507)
+#define DVAR_DESC (ntpd_opt_strs+2508)
/** Upper-cased name for the dvar option */
-#define DVAR_NAME (ntpd_opt_strs+2541)
+#define DVAR_NAME (ntpd_opt_strs+2542)
/** Name string for the dvar option */
-#define DVAR_name (ntpd_opt_strs+2546)
+#define DVAR_name (ntpd_opt_strs+2547)
/** Compiled in flag settings for the dvar option */
#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -660,11 +660,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_WORKING_FORK
/** Descriptive text for the wait-sync option */
-#define WAIT_SYNC_DESC (ntpd_opt_strs+2551)
+#define WAIT_SYNC_DESC (ntpd_opt_strs+2552)
/** Upper-cased name for the wait-sync option */
-#define WAIT_SYNC_NAME (ntpd_opt_strs+2588)
+#define WAIT_SYNC_NAME (ntpd_opt_strs+2589)
/** Name string for the wait-sync option */
-#define WAIT_SYNC_name (ntpd_opt_strs+2598)
+#define WAIT_SYNC_name (ntpd_opt_strs+2599)
/** Other options that appear in conjunction with the wait-sync option */
static int const aWait_SyncCantList[] = {
INDEX_OPT_NOFORK,
@@ -686,11 +686,11 @@ static int const aWait_SyncCantList[] = {
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (ntpd_opt_strs+2608)
+#define SLEW_DESC (ntpd_opt_strs+2609)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (ntpd_opt_strs+2631)
+#define SLEW_NAME (ntpd_opt_strs+2632)
/** Name string for the slew option */
-#define SLEW_name (ntpd_opt_strs+2636)
+#define SLEW_name (ntpd_opt_strs+2637)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
@@ -699,11 +699,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the usepcc option */
-#define USEPCC_DESC (ntpd_opt_strs+2641)
+#define USEPCC_DESC (ntpd_opt_strs+2642)
/** Upper-cased name for the usepcc option */
-#define USEPCC_NAME (ntpd_opt_strs+2678)
+#define USEPCC_NAME (ntpd_opt_strs+2679)
/** Name string for the usepcc option */
-#define USEPCC_name (ntpd_opt_strs+2685)
+#define USEPCC_name (ntpd_opt_strs+2686)
/** Compiled in flag settings for the usepcc option */
#define USEPCC_FLAGS (OPTST_DISABLED)
@@ -719,11 +719,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the pccfreq option */
-#define PCCFREQ_DESC (ntpd_opt_strs+2692)
+#define PCCFREQ_DESC (ntpd_opt_strs+2693)
/** Upper-cased name for the pccfreq option */
-#define PCCFREQ_NAME (ntpd_opt_strs+2735)
+#define PCCFREQ_NAME (ntpd_opt_strs+2736)
/** Name string for the pccfreq option */
-#define PCCFREQ_name (ntpd_opt_strs+2743)
+#define PCCFREQ_name (ntpd_opt_strs+2744)
/** Compiled in flag settings for the pccfreq option */
#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -740,11 +740,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef HAVE_DNSREGISTRATION
/** Descriptive text for the mdns option */
-#define MDNS_DESC (ntpd_opt_strs+2751)
+#define MDNS_DESC (ntpd_opt_strs+2752)
/** Upper-cased name for the mdns option */
-#define MDNS_NAME (ntpd_opt_strs+2786)
+#define MDNS_NAME (ntpd_opt_strs+2787)
/** Name string for the mdns option */
-#define MDNS_name (ntpd_opt_strs+2791)
+#define MDNS_name (ntpd_opt_strs+2792)
/** Compiled in flag settings for the mdns option */
#define MDNS_FLAGS (OPTST_DISABLED)
@@ -758,11 +758,11 @@ static int const aWait_SyncCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpd_opt_strs+2796)
-#define HELP_name (ntpd_opt_strs+2840)
+#define HELP_DESC (ntpd_opt_strs+2797)
+#define HELP_name (ntpd_opt_strs+2841)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpd_opt_strs+2845)
-#define MORE_HELP_name (ntpd_opt_strs+2890)
+#define MORE_HELP_DESC (ntpd_opt_strs+2846)
+#define MORE_HELP_name (ntpd_opt_strs+2891)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -775,8 +775,8 @@ static int const aWait_SyncCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpd_opt_strs+2900)
-#define VER_name (ntpd_opt_strs+2936)
+#define VER_DESC (ntpd_opt_strs+2901)
+#define VER_name (ntpd_opt_strs+2937)
/**
* Declare option callback procedures
*/
@@ -1258,21 +1258,21 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpd. */
-#define zPROGNAME (ntpd_opt_strs+2944)
+#define zPROGNAME (ntpd_opt_strs+2945)
/** Reference to the title line for ntpd usage. */
-#define zUsageTitle (ntpd_opt_strs+2949)
+#define zUsageTitle (ntpd_opt_strs+2950)
/** There is no ntpd configuration file. */
#define zRcName NULL
/** There are no directories to search for ntpd config files. */
#define apzHomeList NULL
/** The ntpd program bug email address. */
-#define zBugsAddr (ntpd_opt_strs+3080)
+#define zBugsAddr (ntpd_opt_strs+3082)
/** Clarification/explanation of what ntpd does. */
-#define zExplain (ntpd_opt_strs+3114)
+#define zExplain (ntpd_opt_strs+3116)
/** Extra detail explaining what ntpd does. */
#define zDetail (NULL)
/** The full version string for ntpd. */
-#define zFullVersion (ntpd_opt_strs+3116)
+#define zFullVersion (ntpd_opt_strs+3118)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -1529,8 +1529,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8p9\n\
-Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpd 4.2.8p10\n\
+Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1670,7 +1670,7 @@ implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.2.8p9\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p10\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1678,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.8p9"));
+ puts(_("ntpd 4.2.8p10"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpd/ntpd-opts.h b/contrib/ntp/ntpd/ntpd-opts.h
index e5bdf82..a511857 100644
--- a/contrib/ntp/ntpd/ntpd-opts.h
+++ b/contrib/ntp/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed November 21, 2016 at 07:59:42 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed March 21, 2017 at 10:42:11 AM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -106,9 +106,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.8p9"
+#define NTPD_VERSION "4.2.8p10"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8p9"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p10"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdman b/contrib/ntp/ntpd/ntpd.1ntpdman
index f24d92e..a977bf0 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdman
+++ b/contrib/ntp/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "21 Nov 2016" "4.2.8p9" "User Commands"
+.TH ntpd 1ntpdman "21 Mar 2017" "4.2.8p10" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-giaGkh/ag-tiayjh)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wcairs/ag-fdaWls)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:01:50 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:13 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -979,7 +979,7 @@ RFC5908
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdmdoc b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
index 80a70bc..34ec086 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdmdoc
+++ b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd November 21 2016
+.Dd March 21 2017
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:02:08 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:23 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
index 9c6f947..a0880be 100644
--- a/contrib/ntp/ntpd/ntpd.c
+++ b/contrib/ntp/ntpd/ntpd.c
@@ -230,8 +230,10 @@ static RETSIGTYPE no_debug (int);
# endif /* !DEBUG */
#endif /* !SIM && !SYS_WINNT */
+#ifndef WORK_FORK
int saved_argc;
char ** saved_argv;
+#endif
#ifndef SIM
int ntpdmain (int, char **);
diff --git a/contrib/ntp/ntpd/ntpd.html b/contrib/ntp/ntpd/ntpd.html
index e5350a9..e6aadd4 100644
--- a/contrib/ntp/ntpd/ntpd.html
+++ b/contrib/ntp/ntpd/ntpd.html
@@ -39,7 +39,7 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
- <p>This document applies to version 4.2.8p9 of <code>ntpd</code>.
+ <p>This document applies to version 4.2.8p10 of <code>ntpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
@@ -220,7 +220,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p9-RC
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p10-beta
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
diff --git a/contrib/ntp/ntpd/ntpd.man.in b/contrib/ntp/ntpd/ntpd.man.in
index d5e331f..c4a9200 100644
--- a/contrib/ntp/ntpd/ntpd.man.in
+++ b/contrib/ntp/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "21 Nov 2016" "4.2.8p9" "User Commands"
+.TH ntpd @NTPD_MS@ "21 Mar 2017" "4.2.8p10" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-giaGkh/ag-tiayjh)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wcairs/ag-fdaWls)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:01:50 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:13 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -979,7 +979,7 @@ RFC5908
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/contrib/ntp/ntpd/ntpd.mdoc.in b/contrib/ntp/ntpd/ntpd.mdoc.in
index 76577f6..52fcef0 100644
--- a/contrib/ntp/ntpd/ntpd.mdoc.in
+++ b/contrib/ntp/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd November 21 2016
+.Dd March 21 2017
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed November 21, 2016 at 08:02:08 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed March 21, 2017 at 10:44:23 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/contrib/ntp/ntpd/refclock_datum.c b/contrib/ntp/ntpd/refclock_datum.c
index 95f13a8..9795cfa 100644
--- a/contrib/ntp/ntpd/refclock_datum.c
+++ b/contrib/ntp/ntpd/refclock_datum.c
@@ -485,7 +485,7 @@ datum_pts_receive(
struct recvbuf *rbufp
)
{
- int i;
+ int i, nb;
l_fp tstmp;
struct peer *p;
struct datum_pts_unit *datum_pts;
@@ -526,22 +526,23 @@ datum_pts_receive(
** received to reduce the jitter.
*/
- if (datum_pts->nbytes == 0) {
+ nb = datum_pts->nbytes;
+ if (nb == 0) {
datum_pts->lastrec = rbufp->recv_time;
}
/*
** Increment our count to the number of bytes received so far. Return if we
** haven't gotten all seven bytes yet.
+ ** [Sec 3388] make sure we do not overrun the buffer.
+ ** TODO: what to do with excessive bytes, if we ever get them?
*/
-
- for (i=0; i<dpend; i++) {
- datum_pts->retbuf[datum_pts->nbytes+i] = dpt[i];
+ for (i=0; (i < dpend) && (nb < sizeof(datum_pts->retbuf)); i++, nb++) {
+ datum_pts->retbuf[nb] = dpt[i];
}
-
- datum_pts->nbytes += dpend;
-
- if (datum_pts->nbytes != 7) {
+ datum_pts->nbytes = nb;
+
+ if (nb < 7) {
return;
}
diff --git a/contrib/ntp/ntpd/refclock_gpsdjson.c b/contrib/ntp/ntpd/refclock_gpsdjson.c
index 7c49311..00cd3fc 100644
--- a/contrib/ntp/ntpd/refclock_gpsdjson.c
+++ b/contrib/ntp/ntpd/refclock_gpsdjson.c
@@ -2112,13 +2112,15 @@ save_ltc(
clockprocT * const pp,
const char * const tc)
{
- size_t len;
-
- len = (tc) ? strlen(tc) : 0;
- if (len >= sizeof(pp->a_lastcode))
- len = sizeof(pp->a_lastcode) - 1;
+ size_t len = 0;
+
+ if (tc) {
+ len = strlen(tc);
+ if (len >= sizeof(pp->a_lastcode))
+ len = sizeof(pp->a_lastcode) - 1;
+ memcpy(pp->a_lastcode, tc, len);
+ }
pp->lencode = (u_short)len;
- memcpy(pp->a_lastcode, tc, len);
pp->a_lastcode[len] = '\0';
}
diff --git a/contrib/ntp/ntpd/refclock_jjy.c b/contrib/ntp/ntpd/refclock_jjy.c
index f53150f..22636a0 100644
--- a/contrib/ntp/ntpd/refclock_jjy.c
+++ b/contrib/ntp/ntpd/refclock_jjy.c
@@ -592,7 +592,7 @@ jjy_receive ( struct recvbuf *rbufp )
l_fp tRecvTimestamp; /* arrival timestamp */
int rc ;
char *pBuf, sLogText [ MAX_LOGTEXT ] ;
- int iLen, iCopyLen ;
+ size_t iLen, iCopyLen ;
int i, j, iReadRawBuf, iBreakPosition ;
/*
@@ -744,8 +744,8 @@ jjy_receive ( struct recvbuf *rbufp )
}
iCopyLen = ( iLen <= sizeof(sLogText)-1 ? iLen : sizeof(sLogText)-1 ) ;
- strncpy( sLogText, pBuf, iCopyLen ) ;
- sLogText[iCopyLen] = 0 ;
+ memcpy( sLogText, pBuf, iCopyLen ) ;
+ sLogText[iCopyLen] = '\0' ;
jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_RECEIVE, sLogText ) ;
switch ( up->unittype ) {
@@ -2688,8 +2688,9 @@ jjy_start_telephone ( int unit, struct peer *peer, struct jjyunit *up )
{
char sLog [ 80 ], sFirstThreeDigits [ 4 ] ;
- int i, iNumberOfDigitsOfPhoneNumber, iCommaCount, iCommaPosition ;
- int iFirstThreeDigitsCount ;
+ int iNumberOfDigitsOfPhoneNumber, iCommaCount, iCommaPosition ;
+ size_t i ;
+ size_t iFirstThreeDigitsCount ;
jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: Telephone JJY" ) ;
@@ -3823,7 +3824,7 @@ modem_receive ( struct recvbuf *rbufp )
struct jjyunit *up;
struct refclockproc *pp;
char *pBuf ;
- int iLen ;
+ size_t iLen ;
#ifdef DEBUG
static const char *sFunctionName = "modem_receive" ;
@@ -3857,11 +3858,11 @@ modem_receive ( struct recvbuf *rbufp )
#ifdef DEBUG
if ( debug ) {
char sResp [ 40 ] ;
- int iCopyLen ;
+ size_t iCopyLen ;
iCopyLen = ( iLen <= sizeof(sResp)-1 ? iLen : sizeof(sResp)-1 ) ;
strncpy( sResp, pBuf, iLen <= sizeof(sResp)-1 ? iLen : sizeof(sResp)-1 ) ;
sResp[iCopyLen] = 0 ;
- printf ( "refclock_jjy.c : modem_receive : iLen=%d pBuf=[%s] iModemEvent=%d\n", iCopyLen, sResp, up->iModemEvent ) ;
+ printf ( "refclock_jjy.c : modem_receive : iLen=%zu pBuf=[%s] iModemEvent=%d\n", iCopyLen, sResp, up->iModemEvent ) ;
}
#endif
modem_control ( peer, pp, up ) ;
diff --git a/contrib/ntp/ntpd/refclock_mx4200.c b/contrib/ntp/ntpd/refclock_mx4200.c
index c942229..6969e6a 100644
--- a/contrib/ntp/ntpd/refclock_mx4200.c
+++ b/contrib/ntp/ntpd/refclock_mx4200.c
@@ -1596,34 +1596,42 @@ mx4200_send(peer, fmt, va_alist)
struct refclockproc *pp;
struct mx4200unit *up;
- register char *cp;
+ register char *cp, *ep;
register int n, m;
va_list ap;
char buf[1024];
u_char ck;
+ pp = peer->procptr;
+ up = pp->unitptr;
+
+ cp = buf;
+ ep = cp + sizeof(buf);
+ *cp++ = '$';
+
#if defined(__STDC__)
va_start(ap, fmt);
#else
va_start(ap);
#endif /* __STDC__ */
+ n = VSNPRINTF((cp, (size_t)(ep - cp), fmt, ap));
+ va_end(ap);
+ if (n < 0 || (size_t)n >= (size_t)(ep - cp))
+ goto overflow;
- pp = peer->procptr;
- up = pp->unitptr;
-
- cp = buf;
- *cp++ = '$';
- n = VSNPRINTF((cp, sizeof(buf) - 1, fmt, ap));
ck = mx4200_cksum(cp, n);
+ cp += n;
+ n = SNPRINTF((cp, (size_t)(ep - cp), "*%02X\r\n", ck));
+ if (n < 0 || (size_t)n >= (size_t)(ep - cp))
+ goto overflow;
cp += n;
- ++n;
- n += SNPRINTF((cp, sizeof(buf) - n - 5, "*%02X\r\n", ck));
-
- m = write(pp->io.fd, buf, (unsigned)n);
+ m = write(pp->io.fd, buf, (unsigned)(cp - buf));
if (m < 0)
msyslog(LOG_ERR, "mx4200_send: write: %m (%s)", buf);
mx4200_debug(peer, "mx4200_send: %d %s\n", m, buf);
- va_end(ap);
+
+ overflow:
+ msyslog(LOG_ERR, "mx4200_send: %s", "data exceeds buffer size");
}
#else
diff --git a/contrib/ntp/ntpd/refclock_nmea.c b/contrib/ntp/ntpd/refclock_nmea.c
index b1ea294..19bdeeb 100644
--- a/contrib/ntp/ntpd/refclock_nmea.c
+++ b/contrib/ntp/ntpd/refclock_nmea.c
@@ -810,9 +810,6 @@ nmea_receive(
ZERO(tofs);
ZERO(date);
ZERO(gpsw);
- sentence = 0; // Should never be needed.
- rc_date = 0; // Should never be needed.
- rc_time = 0; // Should never be needed.
/*
* Read the timecode and timestamp, then initialise field
diff --git a/contrib/ntp/ntpd/refclock_oncore.c b/contrib/ntp/ntpd/refclock_oncore.c
index 30924b8..2c82cae 100644
--- a/contrib/ntp/ntpd/refclock_oncore.c
+++ b/contrib/ntp/ntpd/refclock_oncore.c
@@ -1461,7 +1461,7 @@ oncore_receive(
#endif
i = rbufp->recv_length;
- if (rcvbuf+rcvptr+i > &rcvbuf[sizeof rcvbuf])
+ if ((size_t)rcvptr + i >= sizeof(rcvbuf))
i = sizeof(rcvbuf) - rcvptr; /* and some char will be lost */
memcpy(rcvbuf+rcvptr, p, i);
rcvptr += i;
@@ -2514,8 +2514,6 @@ oncore_msg_Bl(
WARN_MINUS
} warn;
- day_now = day_lsf = 0;
- cp = NULL; /* keep gcc happy */
subframe = buf[6] & 017;
valid = (buf[6] >> 4) & 017;
@@ -2590,6 +2588,9 @@ oncore_msg_Bl(
instance->peer->leap = LEAP_ADDSECOND;
cp = "Set peer.leap to LEAP_ADDSECOND";
break;
+ default:
+ cp = NULL;
+ break;
}
oncore_log(instance, LOG_NOTICE, cp);
@@ -3379,7 +3380,6 @@ oncore_check_antenna(
{
enum antenna_state antenna; /* antenna state */
- antenna = instance->ant_state;
if (instance->chan == 12)
antenna = (instance->BEHa[130] & 0x6 ) >> 1;
else
diff --git a/contrib/ntp/ntpd/refclock_parse.c b/contrib/ntp/ntpd/refclock_parse.c
index aa9d2f2..cf81e40 100644
--- a/contrib/ntp/ntpd/refclock_parse.c
+++ b/contrib/ntp/ntpd/refclock_parse.c
@@ -3675,8 +3675,7 @@ parse_control(
}
}
- tt = ap(start, LEN_STATES, tt,
- "; running time: %s\"", l_mktime(sum));
+ ap(start, LEN_STATES, tt, "; running time: %s\"", l_mktime(sum));
tt = add_var(&out->kv_list, 32, RO);
snprintf(tt, 32, "refclock_id=\"%s\"", parse->parse_type->cl_id);
@@ -4226,13 +4225,13 @@ parse_process(
static void
mk_utcinfo(
- char *t, // pointer to the output string buffer
- int wnt,
- int wnlsf,
+ char *t, /* pointer to the output string buffer */
+ uint16_t wnt,
+ uint16_t wnlsf,
int dn,
int dtls,
int dtlsf,
- int size // size of the output string buffer
+ int size /* size of the output string buffer */
)
{
/*
@@ -4248,32 +4247,37 @@ mk_utcinfo(
{
time_t t_ls;
struct tm *tm;
- int n = 0;
+ int nc;
if (wnlsf < GPSWRAP)
wnlsf += GPSWEEKS;
-
- if (wnt < GPSWRAP)
- wnt += GPSWEEKS;
+ /* 'wnt' not used here: would need the same treatment as 'wnlsf */
t_ls = (time_t) wnlsf * SECSPERWEEK
+ (time_t) dn * SECSPERDAY
+ GPS_SEC_BIAS - 1;
tm = gmtime( &t_ls );
- if (tm == NULL) // gmtime() failed
+ if (tm == NULL) /* gmtime() failed */
{
snprintf( t, size, "** (gmtime() failed in mk_utcinfo())" );
return;
}
- n += snprintf( t, size, "UTC offset transition from %is to %is due to leap second %s",
+ nc = snprintf( t, size, "UTC offset transition from %is to %is due to leap second %s",
dtls, dtlsf, ( dtls < dtlsf ) ? "insertion" : "deletion" );
- n += snprintf( t + n, size - n, " at UTC midnight at the end of %s, %04i-%02i-%02i",
+ if (nc < 0)
+ nc = strlen(t);
+ else if (nc > size)
+ nc = size;
+
+ snprintf( t + nc, size - nc, " at UTC midnight at the end of %s, %04i-%02i-%02i",
daynames[tm->tm_wday], tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday );
}
else
+ {
snprintf( t, size, "UTC offset parameter: %is, no leap second announced.\n", dtls );
+ }
}
OpenPOWER on IntegriCloud