summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd
diff options
context:
space:
mode:
authorgordon <gordon@FreeBSD.org>2019-05-14 23:06:26 +0000
committergordon <gordon@FreeBSD.org>2019-05-14 23:06:26 +0000
commitd196ca685378f9d29b6f523ca725f9ae8c660139 (patch)
tree665ed8040a51958458a523a3ce085a076d4101da /contrib/ntp/ntpd
parentc51de0e18513f3dc43d8d73d3f29ad2a77cbe4e7 (diff)
downloadFreeBSD-src-d196ca685378f9d29b6f523ca725f9ae8c660139.zip
FreeBSD-src-d196ca685378f9d29b6f523ca725f9ae8c660139.tar.gz
Update ntpd to 4.2.8p13 to fix authenticated denial of service.
Approved by: so Security: FreeBSD-SA-19:04.ntp Security: CVE-2019-8936
Diffstat (limited to 'contrib/ntp/ntpd')
-rw-r--r--contrib/ntp/ntpd/Makefile.in4
-rw-r--r--contrib/ntp/ntpd/complete.conf.in2
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.conf.texi12
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.keys.texi6
-rw-r--r--contrib/ntp/ntpd/invoke-ntpd.texi8
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5man16
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5mdoc14
-rw-r--r--contrib/ntp/ntpd/ntp.conf.def10
-rw-r--r--contrib/ntp/ntpd/ntp.conf.html2952
-rw-r--r--contrib/ntp/ntpd/ntp.conf.man.in16
-rw-r--r--contrib/ntp/ntpd/ntp.conf.mdoc.in14
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5man8
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5mdoc10
-rw-r--r--contrib/ntp/ntpd/ntp.keys.def4
-rw-r--r--contrib/ntp/ntpd/ntp.keys.html287
-rw-r--r--contrib/ntp/ntpd/ntp.keys.man.in8
-rw-r--r--contrib/ntp/ntpd/ntp.keys.mdoc.in10
-rw-r--r--contrib/ntp/ntpd/ntp_config.c62
-rw-r--r--contrib/ntp/ntpd/ntp_control.c139
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c7
-rw-r--r--contrib/ntp/ntpd/ntp_io.c55
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c44
-rw-r--r--contrib/ntp/ntpd/ntp_parser.c677
-rw-r--r--contrib/ntp/ntpd/ntp_parser.h2
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c153
-rw-r--r--contrib/ntp/ntpd/ntp_refclock.c2
-rw-r--r--contrib/ntp/ntpd/ntp_request.c9
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c8
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.c16
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.h10
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdman6
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdmdoc4
-rw-r--r--contrib/ntp/ntpd/ntpd.c395
-rw-r--r--contrib/ntp/ntpd/ntpd.html1511
-rw-r--r--contrib/ntp/ntpd/ntpd.man.in6
-rw-r--r--contrib/ntp/ntpd/ntpd.mdoc.in4
-rw-r--r--contrib/ntp/ntpd/rc_cmdlength.c2
-rw-r--r--contrib/ntp/ntpd/refclock_bancomm.c119
-rw-r--r--contrib/ntp/ntpd/refclock_datum.c3
-rw-r--r--contrib/ntp/ntpd/refclock_gpsdjson.c4
-rw-r--r--contrib/ntp/ntpd/refclock_jupiter.c60
-rw-r--r--contrib/ntp/ntpd/refclock_parse.c3
-rw-r--r--contrib/ntp/ntpd/refclock_shm.c1
-rw-r--r--contrib/ntp/ntpd/refclock_true.c2
44 files changed, 3741 insertions, 2944 deletions
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index fc9bc78..8eab4f9 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/contrib/ntp/ntpd/complete.conf.in b/contrib/ntp/ntpd/complete.conf.in
index 2747098..66fcbaa 100644
--- a/contrib/ntp/ntpd/complete.conf.in
+++ b/contrib/ntp/ntpd/complete.conf.in
@@ -21,7 +21,7 @@ crypto digest md5 host myhostname ident wedent pw cryptopass randfile /.rnd
revoke 10
keysdir "/etc/ntp/keys"
keys "/etc/ntp.keys"
-trustedkey 1 2 3 4 5 6 7 8 9 10 11 12 (14 ... 16) 18 (32768 ... 65534)
+trustedkey 1 2 3 4 5 6 7 8 9 10 11 12 (14 ... 16) 18 (32768 ... 65535)
controlkey 12
requestkey 12
enable auth ntp monitor stats
diff --git a/contrib/ntp/ntpd/invoke-ntp.conf.texi b/contrib/ntp/ntpd/invoke-ntp.conf.texi
index 7e8a4dc..132709e 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 February 27, 2018 at 05:14:34 PM by AutoGen 5.18.5
+# It has been AutoGen-ed February 20, 2019 at 09:56:39 AM by AutoGen 5.18.5
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -284,7 +284,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
@kbd{key}
-identifier with values from 1 to 65534, inclusive.
+identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
@item @code{minpoll} @kbd{minpoll}
@@ -543,7 +543,7 @@ and reports at the NTP project page linked from
@code{http://www.ntp.org/}.
@subsubsection Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32-bit key identifier, to
+65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -827,7 +827,7 @@ The
@kbd{key}
argument is
the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
+range 1 to 65,535, inclusive.
@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{sign} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]}
This command requires the OpenSSL library.
It activates public key
@@ -920,7 +920,7 @@ The
@kbd{key}
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
+65,535, inclusive.
@item @code{revoke} @kbd{logsec}
Specifies the interval between re-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -947,7 +947,7 @@ servers.
The
@kbd{key}
arguments are 32-bit unsigned
-integers with values from 1 to 65,534.
+integers with values from 1 to 65,535.
@end table
@subsubsection Error Codes
The following error codes are reported via the NTP control
diff --git a/contrib/ntp/ntpd/invoke-ntp.keys.texi b/contrib/ntp/ntpd/invoke-ntp.keys.texi
index d729fc0..9698c54 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 February 27, 2018 at 05:14:37 PM by AutoGen 5.18.5
+# It has been AutoGen-ed February 20, 2019 at 09:56:41 AM by AutoGen 5.18.5
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
@@ -29,7 +29,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
-one or more keys numbered between 1 and 65534
+one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
The key file uses the same comment conventions
@@ -42,7 +42,7 @@ Key entries use a fixed format of the form
where
@kbd{keyno}
-is a positive integer (between 1 and 65534),
+is a positive integer (between 1 and 65535),
@kbd{type}
is the message digest algorithm,
@kbd{key}
diff --git a/contrib/ntp/ntpd/invoke-ntpd.texi b/contrib/ntp/ntpd/invoke-ntpd.texi
index 28f132d..16dce21 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 February 27, 2018 at 05:14:39 PM by AutoGen 5.18.5
+# It has been AutoGen-ed February 20, 2019 at 09:56:42 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.8p11
+ntpd - NTP daemon program - Ver. 4.2.8p13
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
@@ -164,7 +164,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
-G no force-step-once Step any initial offset correction.
- -i Str jaildir Jail directory
+ -i --- jaildir built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
-I Str interface Listen on an interface name or address
- may appear multiple times
-k Str keyfile path to symmetric keys
@@ -187,7 +187,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-s Str statsdir Statistics file location
-t Str trustedkey Trusted key number
- may appear multiple times
- -u Str user Run as userid (or userid:groupid)
+ -u --- user built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
-U Num updateinterval interval in seconds between scans for new or dropped interfaces
Str var make ARG an ntp variable (RW)
- may appear multiple times
diff --git a/contrib/ntp/ntpd/ntp.conf.5man b/contrib/ntp/ntpd/ntp.conf.5man
index 1a50633..50ae14f 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 "27 Feb 2018" "4.2.8p11" "File Formats"
+.TH ntp.conf 5man "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LkaqTP/ag-XkaiSP)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:22 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:43 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -326,7 +326,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
\f\*[I-Font]key\f[]
-identifier with values from 1 to 65534, inclusive.
+identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.TP 7
@@ -611,7 +611,7 @@ and reports at the NTP project page linked from
\f[C]http://www.ntp.org/\f[].
.SS Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32-bit key identifier, to
+65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -932,7 +932,7 @@ The
\f\*[I-Font]key\f[]
argument is
the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
+range 1 to 65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
This command requires the OpenSSL library.
@@ -1038,7 +1038,7 @@ The
\f\*[I-Font]key\f[]
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
+65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[]
Specifies the interval between re-randomization of certain
@@ -1067,7 +1067,7 @@ servers.
The
\f\*[I-Font]key\f[]
arguments are 32-bit unsigned
-integers with values from 1 to 65,534.
+integers with values from 1 to 65,535.
.PP
.SS Error Codes
The following error codes are reported via the NTP control
diff --git a/contrib/ntp/ntpd/ntp.conf.5mdoc b/contrib/ntp/ntpd/ntp.conf.5mdoc
index 7286c81..7d13328 100644
--- a/contrib/ntp/ntpd/ntp.conf.5mdoc
+++ b/contrib/ntp/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd February 27 2018
+.Dd February 20 2019
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:42 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:34 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -325,7 +325,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
.Ar key
-identifier with values from 1 to 65534, inclusive.
+identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.It Cm minpoll Ar minpoll
@@ -583,7 +583,7 @@ and reports at the NTP project page linked from
.Li http://www.ntp.org/ .
.Ss Symmetric\-Key Cryptography
The original RFC\-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32\-bit key identifier, to
+65,535 keys, each distinguished by a 32\-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -877,7 +877,7 @@ The
.Ar key
argument is
the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
+range 1 to 65,535, inclusive.
.It Xo Ic crypto
.Op Cm cert Ar file
.Op Cm leap Ar file
@@ -981,7 +981,7 @@ The
.Ar key
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
+65,535, inclusive.
.It Ic revoke Ar logsec
Specifies the interval between re\-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -1008,7 +1008,7 @@ servers.
The
.Ar key
arguments are 32\-bit unsigned
-integers with values from 1 to 65,534.
+integers with values from 1 to 65,535.
.El
.Ss Error Codes
The following error codes are reported via the NTP control
diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def
index 4af7742..9684fb1 100644
--- a/contrib/ntp/ntpd/ntp.conf.def
+++ b/contrib/ntp/ntpd/ntp.conf.def
@@ -327,7 +327,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
.Ar key
-identifier with values from 1 to 65534, inclusive.
+identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.It Cm minpoll Ar minpoll
@@ -585,7 +585,7 @@ and reports at the NTP project page linked from
.Li http://www.ntp.org/ .
.Ss Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32-bit key identifier, to
+65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -879,7 +879,7 @@ The
.Ar key
argument is
the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
+range 1 to 65,535, inclusive.
.It Xo Ic crypto
.Op Cm cert Ar file
.Op Cm leap Ar file
@@ -983,7 +983,7 @@ The
.Ar key
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
+65,535, inclusive.
.It Ic revoke Ar logsec
Specifies the interval between re-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -1010,7 +1010,7 @@ servers.
The
.Ar key
arguments are 32-bit unsigned
-integers with values from 1 to 65,534.
+integers with values from 1 to 65,535.
.El
.Ss Error Codes
The following error codes are reported via the NTP control
diff --git a/contrib/ntp/ntpd/ntp.conf.html b/contrib/ntp/ntpd/ntp.conf.html
index 2d477e2..e19e326 100644
--- a/contrib/ntp/ntpd/ntp.conf.html
+++ b/contrib/ntp/ntpd/ntp.conf.html
@@ -1,128 +1,168 @@
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
-<title>NTP Configuration File User's Manual</title>
-<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="NTP Configuration File User's Manual">
-<meta name="generator" content="makeinfo 4.7">
-<link title="Top" rel="top" href="#Top">
-<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family: serif; font-weight: normal; }
---></style>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>NTP Configuration File User&rsquo;s Manual</title>
+
+<meta name="description" content="NTP Configuration File User&rsquo;s Manual">
+<meta name="keywords" content="NTP Configuration File User&rsquo;s Manual">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
+<link href="#Top" rel="start" title="Top">
+<link href="dir.html#Top" rel="up" title="(dir)">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.indentedblock {margin-right: 0em}
+blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style: oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nolinebreak {white-space: nowrap}
+span.roman {font-family: initial; font-weight: normal}
+span.sansserif {font-family: sans-serif; font-weight: normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
</head>
-<body>
-<h1 class="settitle">NTP Configuration File User's Manual</h1>
-<div class="node">
-<p><hr>
-<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002econf-Description">ntp.conf Description</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
-<br>
-</div>
-<h2 class="unnumbered">NTP's Configuration File User Manual</h2>
+<body lang="en">
+<h1 class="settitle" align="center">NTP Configuration File User&rsquo;s Manual</h1>
-<p>This document describes the configuration file for the NTP Project's
-<code>ntpd</code> program.
- <p>This document applies to version 4.2.8p11 of <code>ntp.conf</code>.
- <div class="shortcontents">
-<h2>Short Contents</h2>
-<ul>
-<a href="#Top">NTP's Configuration File User Manual</a>
-</ul>
+
+
+<a name="Top"></a>
+<div class="header">
+<p>
+Next: <a href="#ntp_002econf-Description" accesskey="n" rel="next">ntp.conf Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
+<a name="NTP_0027s-Configuration-File-User-Manual"></a>
+<h1 class="top">NTP&rsquo;s Configuration File User Manual</h1>
-<ul class="menu">
-<li><a accesskey="1" href="#ntp_002econf-Description">ntp.conf Description</a>
-<li><a accesskey="2" href="#ntp_002econf-Notes">ntp.conf Notes</a>
+<p>This document describes the configuration file for the NTP Project&rsquo;s
+<code>ntpd</code> program.
+</p>
+<p>This document applies to version 4.2.8p13 of <code>ntp.conf</code>.
+</p>
+<a name="SEC_Overview"></a>
+<h2 class="shortcontents-heading">Short Table of Contents</h2>
+
+<div class="shortcontents">
+<ul class="no-bullet">
+<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
-
-<div class="node">
-<p><hr>
-<a name="ntp_002econf-Description"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
</div>
-<!-- node-name, next, previous, up -->
-<h3 class="section">Description</h3>
+
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Description" accesskey="1">ntp.conf Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="2">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+</table>
+
+<hr>
+<a name="ntp_002econf-Description"></a>
+<div class="header">
+<p>
+Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
+</div>
+<a name="Description"></a>
+<h2 class="chapter">1 Description</h2>
<p>The behavior of <code>ntpd</code> can be changed by a configuration file,
by default <code>ntp.conf</code>.
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="1">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+</table>
-<div class="node">
-<p><hr>
+<hr>
<a name="ntp_002econf-Notes"></a>
-<br>
+<div class="header">
+<p>
+Previous: <a href="#ntp_002econf-Bugs" accesskey="p" rel="prev">ntp.conf Bugs</a>, Up: <a href="#ntp_002econf-Description" accesskey="u" rel="up">ntp.conf Description</a> &nbsp; </p>
</div>
+<a name="Notes-about-ntp_002econf"></a>
+<h3 class="section">1.1 Notes about ntp.conf</h3>
+<a name="index-ntp_002econf"></a>
+<a name="index-Network-Time-Protocol-_0028NTP_0029-daemon-configuration-file-format"></a>
-<h3 class="section">Notes about ntp.conf</h3>
-<p><a name="index-ntp_002econf-1"></a><a name="index-Network-Time-Protocol-_0028NTP_0029-daemon-configuration-file-format-2"></a>
- <p>The
+<p>The
<code>ntp.conf</code>
configuration file is read at initial startup by the
<code>ntpd(1ntpdmdoc)</code>
daemon in order to specify the synchronization sources,
-modes and other related information.
+modes and other related information.
Usually, it is installed in the
-<span class="file">/etc</span>
+<samp>/etc</samp>
directory,
but could be installed elsewhere
-(see the daemon's
+(see the daemon&rsquo;s
<code>-c</code>
command line option).
-
- <p>The file format is similar to other
-<span class="sc">unix</span>
-configuration files.
+</p>
+<p>The file format is similar to other
+<small>UNIX</small>
+configuration files.
Comments begin with a
-#
+&lsquo;#&rsquo;
character and extend to the end of the line;
-blank lines are ignored.
+blank lines are ignored.
Configuration commands consist of an initial keyword
followed by a list of arguments,
-some of which may be optional, separated by whitespace.
-Commands may not be continued over multiple lines.
+some of which may be optional, separated by whitespace.
+Commands may not be continued over multiple lines.
Arguments may be host names,
host addresses written in numeric, dotted-quad form,
integers, floating point numbers (when specifying times in seconds)
and text strings.
-
- <p>The rest of this page describes the configuration and control options.
+</p>
+<p>The rest of this page describes the configuration and control options.
The
-"Notes on Configuring NTP and Setting up an NTP Subnet"
+&quot;Notes on Configuring NTP and Setting up an NTP Subnet&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>)
-contains an extended discussion of these options.
+<samp>/usr/share/doc/ntp</samp>)
+contains an extended discussion of these options.
In addition to the discussion of general
-<a href="#Configuration-Options">Configuration Options</a>,
+&lsquo;Configuration Options&rsquo;,
there are sections describing the following supported functionality
and the options used to control it:
- <ul>
-<li><a href="#Authentication-Support">Authentication Support</a>
-<li><a href="#Monitoring-Support">Monitoring Support</a>
-<li><a href="#Access-Control-Support">Access Control Support</a>
-<li><a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
-<li><a href="#Reference-Clock-Support">Reference Clock Support</a>
-<li><a href="#Miscellaneous-Options">Miscellaneous Options</a>
-</ul>
-
- <p>Following these is a section describing
-<a href="#Miscellaneous-Options">Miscellaneous Options</a>.
+</p><ul>
+<li> <a href="#Authentication-Support">Authentication Support</a>
+</li><li> <a href="#Monitoring-Support">Monitoring Support</a>
+</li><li> <a href="#Access-Control-Support">Access Control Support</a>
+</li><li> <a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
+</li><li> <a href="#Reference-Clock-Support">Reference Clock Support</a>
+</li><li> <a href="#Miscellaneous-Options">Miscellaneous Options</a>
+</li></ul>
+
+<p>Following these is a section describing
+<a href="#Miscellaneous-Options">Miscellaneous Options</a>.
While there is a rich set of options available,
the only required option is one or more
<code>pool</code>,
@@ -131,42 +171,66 @@ the only required option is one or more
<code>broadcast</code>
or
<code>manycastclient</code>
-commands.
-<div class="node">
-<p><hr>
+commands.
+</p><table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#Configuration-Support" accesskey="1">Configuration Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Authentication-Support" accesskey="2">Authentication Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Monitoring-Support" accesskey="3">Monitoring Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Access-Control-Support" accesskey="4">Access Control Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Automatic-NTP-Configuration-Options" accesskey="5">Automatic NTP Configuration Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Reference-Clock-Support" accesskey="6">Reference Clock Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Miscellaneous-Options" accesskey="7">Miscellaneous Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="8">ntp.conf Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="9">ntp.conf See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs">ntp.conf Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; :</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+</table>
+
+<hr>
<a name="Configuration-Support"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#Authentication-Support" accesskey="n" rel="next">Authentication Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">Configuration Support</h4>
-
+<a name="Configuration-Support-1"></a>
+<h4 class="subsection">1.1.1 Configuration Support</h4>
<p>Following is a description of the configuration commands in
-NTPv4.
+NTPv4.
These commands have the same basic functions as in NTPv3 and
-in some cases new functions and new arguments.
+in some cases new functions and new arguments.
There are two
classes of commands, configuration commands that configure a
persistent association with a remote server or peer or reference
clock, and auxiliary commands that specify environmental variables
that control various related operations.
-
-<h5 class="subsubsection">Configuration Commands</h5>
-
+</p><a name="Configuration-Commands"></a>
+<h4 class="subsubsection">1.1.1.1 Configuration Commands</h4>
<p>The various modes are determined by the command keyword and the
-type of the required IP address.
+type of the required IP address.
Addresses are classed by type as
(s) a remote server or peer (IPv4 class A, B and C), (b) the
broadcast address of a local interface, (m) a multicast address (IPv4
-class D), or (r) a reference clock address (127.127.x.x).
+class D), or (r) a reference clock address (127.127.x.x).
Note that
-only those options applicable to each command are listed below.
+only those options applicable to each command are listed below.
Use
of options not listed may not be caught as an error, but may result
in some weird and even destructive behavior.
-
- <p>If the Basic Socket Interface Extensions for IPv6 (RFC-2553)
+</p>
+<p>If the Basic Socket Interface Extensions for IPv6 (RFC-2553)
is detected, support for the IPv6 address family is generated
-in addition to the default support of the IPv4 address family.
+in addition to the default support of the IPv4 address family.
In a few cases, including the
<code>reslist</code>
billboard generated
@@ -174,84 +238,96 @@ by
<code>ntpq(1ntpqmdoc)</code>
or
<code>ntpdc(1ntpdcmdoc)</code>,
-IPv6 addresses are automatically generated.
+IPv6 addresses are automatically generated.
IPv6 addresses can be identified by the presence of colons
-:
-in the address field.
+&ldquo;:&rdquo;
+in the address field.
IPv6 addresses can be used almost everywhere where
IPv4 addresses can be used,
with the exception of reference clock addresses,
which are always IPv4.
-
- <p>Note that in contexts where a host name is expected, a
+</p>
+<p>Note that in contexts where a host name is expected, a
<code>-4</code>
qualifier preceding
the host name forces DNS resolution to the IPv4 namespace,
while a
<code>-6</code>
-qualifier forces DNS resolution to the IPv6 namespace.
+qualifier forces DNS resolution to the IPv6 namespace.
See IPv6 references for the
equivalent classes for that address family.
- <dl>
-<dt><code>pool</code> <kbd>address</kbd> <code>[burst]</code> <code>[iburst]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code><br><dt><code>server</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[burst]</code> <code>[iburst]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code> <code>[true]</code><br><dt><code>peer</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code> <code>[true]</code> <code>[xleave]</code><br><dt><code>broadcast</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[ttl </code><kbd>ttl</kbd><code>]</code> <code>[xleave]</code><br><dt><code>manycastclient</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code> <code>[ttl </code><kbd>ttl</kbd><code>]</code><dd></dl>
+</p><dl compact="compact">
+<dt><code>pool</code> <kbd>address</kbd> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code></dt>
+<dt><code>server</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>burst</code>]</code> <code>[<code>iburst</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>true</code>]</code></dt>
+<dt><code>peer</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>true</code>]</code> <code>[<code>xleave</code>]</code></dt>
+<dt><code>broadcast</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>ttl</code> <kbd>ttl</kbd>]</code> <code>[<code>xleave</code>]</code></dt>
+<dt><code>manycastclient</code> <kbd>address</kbd> <code>[<code>key</code> <kbd>key</kbd> <kbd>|</kbd> <code>autokey</code>]</code> <code>[<code>version</code> <kbd>version</kbd>]</code> <code>[<code>prefer</code>]</code> <code>[<code>minpoll</code> <kbd>minpoll</kbd>]</code> <code>[<code>maxpoll</code> <kbd>maxpoll</kbd>]</code> <code>[<code>ttl</code> <kbd>ttl</kbd>]</code></dt>
+</dl>
- <p>These five commands specify the time server name or address to
-be used and the mode in which to operate.
+<p>These five commands specify the time server name or address to
+be used and the mode in which to operate.
The
<kbd>address</kbd>
can be
-either a DNS name or an IP address in dotted-quad notation.
+either a DNS name or an IP address in dotted-quad notation.
Additional information on association behavior can be found in the
-"Association Management"
+&quot;Association Management&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
- <dl>
-<dt><code>pool</code><dd>For type s addresses, this command mobilizes a persistent
-client mode association with a number of remote servers.
+<samp>/usr/share/doc/ntp</samp>).
+</p><dl compact="compact">
+<dt><code>pool</code></dt>
+<dd><p>For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
In this mode the local clock can synchronized to the
remote server, but the remote server can never be synchronized to
-the local clock.
-<br><dt><code>server</code><dd>For type s and r addresses, this command mobilizes a persistent
+the local clock.
+</p></dd>
+<dt><code>server</code></dt>
+<dd><p>For type s and r addresses, this command mobilizes a persistent
client mode association with the specified remote server or local
-radio clock.
+radio clock.
In this mode the local clock can synchronized to the
remote server, but the remote server can never be synchronized to
-the local clock.
+the local clock.
This command should
<em>not</em>
be used for type
-b or m addresses.
-<br><dt><code>peer</code><dd>For type s addresses (only), this command mobilizes a
+b or m addresses.
+</p></dd>
+<dt><code>peer</code></dt>
+<dd><p>For type s addresses (only), this command mobilizes a
persistent symmetric-active mode association with the specified
-remote peer.
+remote peer.
In this mode the local clock can be synchronized to
the remote peer or the remote peer can be synchronized to the local
-clock.
+clock.
This is useful in a network of servers where, depending on
various failure scenarios, either the local or remote peer may be
-the better source of time.
+the better source of time.
This command should NOT be used for type
-b, m or r addresses.
-<br><dt><code>broadcast</code><dd>For type b and m addresses (only), this
-command mobilizes a persistent broadcast mode association.
+b, m or r addresses.
+</p></dd>
+<dt><code>broadcast</code></dt>
+<dd><p>For type b and m addresses (only), this
+command mobilizes a persistent broadcast mode association.
Multiple
commands can be used to specify multiple local broadcast interfaces
-(subnets) and/or multiple multicast groups.
+(subnets) and/or multiple multicast groups.
Note that local
broadcast messages go only to the interface associated with the
-subnet specified, but multicast messages go to all interfaces.
+subnet specified, but multicast messages go to all interfaces.
In broadcast mode the local server sends periodic broadcast
messages to a client population at the
<kbd>address</kbd>
specified, which is usually the broadcast address on (one of) the
-local network(s) or a multicast address assigned to NTP.
+local network(s) or a multicast address assigned to NTP.
The IANA
has assigned the multicast group address IPv4 224.0.1.1 and
IPv6 ff05::101 (site local) exclusively to
NTP, but other nonconflicting addresses can be used to contain the
-messages within administrative boundaries.
+messages within administrative boundaries.
Ordinarily, this
specification applies only to the local server operating as a
sender; for operation as a broadcast client, see the
@@ -259,65 +335,73 @@ sender; for operation as a broadcast client, see the
or
<code>multicastclient</code>
commands
-below.
-<br><dt><code>manycastclient</code><dd>For type m addresses (only), this command mobilizes a
+below.
+</p></dd>
+<dt><code>manycastclient</code></dt>
+<dd><p>For type m addresses (only), this command mobilizes a
manycast client mode association for the multicast address
-specified.
+specified.
In this case a specific address must be supplied which
matches the address used on the
<code>manycastserver</code>
command for
-the designated manycast servers.
+the designated manycast servers.
The NTP multicast address
224.0.1.1 assigned by the IANA should NOT be used, unless specific
means are taken to avoid spraying large areas of the Internet with
these messages and causing a possibly massive implosion of replies
-at the sender.
+at the sender.
The
<code>manycastserver</code>
command specifies that the local server
is to operate in client mode with the remote servers that are
-discovered as the result of broadcast/multicast messages.
+discovered as the result of broadcast/multicast messages.
The
client broadcasts a request message to the group address associated
with the specified
<kbd>address</kbd>
and specifically enabled
-servers respond to these messages.
+servers respond to these messages.
The client selects the servers
providing the best time and continues as with the
<code>server</code>
-command.
+command.
The remaining servers are discarded as if never
-heard.
+heard.
+</p></dd>
</dl>
- <p>Options:
- <dl>
-<dt><code>autokey</code><dd>All packets sent to and received from the server or peer are to
+<p>Options:
+</p><dl compact="compact">
+<dt><code>autokey</code></dt>
+<dd><p>All packets sent to and received from the server or peer are to
include authentication fields encrypted using the autokey scheme
described in
-<a href="#Authentication-Options">Authentication Options</a>.
-<br><dt><code>burst</code><dd>when the server is reachable, send a burst of eight packets
-instead of the usual one.
+&lsquo;Authentication Options&rsquo;.
+</p></dd>
+<dt><code>burst</code></dt>
+<dd><p>when the server is reachable, send a burst of eight packets
+instead of the usual one.
The packet spacing is normally 2 s;
however, the spacing between the first and second packets
can be changed with the
<code>calldelay</code>
command to allow
-additional time for a modem or ISDN call to complete.
+additional time for a modem or ISDN call to complete.
This is designed to improve timekeeping quality
with the
<code>server</code>
-command and s addresses.
-<br><dt><code>iburst</code><dd>When the server is unreachable, send a burst of eight packets
-instead of the usual one.
+command and s addresses.
+</p></dd>
+<dt><code>iburst</code></dt>
+<dd><p>When the server is unreachable, send a burst of eight packets
+instead of the usual one.
The packet spacing is normally 2 s;
however, the spacing between the first two packets can be
changed with the
<code>calldelay</code>
command to allow
-additional time for a modem or ISDN call to complete.
+additional time for a modem or ISDN call to complete.
This is designed to speed the initial synchronization
acquisition with the
<code>server</code>
@@ -325,167 +409,196 @@ command and s addresses and when
<code>ntpd(1ntpdmdoc)</code>
is started with the
<code>-q</code>
-option.
-<br><dt><code>key</code> <kbd>key</kbd><dd>All packets sent to and received from the server or peer are to
+option.
+</p></dd>
+<dt><code>key</code> <kbd>key</kbd></dt>
+<dd><p>All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
<kbd>key</kbd>
-identifier with values from 1 to 65534, inclusive.
+identifier with values from 1 to 65535, inclusive.
The
-default is to include no encryption field.
-<br><dt><code>minpoll</code> <kbd>minpoll</kbd><br><dt><code>maxpoll</code> <kbd>maxpoll</kbd><dd>These options specify the minimum and maximum poll intervals
+default is to include no encryption field.
+</p></dd>
+<dt><code>minpoll</code> <kbd>minpoll</kbd></dt>
+<dt><code>maxpoll</code> <kbd>maxpoll</kbd></dt>
+<dd><p>These options specify the minimum and maximum poll intervals
for NTP messages, as a power of 2 in seconds
The maximum poll
interval defaults to 10 (1,024 s), but can be increased by the
<code>maxpoll</code>
-option to an upper limit of 17 (36.4 h).
+option to an upper limit of 17 (36.4 h).
The
minimum poll interval defaults to 6 (64 s), but can be decreased by
the
<code>minpoll</code>
-option to a lower limit of 4 (16 s).
-<br><dt><code>noselect</code><dd>Marks the server as unused, except for display purposes.
-The server is discarded by the selection algroithm.
-<br><dt><code>preempt</code><dd>Says the association can be preempted.
-<br><dt><code>true</code><dd>Marks the server as a truechimer.
-Use this option only for testing.
-<br><dt><code>prefer</code><dd>Marks the server as preferred.
+option to a lower limit of 4 (16 s).
+</p></dd>
+<dt><code>noselect</code></dt>
+<dd><p>Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+</p></dd>
+<dt><code>preempt</code></dt>
+<dd><p>Says the association can be preempted.
+</p></dd>
+<dt><code>true</code></dt>
+<dd><p>Marks the server as a truechimer.
+Use this option only for testing.
+</p></dd>
+<dt><code>prefer</code></dt>
+<dd><p>Marks the server as preferred.
All other things being equal,
this host will be chosen for synchronization among a set of
-correctly operating hosts.
+correctly operating hosts.
See the
-"Mitigation Rules and the prefer Keyword"
+&quot;Mitigation Rules and the prefer Keyword&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>)
-for further information.
-<br><dt><code>true</code><dd>Forces the association to always survive the selection and clustering algorithms.
+<samp>/usr/share/doc/ntp</samp>)
+for further information.
+</p></dd>
+<dt><code>true</code></dt>
+<dd><p>Forces the association to always survive the selection and clustering algorithms.
This option should almost certainly
<em>only</em>
-be used while testing an association.
-<br><dt><code>ttl</code> <kbd>ttl</kbd><dd>This option is used only with broadcast server and manycast
-client modes.
+be used while testing an association.
+</p></dd>
+<dt><code>ttl</code> <kbd>ttl</kbd></dt>
+<dd><p>This option is used only with broadcast server and manycast
+client modes.
It specifies the time-to-live
<kbd>ttl</kbd>
to
use on broadcast server and multicast server and the maximum
<kbd>ttl</kbd>
for the expanding ring search with manycast
-client packets.
+client packets.
Selection of the proper value, which defaults to
127, is something of a black art and should be coordinated with the
-network administrator.
-<br><dt><code>version</code> <kbd>version</kbd><dd>Specifies the version number to be used for outgoing NTP
-packets.
+network administrator.
+</p></dd>
+<dt><code>version</code> <kbd>version</kbd></dt>
+<dd><p>Specifies the version number to be used for outgoing NTP
+packets.
Versions 1-4 are the choices, with version 4 the
-default.
-<br><dt><code>xleave</code><dd>Valid in
+default.
+</p></dd>
+<dt><code>xleave</code></dt>
+<dd><p>Valid in
<code>peer</code>
and
<code>broadcast</code>
-modes only, this flag enables interleave mode.
+modes only, this flag enables interleave mode.
+</p></dd>
</dl>
-
-<h5 class="subsubsection">Auxiliary Commands</h5>
-
- <dl>
-<dt><code>broadcastclient</code><dd>This command enables reception of broadcast server messages to
-any local interface (type b) address.
+<a name="Auxiliary-Commands"></a>
+<h4 class="subsubsection">1.1.1.2 Auxiliary Commands</h4>
+<dl compact="compact">
+<dt><code>broadcastclient</code></dt>
+<dd><p>This command enables reception of broadcast server messages to
+any local interface (type b) address.
Upon receiving a message for
the first time, the broadcast client measures the nominal server
propagation delay using a brief client/server exchange with the
server, then enters the broadcast client mode, in which it
-synchronizes to succeeding broadcast messages.
+synchronizes to succeeding broadcast messages.
Note that, in order
to avoid accidental or malicious disruption in this mode, both the
server and client should operate using symmetric-key or public-key
authentication as described in
-<a href="#Authentication-Options">Authentication Options</a>.
-<br><dt><code>manycastserver</code> <kbd>address</kbd> <kbd>...</kbd><dd>This command enables reception of manycast client messages to
-the multicast group address(es) (type m) specified.
+&lsquo;Authentication Options&rsquo;.
+</p></dd>
+<dt><code>manycastserver</code> <kbd>address</kbd> <kbd>...</kbd></dt>
+<dd><p>This command enables reception of manycast client messages to
+the multicast group address(es) (type m) specified.
At least one
address is required, but the NTP multicast address 224.0.1.1
assigned by the IANA should NOT be used, unless specific means are
taken to limit the span of the reply and avoid a possibly massive
-implosion at the original sender.
+implosion at the original sender.
Note that, in order to avoid
accidental or malicious disruption in this mode, both the server
and client should operate using symmetric-key or public-key
authentication as described in
-<a href="#Authentication-Options">Authentication Options</a>.
-<br><dt><code>multicastclient</code> <kbd>address</kbd> <kbd>...</kbd><dd>This command enables reception of multicast server messages to
-the multicast group address(es) (type m) specified.
+&lsquo;Authentication Options&rsquo;.
+</p></dd>
+<dt><code>multicastclient</code> <kbd>address</kbd> <kbd>...</kbd></dt>
+<dd><p>This command enables reception of multicast server messages to
+the multicast group address(es) (type m) specified.
Upon receiving
a message for the first time, the multicast client measures the
nominal server propagation delay using a brief client/server
exchange with the server, then enters the broadcast client mode, in
-which it synchronizes to succeeding multicast messages.
+which it synchronizes to succeeding multicast messages.
Note that,
in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
-<a href="#Authentication-Options">Authentication Options</a>.
-<br><dt><code>mdnstries</code> <kbd>number</kbd><dd>If we are participating in mDNS,
+&lsquo;Authentication Options&rsquo;.
+</p></dd>
+<dt><code>mdnstries</code> <kbd>number</kbd></dt>
+<dd><p>If we are participating in mDNS,
after we have synched for the first time
-we attempt to register with the mDNS system.
+we attempt to register with the mDNS system.
If that registration attempt fails,
we try again at one minute intervals for up to
<code>mdnstries</code>
-times.
+times.
After all,
<code>ntpd</code>
-may be starting before mDNS.
+may be starting before mDNS.
The default value for
<code>mdnstries</code>
-is 5.
+is 5.
+</p></dd>
</dl>
-<div class="node">
-<p><hr>
+<hr>
<a name="Authentication-Support"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#Monitoring-Support" accesskey="n" rel="next">Monitoring Support</a>, Previous: <a href="#Configuration-Support" accesskey="p" rel="prev">Configuration Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">Authentication Support</h4>
-
+<a name="Authentication-Support-1"></a>
+<h4 class="subsection">1.1.2 Authentication Support</h4>
<p>Authentication support allows the NTP client to verify that the
server is in fact known and trusted and not an intruder intending
-accidentally or on purpose to masquerade as that server.
+accidentally or on purpose to masquerade as that server.
The NTPv3
specification RFC-1305 defines a scheme which provides
-cryptographic authentication of received NTP packets.
+cryptographic authentication of received NTP packets.
Originally,
this was done using the Data Encryption Standard (DES) algorithm
operating in Cipher Block Chaining (CBC) mode, commonly called
-DES-CBC.
+DES-CBC.
Subsequently, this was replaced by the RSA Message Digest
-5 (MD5) algorithm using a private key, commonly called keyed-MD5.
+5 (MD5) algorithm using a private key, commonly called keyed-MD5.
Either algorithm computes a message digest, or one-way hash, which
can be used to verify the server has the correct private key and
key identifier.
-
- <p>NTPv4 retains the NTPv3 scheme, properly described as symmetric key
+</p>
+<p>NTPv4 retains the NTPv3 scheme, properly described as symmetric key
cryptography and, in addition, provides a new Autokey scheme
-based on public key cryptography.
+based on public key cryptography.
Public key cryptography is generally considered more secure
than symmetric key cryptography, since the security is based
on a private value which is generated by each server and
-never revealed.
+never revealed.
With Autokey all key distribution and
management functions involve only public values, which
-considerably simplifies key distribution and storage.
+considerably simplifies key distribution and storage.
Public key management is based on X.509 certificates,
which can be provided by commercial services or
produced by utility programs in the OpenSSL software library
or the NTPv4 distribution.
-
- <p>While the algorithms for symmetric key cryptography are
+</p>
+<p>While the algorithms for symmetric key cryptography are
included in the NTPv4 distribution, public key cryptography
requires the OpenSSL software library to be installed
-before building the NTP distribution.
+before building the NTP distribution.
Directions for doing that
are on the Building and Installing the Distribution page.
-
- <p>Authentication is configured separately for each association
+</p>
+<p>Authentication is configured separately for each association
using the
<code>key</code>
or
@@ -497,36 +610,36 @@ subcommand on the
and
<code>manycastclient</code>
configuration commands as described in
-<a href="#Configuration-Options">Configuration Options</a>
-page.
+&lsquo;Configuration Options&rsquo;
+page.
The authentication
options described below specify the locations of the key files,
if other than default, which symmetric keys are trusted
and the interval between various operations, if other than default.
-
- <p>Authentication is always enabled,
+</p>
+<p>Authentication is always enabled,
although ineffective if not configured as
-described below.
+described below.
If a NTP packet arrives
including a message authentication
code (MAC), it is accepted only if it
-passes all cryptographic checks.
+passes all cryptographic checks.
The
checks require correct key ID, key value
-and message digest.
+and message digest.
If the packet has
been modified in any way or replayed
by an intruder, it will fail one or more
-of these checks and be discarded.
+of these checks and be discarded.
Furthermore, the Autokey scheme requires a
preliminary protocol exchange to obtain
the server certificate, verify its
credentials and initialize the protocol
-
- <p>The
+</p>
+<p>The
<code>auth</code>
flag controls whether new associations or
-remote configuration commands require cryptographic authentication.
+remote configuration commands require cryptographic authentication.
This flag can be set or reset by the
<code>enable</code>
and
@@ -535,22 +648,22 @@ commands and also by remote
configuration commands sent by a
<code>ntpdc(1ntpdcmdoc)</code>
program running on
-another machine.
+another machine.
If this flag is enabled, which is the default
case, new broadcast client and symmetric passive associations and
remote configuration commands must be cryptographically
-authenticated using either symmetric key or public key cryptography.
+authenticated using either symmetric key or public key cryptography.
If this
flag is disabled, these operations are effective
even if not cryptographic
-authenticated.
+authenticated.
It should be understood
that operating with the
<code>auth</code>
flag disabled invites a significant vulnerability
where a rogue hacker can
masquerade as a falseticker and seriously
-disrupt system timekeeping.
+disrupt system timekeeping.
It is
important to note that this flag has no purpose
other than to allow or disallow
@@ -559,42 +672,41 @@ and symmetric active messages
and remote configuration commands and, in particular,
the flag has no effect on
the authentication process itself.
-
- <p>An attractive alternative where multicast support is available
+</p>
+<p>An attractive alternative where multicast support is available
is manycast mode, in which clients periodically troll
for servers as described in the
<a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
-page.
+page.
Either symmetric key or public key
-cryptographic authentication can be used in this mode.
+cryptographic authentication can be used in this mode.
The principle advantage
of manycast mode is that potential servers need not be
configured in advance,
since the client finds them during regular operation,
and the configuration
files for all clients can be identical.
-
- <p>The security model and protocol schemes for
+</p>
+<p>The security model and protocol schemes for
both symmetric key and public key
cryptography are summarized below;
further details are in the briefings, papers
and reports at the NTP project page linked from
<code>http://www.ntp.org/</code>.
-
-<h5 class="subsubsection">Symmetric-Key Cryptography</h5>
-
+</p><a name="Symmetric_002dKey-Cryptography"></a>
+<h4 class="subsubsection">1.1.2.1 Symmetric-Key Cryptography</h4>
<p>The original RFC-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32-bit key identifier, to
-authenticate an association.
+65,535 keys, each distinguished by a 32-bit key identifier, to
+authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
-authenticate NTP packets.
+authenticate NTP packets.
Keys and
related information are specified in a key
file, usually called
-<span class="file">ntp.keys</span>,
+<samp>ntp.keys</samp>,
which must be distributed and stored using
-secure means beyond the scope of the NTP protocol itself.
+secure means beyond the scope of the NTP protocol itself.
Besides the keys used
for ordinary NTP associations,
additional keys can be used as passwords for the
@@ -602,25 +714,25 @@ additional keys can be used as passwords for the
and
<code>ntpdc(1ntpdcmdoc)</code>
utility programs.
-
- <p>When
+</p>
+<p>When
<code>ntpd(1ntpdmdoc)</code>
is first started, it reads the key file specified in the
<code>keys</code>
configuration command and installs the keys
-in the key cache.
+in the key cache.
However,
individual keys must be activated with the
<code>trusted</code>
-command before use.
+command before use.
This
allows, for instance, the installation of possibly
several batches of keys and
then activating or deactivating each batch
remotely using
-<code>ntpdc(1ntpdcmdoc)</code>.
+<code>ntpdc(1ntpdcmdoc)</code>.
This also provides a revocation capability that can be used
-if a key becomes compromised.
+if a key becomes compromised.
The
<code>requestkey</code>
command selects the key used as the password for the
@@ -630,121 +742,118 @@ utility, while the
command selects the key used as the password for the
<code>ntpq(1ntpqmdoc)</code>
utility.
-
-<h5 class="subsubsection">Public Key Cryptography</h5>
-
+</p><a name="Public-Key-Cryptography"></a>
+<h4 class="subsubsection">1.1.2.2 Public Key Cryptography</h4>
<p>NTPv4 supports the original NTPv3 symmetric key scheme
described in RFC-1305 and in addition the Autokey protocol,
-which is based on public key cryptography.
+which is based on public key cryptography.
The Autokey Version 2 protocol described on the Autokey Protocol
page verifies packet integrity using MD5 message digests
and verifies the source with digital signatures and any of several
-digest/signature schemes.
+digest/signature schemes.
Optional identity schemes described on the Identity Schemes
page and based on cryptographic challenge/response algorithms
-are also available.
+are also available.
Using all of these schemes provides strong security against
replay with or without modification, spoofing, masquerade
and most forms of clogging attacks.
-
- <p>The Autokey protocol has several modes of operation
-corresponding to the various NTP modes supported.
+</p>
+<p>The Autokey protocol has several modes of operation
+corresponding to the various NTP modes supported.
Most modes use a special cookie which can be
computed independently by the client and server,
-but encrypted in transmission.
+but encrypted in transmission.
All modes use in addition a variant of the S-KEY scheme,
in which a pseudo-random key list is generated and used
-in reverse order.
+in reverse order.
These schemes are described along with an executive summary,
current status, briefing slides and reading list on the
-<a href="#Autonomous-Authentication">Autonomous Authentication</a>
+&lsquo;Autonomous Authentication&rsquo;
page.
-
- <p>The specific cryptographic environment used by Autokey servers
+</p>
+<p>The specific cryptographic environment used by Autokey servers
and clients is determined by a set of files
and soft links generated by the
<code>ntp-keygen(1ntpkeygenmdoc)</code>
-program.
+program.
This includes a required host key file,
required certificate file and optional sign key file,
-leapsecond file and identity scheme files.
+leapsecond file and identity scheme files.
The
digest/signature scheme is specified in the X.509 certificate
-along with the matching sign key.
+along with the matching sign key.
There are several schemes
available in the OpenSSL software library, each identified
by a specific string such as
<code>md5WithRSAEncryption</code>,
which stands for the MD5 message digest with RSA
-encryption scheme.
+encryption scheme.
The current NTP distribution supports
all the schemes in the OpenSSL library, including
those based on RSA and DSA digital signatures.
-
- <p>NTP secure groups can be used to define cryptographic compartments
-and security hierarchies.
+</p>
+<p>NTP secure groups can be used to define cryptographic compartments
+and security hierarchies.
It is important that every host
in the group be able to construct a certificate trail to one
-or more trusted hosts in the same group.
+or more trusted hosts in the same group.
Each group
host runs the Autokey protocol to obtain the certificates
-for all hosts along the trail to one or more trusted hosts.
+for all hosts along the trail to one or more trusted hosts.
This requires the configuration file in all hosts to be
engineered so that, even under anticipated failure conditions,
the NTP subnet will form such that every group host can find
a trail to at least one trusted host.
-
-<h5 class="subsubsection">Naming and Addressing</h5>
-
+</p><a name="Naming-and-Addressing"></a>
+<h4 class="subsubsection">1.1.2.3 Naming and Addressing</h4>
<p>It is important to note that Autokey does not use DNS to
-resolve addresses, since DNS can't be completely trusted
-until the name servers have synchronized clocks.
+resolve addresses, since DNS can&rsquo;t be completely trusted
+until the name servers have synchronized clocks.
The cryptographic name used by Autokey to bind the host identity
credentials and cryptographic values must be independent
-of interface, network and any other naming convention.
+of interface, network and any other naming convention.
The name appears in the host certificate in either or both
the subject and issuer fields, so protection against
DNS compromise is essential.
-
- <p>By convention, the name of an Autokey host is the name returned
+</p>
+<p>By convention, the name of an Autokey host is the name returned
by the Unix
<code>gethostname(2)</code>
-system call or equivalent in other systems.
+system call or equivalent in other systems.
By the system design
-model, there are no provisions to allow alternate names or aliases.
+model, there are no provisions to allow alternate names or aliases.
However, this is not to say that DNS aliases, different names
for each interface, etc., are constrained in any way.
-
- <p>It is also important to note that Autokey verifies authenticity
+</p>
+<p>It is also important to note that Autokey verifies authenticity
using the host name, network address and public keys,
all of which are bound together by the protocol specifically
-to deflect masquerade attacks.
+to deflect masquerade attacks.
For this reason Autokey
includes the source and destination IP addresses in message digest
computations and so the same addresses must be available
-at both the server and client.
+at both the server and client.
For this reason operation
-with network address translation schemes is not possible.
+with network address translation schemes is not possible.
This reflects the intended robust security model where government
and corporate NTP servers are operated outside firewall perimeters.
-
-<h5 class="subsubsection">Operation</h5>
-
+</p><a name="Operation"></a>
+<h4 class="subsubsection">1.1.2.4 Operation</h4>
<p>A specific combination of authentication scheme (none,
symmetric key, public key) and identity scheme is called
-a cryptotype, although not all combinations are compatible.
+a cryptotype, although not all combinations are compatible.
There may be management configurations where the clients,
-servers and peers may not all support the same cryptotypes.
+servers and peers may not all support the same cryptotypes.
A secure NTPv4 subnet can be configured in many ways while
keeping in mind the principles explained above and
-in this section.
+in this section.
Note however that some cryptotype
combinations may successfully interoperate with each other,
but may not represent good security practice.
-
- <p>The cryptotype of an association is determined at the time
+</p>
+<p>The cryptotype of an association is determined at the time
of mobilization, either at configuration time or some time
-later when a message of appropriate cryptotype arrives.
+later when a message of appropriate cryptotype arrives.
When mobilized by a
<code>server</code>
or
@@ -761,513 +870,609 @@ using the symmetric key ID specified; if the
<code>autokey</code>
subcommand is present, the association is authenticated
using Autokey.
-
- <p>When multiple identity schemes are supported in the Autokey
-protocol, the first message exchange determines which one is used.
+</p>
+<p>When multiple identity schemes are supported in the Autokey
+protocol, the first message exchange determines which one is used.
The client request message contains bits corresponding
-to which schemes it has available.
+to which schemes it has available.
The server response message
-contains bits corresponding to which schemes it has available.
+contains bits corresponding to which schemes it has available.
Both server and client match the received bits with their own
and select a common scheme.
-
- <p>Following the principle that time is a public value,
+</p>
+<p>Following the principle that time is a public value,
a server responds to any client packet that matches
-its cryptotype capabilities.
+its cryptotype capabilities.
Thus, a server receiving
an unauthenticated packet will respond with an unauthenticated
packet, while the same server receiving a packet of a cryptotype
-it supports will respond with packets of that cryptotype.
+it supports will respond with packets of that cryptotype.
However, unconfigured broadcast or manycast client
associations or symmetric passive associations will not be
mobilized unless the server supports a cryptotype compatible
-with the first packet received.
+with the first packet received.
By default, unauthenticated associations will not be mobilized
unless overridden in a decidedly dangerous way.
-
- <p>Some examples may help to reduce confusion.
-Client Alice has no specific cryptotype selected.
-Server Bob has both a symmetric key file and minimal Autokey files.
-Alice's unauthenticated messages arrive at Bob, who replies with
-unauthenticated messages.
-Cathy has a copy of Bob's symmetric
-key file and has selected key ID 4 in messages to Bob.
-Bob verifies the message with his key ID 4.
-If it's the
+</p>
+<p>Some examples may help to reduce confusion.
+Client Alice has no specific cryptotype selected.
+Server Bob has both a symmetric key file and minimal Autokey files.
+Alice&rsquo;s unauthenticated messages arrive at Bob, who replies with
+unauthenticated messages.
+Cathy has a copy of Bob&rsquo;s symmetric
+key file and has selected key ID 4 in messages to Bob.
+Bob verifies the message with his key ID 4.
+If it&rsquo;s the
same key and the message is verified, Bob sends Cathy a reply
-authenticated with that key.
+authenticated with that key.
If verification fails,
Bob sends Cathy a thing called a crypto-NAK, which tells her
-something broke.
+something broke.
She can see the evidence using the
<code>ntpq(1ntpqmdoc)</code>
program.
-
- <p>Denise has rolled her own host key and certificate.
-She also uses one of the identity schemes as Bob.
+</p>
+<p>Denise has rolled her own host key and certificate.
+She also uses one of the identity schemes as Bob.
She sends the first Autokey message to Bob and they
-both dance the protocol authentication and identity steps.
+both dance the protocol authentication and identity steps.
If all comes out okay, Denise and Bob continue as described above.
-
- <p>It should be clear from the above that Bob can support
+</p>
+<p>It should be clear from the above that Bob can support
all the girls at the same time, as long as he has compatible
-authentication and identity credentials.
+authentication and identity credentials.
Now, Bob can act just like the girls in his own choice of servers;
he can run multiple configured associations with multiple different
-servers (or the same server, although that might not be useful).
+servers (or the same server, although that might not be useful).
But, wise security policy might preclude some cryptotype
combinations; for instance, running an identity scheme
with one server and no authentication with another might not be wise.
-
-<h5 class="subsubsection">Key Management</h5>
-
+</p><a name="Key-Management"></a>
+<h4 class="subsubsection">1.1.2.5 Key Management</h4>
<p>The cryptographic values used by the Autokey protocol are
incorporated as a set of files generated by the
<code>ntp-keygen(1ntpkeygenmdoc)</code>
utility program, including symmetric key, host key and
public certificate files, as well as sign key, identity parameters
-and leapseconds files.
+and leapseconds files.
Alternatively, host and sign keys and
certificate files can be generated by the OpenSSL utilities
and certificates can be imported from public certificate
-authorities.
+authorities.
Note that symmetric keys are necessary for the
<code>ntpq(1ntpqmdoc)</code>
and
<code>ntpdc(1ntpdcmdoc)</code>
-utility programs.
+utility programs.
The remaining files are necessary only for the
Autokey protocol.
-
- <p>Certificates imported from OpenSSL or public certificate
-authorities have certian limitations.
+</p>
+<p>Certificates imported from OpenSSL or public certificate
+authorities have certian limitations.
The certificate should be in ASN.1 syntax, X.509 Version 3
format and encoded in PEM, which is the same format
-used by OpenSSL.
+used by OpenSSL.
The overall length of the certificate encoded
-in ASN.1 must not exceed 1024 bytes.
+in ASN.1 must not exceed 1024 bytes.
The subject distinguished
name field (CN) is the fully qualified name of the host
-on which it is used; the remaining subject fields are ignored.
+on which it is used; the remaining subject fields are ignored.
The certificate extension fields must not contain either
a subject key identifier or a issuer key identifier field;
however, an extended key usage field for a trusted host must
contain the value
-<code>trustRoot</code>;.
+<code>trustRoot</code>;.
Other extension fields are ignored.
-
-<h5 class="subsubsection">Authentication Commands</h5>
-
- <dl>
-<dt><code>autokey</code> <code>[</code><kbd>logsec</kbd><code>]</code><dd>Specifies the interval between regenerations of the session key
-list used with the Autokey protocol.
+</p><a name="Authentication-Commands"></a>
+<h4 class="subsubsection">1.1.2.6 Authentication Commands</h4>
+<dl compact="compact">
+<dt><code>autokey</code> <code>[<kbd>logsec</kbd>]</code></dt>
+<dd><p>Specifies the interval between regenerations of the session key
+list used with the Autokey protocol.
Note that the size of the key
list for each association depends on this interval and the current
-poll interval.
-The default value is 12 (4096 s or about 1.1 hours).
+poll interval.
+The default value is 12 (4096 s or about 1.1 hours).
For poll intervals above the specified interval, a session key list
with a single entry will be regenerated for every message
-sent.
-<br><dt><code>controlkey</code> <kbd>key</kbd><dd>Specifies the key identifier to use with the
+sent.
+</p></dd>
+<dt><code>controlkey</code> <kbd>key</kbd></dt>
+<dd><p>Specifies the key identifier to use with the
<code>ntpq(1ntpqmdoc)</code>
utility, which uses the standard
-protocol defined in RFC-1305.
+protocol defined in RFC-1305.
The
<kbd>key</kbd>
argument is
the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
-<br><dt><code>crypto</code> <code>[cert </code><kbd>file</kbd><code>]</code> <code>[leap </code><kbd>file</kbd><code>]</code> <code>[randfile </code><kbd>file</kbd><code>]</code> <code>[host </code><kbd>file</kbd><code>]</code> <code>[sign </code><kbd>file</kbd><code>]</code> <code>[gq </code><kbd>file</kbd><code>]</code> <code>[gqpar </code><kbd>file</kbd><code>]</code> <code>[iffpar </code><kbd>file</kbd><code>]</code> <code>[mvpar </code><kbd>file</kbd><code>]</code> <code>[pw </code><kbd>password</kbd><code>]</code><dd>This command requires the OpenSSL library.
+range 1 to 65,535, inclusive.
+</p></dd>
+<dt><code>crypto</code> <code>[<code>cert</code> <kbd>file</kbd>]</code> <code>[<code>leap</code> <kbd>file</kbd>]</code> <code>[<code>randfile</code> <kbd>file</kbd>]</code> <code>[<code>host</code> <kbd>file</kbd>]</code> <code>[<code>sign</code> <kbd>file</kbd>]</code> <code>[<code>gq</code> <kbd>file</kbd>]</code> <code>[<code>gqpar</code> <kbd>file</kbd>]</code> <code>[<code>iffpar</code> <kbd>file</kbd>]</code> <code>[<code>mvpar</code> <kbd>file</kbd>]</code> <code>[<code>pw</code> <kbd>password</kbd>]</code></dt>
+<dd><p>This command requires the OpenSSL library.
It activates public key
cryptography, selects the message digest and signature
encryption scheme and loads the required private and public
-values described above.
+values described above.
If one or more files are left unspecified,
-the default names are used as described above.
+the default names are used as described above.
Unless the complete path and name of the file are specified, the
location of a file is relative to the keys directory specified
in the
<code>keysdir</code>
command or default
-<span class="file">/usr/local/etc</span>.
+<samp>/usr/local/etc</samp>.
Following are the subcommands:
- <dl>
-<dt><code>cert</code> <kbd>file</kbd><dd>Specifies the location of the required host public certificate file.
+</p><dl compact="compact">
+<dt><code>cert</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the required host public certificate file.
This overrides the link
-<span class="file">ntpkey_cert_</span><kbd>hostname</kbd>
-in the keys directory.
-<br><dt><code>gqpar</code> <kbd>file</kbd><dd>Specifies the location of the optional GQ parameters file.
+<samp>ntpkey_cert_</samp><kbd>hostname</kbd>
+in the keys directory.
+</p></dd>
+<dt><code>gqpar</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the optional GQ parameters file.
This
overrides the link
-<span class="file">ntpkey_gq_</span><kbd>hostname</kbd>
-in the keys directory.
-<br><dt><code>host</code> <kbd>file</kbd><dd>Specifies the location of the required host key file.
+<samp>ntpkey_gq_</samp><kbd>hostname</kbd>
+in the keys directory.
+</p></dd>
+<dt><code>host</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the required host key file.
This overrides
the link
-<span class="file">ntpkey_key_</span><kbd>hostname</kbd>
-in the keys directory.
-<br><dt><code>iffpar</code> <kbd>file</kbd><dd>Specifies the location of the optional IFF parameters file.
+<samp>ntpkey_key_</samp><kbd>hostname</kbd>
+in the keys directory.
+</p></dd>
+<dt><code>iffpar</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the optional IFF parameters file.
This overrides the link
-<span class="file">ntpkey_iff_</span><kbd>hostname</kbd>
-in the keys directory.
-<br><dt><code>leap</code> <kbd>file</kbd><dd>Specifies the location of the optional leapsecond file.
+<samp>ntpkey_iff_</samp><kbd>hostname</kbd>
+in the keys directory.
+</p></dd>
+<dt><code>leap</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the optional leapsecond file.
This overrides the link
-<span class="file">ntpkey_leap</span>
-in the keys directory.
-<br><dt><code>mvpar</code> <kbd>file</kbd><dd>Specifies the location of the optional MV parameters file.
+<samp>ntpkey_leap</samp>
+in the keys directory.
+</p></dd>
+<dt><code>mvpar</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the optional MV parameters file.
This overrides the link
-<span class="file">ntpkey_mv_</span><kbd>hostname</kbd>
-in the keys directory.
-<br><dt><code>pw</code> <kbd>password</kbd><dd>Specifies the password to decrypt files containing private keys and
-identity parameters.
+<samp>ntpkey_mv_</samp><kbd>hostname</kbd>
+in the keys directory.
+</p></dd>
+<dt><code>pw</code> <kbd>password</kbd></dt>
+<dd><p>Specifies the password to decrypt files containing private keys and
+identity parameters.
This is required only if these files have been
-encrypted.
-<br><dt><code>randfile</code> <kbd>file</kbd><dd>Specifies the location of the random seed file used by the OpenSSL
-library.
-The defaults are described in the main text above.
-<br><dt><code>sign</code> <kbd>file</kbd><dd>Specifies the location of the optional sign key file.
+encrypted.
+</p></dd>
+<dt><code>randfile</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+</p></dd>
+<dt><code>sign</code> <kbd>file</kbd></dt>
+<dd><p>Specifies the location of the optional sign key file.
This overrides
the link
-<span class="file">ntpkey_sign_</span><kbd>hostname</kbd>
-in the keys directory.
+<samp>ntpkey_sign_</samp><kbd>hostname</kbd>
+in the keys directory.
If this file is
-not found, the host key is also the sign key.
+not found, the host key is also the sign key.
+</p></dd>
</dl>
- <br><dt><code>keys</code> <kbd>keyfile</kbd><dd>Specifies the complete path and location of the MD5 key file
+</dd>
+<dt><code>keys</code> <kbd>keyfile</kbd></dt>
+<dd><p>Specifies the complete path and location of the MD5 key file
containing the keys and key identifiers used by
<code>ntpd(1ntpdmdoc)</code>,
<code>ntpq(1ntpqmdoc)</code>
and
<code>ntpdc(1ntpdcmdoc)</code>
-when operating with symmetric key cryptography.
+when operating with symmetric key cryptography.
This is the same operation as the
<code>-k</code>
-command line option.
-<br><dt><code>keysdir</code> <kbd>path</kbd><dd>This command specifies the default directory path for
-cryptographic keys, parameters and certificates.
+command line option.
+</p></dd>
+<dt><code>keysdir</code> <kbd>path</kbd></dt>
+<dd><p>This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
The default is
-<span class="file">/usr/local/etc/</span>.
-<br><dt><code>requestkey</code> <kbd>key</kbd><dd>Specifies the key identifier to use with the
+<samp>/usr/local/etc/</samp>.
+</p></dd>
+<dt><code>requestkey</code> <kbd>key</kbd></dt>
+<dd><p>Specifies the key identifier to use with the
<code>ntpdc(1ntpdcmdoc)</code>
utility program, which uses a
proprietary protocol specific to this implementation of
-<code>ntpd(1ntpdmdoc)</code>.
+<code>ntpd(1ntpdmdoc)</code>.
The
<kbd>key</kbd>
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
-<br><dt><code>revoke</code> <kbd>logsec</kbd><dd>Specifies the interval between re-randomization of certain
+65,535, inclusive.
+</p></dd>
+<dt><code>revoke</code> <kbd>logsec</kbd></dt>
+<dd><p>Specifies the interval between re-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
-seconds.
+seconds.
These values need to be updated frequently in order to
deflect brute-force attacks on the algorithms of the scheme;
-however, updating some values is a relatively expensive operation.
-The default interval is 16 (65,536 s or about 18 hours).
+however, updating some values is a relatively expensive operation.
+The default interval is 16 (65,536 s or about 18 hours).
For poll
intervals above the specified interval, the values will be updated
-for every message sent.
-<br><dt><code>trustedkey</code> <kbd>key</kbd> <kbd>...</kbd><dd>Specifies the key identifiers which are trusted for the
+for every message sent.
+</p></dd>
+<dt><code>trustedkey</code> <kbd>key</kbd> <kbd>...</kbd></dt>
+<dd><p>Specifies the key identifiers which are trusted for the
purposes of authenticating peers with symmetric key cryptography,
as well as keys used by the
<code>ntpq(1ntpqmdoc)</code>
and
<code>ntpdc(1ntpdcmdoc)</code>
-programs.
+programs.
The authentication procedures require that both the local
and remote servers share the same key and key identifier for this
purpose, although different keys can be used with different
-servers.
+servers.
The
<kbd>key</kbd>
arguments are 32-bit unsigned
-integers with values from 1 to 65,534.
+integers with values from 1 to 65,535.
+</p></dd>
</dl>
-
-<h5 class="subsubsection">Error Codes</h5>
-
+<a name="Error-Codes"></a>
+<h4 class="subsubsection">1.1.2.7 Error Codes</h4>
<p>The following error codes are reported via the NTP control
and monitoring protocol trap mechanism.
- <dl>
-<dt>101<dd>(bad field format or length)
-The packet has invalid version, length or format.
-<br><dt>102<dd>(bad timestamp)
-The packet timestamp is the same or older than the most recent received.
-This could be due to a replay or a server clock time step.
-<br><dt>103<dd>(bad filestamp)
-The packet filestamp is the same or older than the most recent received.
-This could be due to a replay or a key file generation error.
-<br><dt>104<dd>(bad or missing public key)
-The public key is missing, has incorrect format or is an unsupported type.
-<br><dt>105<dd>(unsupported digest type)
-The server requires an unsupported digest/signature scheme.
-<br><dt>106<dd>(mismatched digest types)
-Not used.
-<br><dt>107<dd>(bad signature length)
-The signature length does not match the current public key.
-<br><dt>108<dd>(signature not verified)
-The message fails the signature check.
+</p><dl compact="compact">
+<dt>101</dt>
+<dd><p>(bad field format or length)
+The packet has invalid version, length or format.
+</p></dd>
+<dt>102</dt>
+<dd><p>(bad timestamp)
+The packet timestamp is the same or older than the most recent received.
+This could be due to a replay or a server clock time step.
+</p></dd>
+<dt>103</dt>
+<dd><p>(bad filestamp)
+The packet filestamp is the same or older than the most recent received.
+This could be due to a replay or a key file generation error.
+</p></dd>
+<dt>104</dt>
+<dd><p>(bad or missing public key)
+The public key is missing, has incorrect format or is an unsupported type.
+</p></dd>
+<dt>105</dt>
+<dd><p>(unsupported digest type)
+The server requires an unsupported digest/signature scheme.
+</p></dd>
+<dt>106</dt>
+<dd><p>(mismatched digest types)
+Not used.
+</p></dd>
+<dt>107</dt>
+<dd><p>(bad signature length)
+The signature length does not match the current public key.
+</p></dd>
+<dt>108</dt>
+<dd><p>(signature not verified)
+The message fails the signature check.
It could be bogus or signed by a
-different private key.
-<br><dt>109<dd>(certificate not verified)
-The certificate is invalid or signed with the wrong key.
-<br><dt>110<dd>(certificate not verified)
+different private key.
+</p></dd>
+<dt>109</dt>
+<dd><p>(certificate not verified)
+The certificate is invalid or signed with the wrong key.
+</p></dd>
+<dt>110</dt>
+<dd><p>(certificate not verified)
The certificate is not yet valid or has expired or the signature could not
-be verified.
-<br><dt>111<dd>(bad or missing cookie)
-The cookie is missing, corrupted or bogus.
-<br><dt>112<dd>(bad or missing leapseconds table)
-The leapseconds table is missing, corrupted or bogus.
-<br><dt>113<dd>(bad or missing certificate)
-The certificate is missing, corrupted or bogus.
-<br><dt>114<dd>(bad or missing identity)
-The identity key is missing, corrupt or bogus.
+be verified.
+</p></dd>
+<dt>111</dt>
+<dd><p>(bad or missing cookie)
+The cookie is missing, corrupted or bogus.
+</p></dd>
+<dt>112</dt>
+<dd><p>(bad or missing leapseconds table)
+The leapseconds table is missing, corrupted or bogus.
+</p></dd>
+<dt>113</dt>
+<dd><p>(bad or missing certificate)
+The certificate is missing, corrupted or bogus.
+</p></dd>
+<dt>114</dt>
+<dd><p>(bad or missing identity)
+The identity key is missing, corrupt or bogus.
+</p></dd>
</dl>
- <div class="node">
-<p><hr>
+<hr>
<a name="Monitoring-Support"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#Access-Control-Support" accesskey="n" rel="next">Access Control Support</a>, Previous: <a href="#Authentication-Support" accesskey="p" rel="prev">Authentication Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">Monitoring Support</h4>
-
+<a name="Monitoring-Support-1"></a>
+<h4 class="subsection">1.1.3 Monitoring Support</h4>
<p><code>ntpd(1ntpdmdoc)</code>
includes a comprehensive monitoring facility suitable
for continuous, long term recording of server and client
-timekeeping performance.
+timekeeping performance.
See the
<code>statistics</code>
command below
for a listing and example of each type of statistics currently
-supported.
+supported.
Statistic files are managed using file generation sets
and scripts in the
-<span class="file">./scripts</span>
-directory of the source code distribution.
+<samp>./scripts</samp>
+directory of the source code distribution.
Using
these facilities and
-<span class="sc">unix</span>
+<small>UNIX</small>
<code>cron(8)</code>
jobs, the data can be
automatically summarized and archived for retrospective analysis.
-
-<h5 class="subsubsection">Monitoring Commands</h5>
-
- <dl>
-<dt><code>statistics</code> <kbd>name</kbd> <kbd>...</kbd><dd>Enables writing of statistics records.
+</p><a name="Monitoring-Commands"></a>
+<h4 class="subsubsection">1.1.3.1 Monitoring Commands</h4>
+<dl compact="compact">
+<dt><code>statistics</code> <kbd>name</kbd> <kbd>...</kbd></dt>
+<dd><p>Enables writing of statistics records.
Currently, eight kinds of
<kbd>name</kbd>
statistics are supported.
- <dl>
-<dt><code>clockstats</code><dd>Enables recording of clock driver statistics information.
+</p><dl compact="compact">
+<dt><code>clockstats</code></dt>
+<dd><p>Enables recording of clock driver statistics information.
Each update
received from a clock driver appends a line of the following form to
the file generation set named
<code>clockstats</code>:
-<pre class="verbatim">
- 49213 525.624 127.127.4.1 93 226 00:08:29.606 D
- </pre>
-
- <p>The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
+</p><pre class="verbatim">49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+</pre>
+<p>The first two fields show the date (Modified Julian Day) and time
+(seconds and fraction past UTC midnight).
The next field shows the
-clock address in dotted-quad notation.
+clock address in dotted-quad notation.
The final field shows the last
timecode received from the clock in decoded ASCII format, where
-meaningful.
+meaningful.
In some clock drivers a good deal of additional information
-can be gathered and displayed as well.
+can be gathered and displayed as well.
See information specific to each
-clock for further details.
-<br><dt><code>cryptostats</code><dd>This option requires the OpenSSL cryptographic software library.
+clock for further details.
+</p></dd>
+<dt><code>cryptostats</code></dt>
+<dd><p>This option requires the OpenSSL cryptographic software library.
It
-enables recording of cryptographic public key protocol information.
+enables recording of cryptographic public key protocol information.
Each message received by the protocol module appends a line of the
following form to the file generation set named
<code>cryptostats</code>:
-<pre class="verbatim">
- 49213 525.624 127.127.4.1 message
- </pre>
-
- <p>The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
+</p><pre class="verbatim">49213 525.624 127.127.4.1 message
+</pre>
+<p>The first two fields show the date (Modified Julian Day) and time
+(seconds and fraction past UTC midnight).
The next field shows the peer
address in dotted-quad notation, The final message field includes the
-message type and certain ancillary information.
+message type and certain ancillary information.
See the
-<a href="#Authentication-Options">Authentication Options</a>
-section for further information.
-<br><dt><code>loopstats</code><dd>Enables recording of loop filter statistics information.
+&lsquo;Authentication Options&rsquo;
+section for further information.
+</p></dd>
+<dt><code>loopstats</code></dt>
+<dd><p>Enables recording of loop filter statistics information.
Each
update of the local clock outputs a line of the following form to
the file generation set named
<code>loopstats</code>:
-<pre class="verbatim">
- 50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
- </pre>
-
- <p>The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
+</p><pre class="verbatim">50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+</pre>
+<p>The first two fields show the date (Modified Julian Day) and
+time (seconds and fraction past UTC midnight).
The next five fields
show time offset (seconds), frequency offset (parts per million -
PPM), RMS jitter (seconds), Allan deviation (PPM) and clock
-discipline time constant.
-<br><dt><code>peerstats</code><dd>Enables recording of peer statistics information.
+discipline time constant.
+</p></dd>
+<dt><code>peerstats</code></dt>
+<dd><p>Enables recording of peer statistics information.
This includes
statistics records of all peers of a NTP server and of special
-signals, where present and configured.
+signals, where present and configured.
Each valid update appends a
line of the following form to the current element of a file
generation set named
<code>peerstats</code>:
-<pre class="verbatim">
- 48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
- </pre>
-
- <p>The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
+</p><pre class="verbatim">48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
+</pre>
+<p>The first two fields show the date (Modified Julian Day) and
+time (seconds and fraction past UTC midnight).
The next two fields
show the peer address in dotted-quad notation and status,
-respectively.
+respectively.
The status field is encoded in hex in the format
-described in Appendix A of the NTP specification RFC 1305.
+described in Appendix A of the NTP specification RFC 1305.
The final four fields show the offset,
-delay, dispersion and RMS jitter, all in seconds.
-<br><dt><code>rawstats</code><dd>Enables recording of raw-timestamp statistics information.
+delay, dispersion and RMS jitter, all in seconds.
+</p></dd>
+<dt><code>rawstats</code></dt>
+<dd><p>Enables recording of raw-timestamp statistics information.
This
includes statistics records of all peers of a NTP server and of
-special signals, where present and configured.
+special signals, where present and configured.
Each NTP message
received from a peer or clock driver appends a line of the
following form to the file generation set named
<code>rawstats</code>:
-<pre class="verbatim">
- 50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
- </pre>
-
- <p>The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
+</p><pre class="verbatim">50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+</pre>
+<p>The first two fields show the date (Modified Julian Day) and
+time (seconds and fraction past UTC midnight).
The next two fields
show the remote peer or clock address followed by the local address
-in dotted-quad notation.
+in dotted-quad notation.
The final four fields show the originate,
-receive, transmit and final NTP timestamps in order.
+receive, transmit and final NTP timestamps in order.
The timestamp
values are as received and before processing by the various data
-smoothing and mitigation algorithms.
-<br><dt><code>sysstats</code><dd>Enables recording of ntpd statistics counters on a periodic basis.
+smoothing and mitigation algorithms.
+</p></dd>
+<dt><code>sysstats</code></dt>
+<dd><p>Enables recording of ntpd statistics counters on a periodic basis.
Each
hour a line of the following form is appended to the file generation
set named
<code>sysstats</code>:
-<pre class="verbatim">
- 50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
- </pre>
-
- <p>The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
+</p><pre class="verbatim">50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+</pre>
+<p>The first two fields show the date (Modified Julian Day) and time
+(seconds and fraction past UTC midnight).
The remaining ten fields show
the statistics counter values accumulated since the last generated
line.
- <dl>
-<dt>Time since restart <code>36000</code><dd>Time in hours since the system was last rebooted.
-<br><dt>Packets received <code>81965</code><dd>Total number of packets received.
-<br><dt>Packets processed <code>0</code><dd>Number of packets received in response to previous packets sent
-<br><dt>Current version <code>9546</code><dd>Number of packets matching the current NTP version.
-<br><dt>Previous version <code>56</code><dd>Number of packets matching the previous NTP version.
-<br><dt>Bad version <code>71793</code><dd>Number of packets matching neither NTP version.
-<br><dt>Access denied <code>512</code><dd>Number of packets denied access for any reason.
-<br><dt>Bad length or format <code>540</code><dd>Number of packets with invalid length, format or port number.
-<br><dt>Bad authentication <code>10</code><dd>Number of packets not verified as authentic.
-<br><dt>Rate exceeded <code>147</code><dd>Number of packets discarded due to rate limitation.
+</p><dl compact="compact">
+<dt>Time since restart <code>36000</code></dt>
+<dd><p>Time in hours since the system was last rebooted.
+</p></dd>
+<dt>Packets received <code>81965</code></dt>
+<dd><p>Total number of packets received.
+</p></dd>
+<dt>Packets processed <code>0</code></dt>
+<dd><p>Number of packets received in response to previous packets sent
+</p></dd>
+<dt>Current version <code>9546</code></dt>
+<dd><p>Number of packets matching the current NTP version.
+</p></dd>
+<dt>Previous version <code>56</code></dt>
+<dd><p>Number of packets matching the previous NTP version.
+</p></dd>
+<dt>Bad version <code>71793</code></dt>
+<dd><p>Number of packets matching neither NTP version.
+</p></dd>
+<dt>Access denied <code>512</code></dt>
+<dd><p>Number of packets denied access for any reason.
+</p></dd>
+<dt>Bad length or format <code>540</code></dt>
+<dd><p>Number of packets with invalid length, format or port number.
+</p></dd>
+<dt>Bad authentication <code>10</code></dt>
+<dd><p>Number of packets not verified as authentic.
+</p></dd>
+<dt>Rate exceeded <code>147</code></dt>
+<dd><p>Number of packets discarded due to rate limitation.
+</p></dd>
</dl>
- <br><dt><code>statsdir</code> <kbd>directory_path</kbd><dd>Indicates the full path of a directory where statistics files
-should be created (see below).
+</dd>
+<dt><code>statsdir</code> <kbd>directory_path</kbd></dt>
+<dd><p>Indicates the full path of a directory where statistics files
+should be created (see below).
This keyword allows
the (otherwise constant)
<code>filegen</code>
filename prefix to be modified for file generation sets, which
-is useful for handling statistics logs.
-<br><dt><code>filegen</code> <kbd>name</kbd> <code>[file </code><kbd>filename</kbd><code>]</code> <code>[type </code><kbd>typename</kbd><code>]</code> <code>[link | nolink]</code> <code>[enable | disable]</code><dd>Configures setting of generation file set name.
+is useful for handling statistics logs.
+</p></dd>
+<dt><code>filegen</code> <kbd>name</kbd> <code>[<code>file</code> <kbd>filename</kbd>]</code> <code>[<code>type</code> <kbd>typename</kbd>]</code> <code>[<code>link</code> | <code>nolink</code>]</code> <code>[<code>enable</code> | <code>disable</code>]</code></dt>
+<dd><p>Configures setting of generation file set name.
Generation
file sets provide a means for handling files that are
-continuously growing during the lifetime of a server.
-Server statistics are a typical example for such files.
+continuously growing during the lifetime of a server.
+Server statistics are a typical example for such files.
Generation file sets provide access to a set of files used
-to store the actual data.
+to store the actual data.
At any time at most one element
-of the set is being written to.
+of the set is being written to.
The type given specifies
-when and how data will be directed to a new element of the set.
+when and how data will be directed to a new element of the set.
This way, information stored in elements of a file set
that are currently unused are available for administrational
-operations without the risk of disturbing the operation of ntpd.
+operations without the risk of disturbing the operation of ntpd.
(Most important: they can be removed to free space for new data
produced.)
-
- <p>Note that this command can be sent from the
+</p>
+<p>Note that this command can be sent from the
<code>ntpdc(1ntpdcmdoc)</code>
program running at a remote location.
- <dl>
-<dt><code>name</code><dd>This is the type of the statistics records, as shown in the
+</p><dl compact="compact">
+<dt><code>name</code></dt>
+<dd><p>This is the type of the statistics records, as shown in the
<code>statistics</code>
-command.
-<br><dt><code>file</code> <kbd>filename</kbd><dd>This is the file name for the statistics records.
+command.
+</p></dd>
+<dt><code>file</code> <kbd>filename</kbd></dt>
+<dd><p>This is the file name for the statistics records.
Filenames of set
members are built from three concatenated elements
<code>prefix</code>,
<code>filename</code>
and
<code>suffix</code>:
- <dl>
-<dt><code>prefix</code><dd>This is a constant filename path.
+</p><dl compact="compact">
+<dt><code>prefix</code></dt>
+<dd><p>This is a constant filename path.
It is not subject to
modifications via the
<kbd>filegen</kbd>
-option.
+option.
It is defined by the
-server, usually specified as a compile-time constant.
+server, usually specified as a compile-time constant.
It may,
however, be configurable for individual file generation sets
-via other commands.
+via other commands.
For example, the prefix used with
<kbd>loopstats</kbd>
and
<kbd>peerstats</kbd>
generation can be configured using the
<kbd>statsdir</kbd>
-option explained above.
-<br><dt><code>filename</code><dd>This string is directly concatenated to the prefix mentioned
+option explained above.
+</p></dd>
+<dt><code>filename</code></dt>
+<dd><p>This string is directly concatenated to the prefix mentioned
above (no intervening
-/).
+&lsquo;/&rsquo;).
This can be modified using
the file argument to the
<kbd>filegen</kbd>
-statement.
+statement.
No
-<span class="file">..</span>
+<samp>..</samp>
elements are
allowed in this component to prevent filenames referring to
parts outside the filesystem hierarchy denoted by
-<kbd>prefix</kbd>.
-<br><dt><code>suffix</code><dd>This part is reflects individual elements of a file set.
+<kbd>prefix</kbd>.
+</p></dd>
+<dt><code>suffix</code></dt>
+<dd><p>This part is reflects individual elements of a file set.
It is
-generated according to the type of a file set.
+generated according to the type of a file set.
+</p></dd>
</dl>
- <br><dt><code>type</code> <kbd>typename</kbd><dd>A file generation set is characterized by its type.
+</dd>
+<dt><code>type</code> <kbd>typename</kbd></dt>
+<dd><p>A file generation set is characterized by its type.
The following
types are supported:
- <dl>
-<dt><code>none</code><dd>The file set is actually a single plain file.
-<br><dt><code>pid</code><dd>One element of file set is used per incarnation of a ntpd
-server.
+</p><dl compact="compact">
+<dt><code>none</code></dt>
+<dd><p>The file set is actually a single plain file.
+</p></dd>
+<dt><code>pid</code></dt>
+<dd><p>One element of file set is used per incarnation of a ntpd
+server.
This type does not perform any changes to file set
members during runtime, however it provides an easy way of
separating files belonging to different
<code>ntpd(1ntpdmdoc)</code>
-server incarnations.
+server incarnations.
The set member filename is built by appending a
-.
+&lsquo;.&rsquo;
to concatenated
<kbd>prefix</kbd>
and
@@ -1275,399 +1480,445 @@ and
strings, and
appending the decimal representation of the process ID of the
<code>ntpd(1ntpdmdoc)</code>
-server process.
-<br><dt><code>day</code><dd>One file generation set element is created per day.
+server process.
+</p></dd>
+<dt><code>day</code></dt>
+<dd><p>One file generation set element is created per day.
A day is
-defined as the period between 00:00 and 24:00 UTC.
+defined as the period between 00:00 and 24:00 UTC.
The file set
member suffix consists of a
-.
+&lsquo;.&rsquo;
and a day specification in
the form
-<code>YYYYMMdd</code>.
+<code>YYYYMMdd</code>.
<code>YYYY</code>
-is a 4-digit year number (e.g., 1992).
+is a 4-digit year number (e.g., 1992).
<code>MM</code>
-is a two digit month number.
+is a two digit month number.
<code>dd</code>
-is a two digit day number.
+is a two digit day number.
Thus, all information written at 10 December 1992 would end up
in a file named
<kbd>prefix</kbd>
-<kbd>filename</kbd>.19921210.
-<br><dt><code>week</code><dd>Any file set member contains data related to a certain week of
-a year.
+<kbd>filename</kbd>.19921210.
+</p></dd>
+<dt><code>week</code></dt>
+<dd><p>Any file set member contains data related to a certain week of
+a year.
The term week is defined by computing day-of-year
-modulo 7.
+modulo 7.
Elements of such a file generation set are
distinguished by appending the following suffix to the file set
filename base: A dot, a 4-digit year number, the letter
<code>W</code>,
-and a 2-digit week number.
+and a 2-digit week number.
For example, information from January,
10th 1992 would end up in a file with suffix
-.No . Ns Ar 1992W1 .
-<br><dt><code>month</code><dd>One generation file set element is generated per month.
+.No . Ns Ar 1992W1 .
+</p></dd>
+<dt><code>month</code></dt>
+<dd><p>One generation file set element is generated per month.
The
file name suffix consists of a dot, a 4-digit year number, and
-a 2-digit month.
-<br><dt><code>year</code><dd>One generation file element is generated per year.
+a 2-digit month.
+</p></dd>
+<dt><code>year</code></dt>
+<dd><p>One generation file element is generated per year.
The filename
-suffix consists of a dot and a 4 digit year number.
-<br><dt><code>age</code><dd>This type of file generation sets changes to a new element of
-the file set every 24 hours of server operation.
+suffix consists of a dot and a 4 digit year number.
+</p></dd>
+<dt><code>age</code></dt>
+<dd><p>This type of file generation sets changes to a new element of
+the file set every 24 hours of server operation.
The filename
suffix consists of a dot, the letter
<code>a</code>,
-and an 8-digit number.
+and an 8-digit number.
This number is taken to be the number of seconds the server is
-running at the start of the corresponding 24-hour period.
+running at the start of the corresponding 24-hour period.
Information is only written to a file generation by specifying
<code>enable</code>;
output is prevented by specifying
-<code>disable</code>.
+<code>disable</code>.
+</p></dd>
</dl>
- <br><dt><code>link</code> | <code>nolink</code><dd>It is convenient to be able to access the current element of a file
-generation set by a fixed name.
+</dd>
+<dt><code>link</code> | <code>nolink</code></dt>
+<dd><p>It is convenient to be able to access the current element of a file
+generation set by a fixed name.
This feature is enabled by
specifying
<code>link</code>
and disabled using
-<code>nolink</code>.
+<code>nolink</code>.
If link is specified, a
hard link from the current file set element to a file without
-suffix is created.
+suffix is created.
When there is already a file with this name and
the number of links of this file is one, it is renamed appending a
dot, the letter
<code>C</code>,
and the pid of the
<code>ntpd(1ntpdmdoc)</code>
-server process.
+server process.
When the
-number of links is greater than one, the file is unlinked.
+number of links is greater than one, the file is unlinked.
This
-allows the current file to be accessed by a constant name.
-<br><dt><code>enable</code> <code>|</code> <code>disable</code><dd>Enables or disables the recording function.
+allows the current file to be accessed by a constant name.
+</p></dd>
+<dt><code>enable</code> <code>|</code> <code>disable</code></dt>
+<dd><p>Enables or disables the recording function.
+</p></dd>
+</dl>
+</dd>
+</dl>
+</dd>
</dl>
- </dl>
- </dl>
-<div class="node">
-<p><hr>
+<hr>
<a name="Access-Control-Support"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#Automatic-NTP-Configuration-Options" accesskey="n" rel="next">Automatic NTP Configuration Options</a>, Previous: <a href="#Monitoring-Support" accesskey="p" rel="prev">Monitoring Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">Access Control Support</h4>
-
+<a name="Access-Control-Support-1"></a>
+<h4 class="subsection">1.1.4 Access Control Support</h4>
<p>The
<code>ntpd(1ntpdmdoc)</code>
daemon implements a general purpose address/mask based restriction
-list.
+list.
The list contains address/match entries sorted first
-by increasing address values and and then by increasing mask values.
+by increasing address values and and then by increasing mask values.
A match occurs when the bitwise AND of the mask and the packet
source address is equal to the bitwise AND of the mask and
-address in the list.
+address in the list.
The list is searched in order with the
last match found defining the restriction flags associated
-with the entry.
+with the entry.
Additional information and examples can be found in the
-"Notes on Configuring NTP and Setting up a NTP Subnet"
+&quot;Notes on Configuring NTP and Setting up a NTP Subnet&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
-
- <p>The restriction facility was implemented in conformance
+<samp>/usr/share/doc/ntp</samp>).
+</p>
+<p>The restriction facility was implemented in conformance
with the access policies for the original NSFnet backbone
-time servers.
+time servers.
Later the facility was expanded to deflect
-cryptographic and clogging attacks.
+cryptographic and clogging attacks.
While this facility may
be useful for keeping unwanted or broken or malicious clients
from congesting innocent servers, it should not be considered
-an alternative to the NTP authentication facilities.
+an alternative to the NTP authentication facilities.
Source address based restrictions are easily circumvented
by a determined cracker.
-
- <p>Clients can be denied service because they are explicitly
+</p>
+<p>Clients can be denied service because they are explicitly
included in the restrict list created by the
<code>restrict</code>
command
or implicitly as the result of cryptographic or rate limit
-violations.
+violations.
Cryptographic violations include certificate
or identity verification failure; rate limit violations generally
result from defective NTP implementations that send packets
-at abusive rates.
+at abusive rates.
Some violations cause denied service
only for the offending packet, others cause denied service
for a timed period and others cause the denied service for
-an indefinite period.
+an indefinite period.
When a client or network is denied access
for an indefinite period, the only way at present to remove
the restrictions is by restarting the server.
-
-<h5 class="subsubsection">The Kiss-of-Death Packet</h5>
-
+</p><a name="The-Kiss_002dof_002dDeath-Packet"></a>
+<h4 class="subsubsection">1.1.4.1 The Kiss-of-Death Packet</h4>
<p>Ordinarily, packets denied service are simply dropped with no
-further action except incrementing statistics counters.
+further action except incrementing statistics counters.
Sometimes a
more proactive response is needed, such as a server message that
explicitly requests the client to stop sending and leave a message
-for the system operator.
+for the system operator.
A special packet format has been created
-for this purpose called the "kiss-of-death" (KoD) packet.
+for this purpose called the &quot;kiss-of-death&quot; (KoD) packet.
KoD packets have the leap bits set unsynchronized and stratum set
to zero and the reference identifier field set to a four-byte
-ASCII code.
+ASCII code.
If the
<code>noserve</code>
or
<code>notrust</code>
flag of the matching restrict list entry is set,
-the code is "DENY"; if the
+the code is &quot;DENY&quot;; if the
<code>limited</code>
flag is set and the rate limit
-is exceeded, the code is "RATE".
-Finally, if a cryptographic violation occurs, the code is "CRYP".
-
- <p>A client receiving a KoD performs a set of sanity checks to
+is exceeded, the code is &quot;RATE&quot;.
+Finally, if a cryptographic violation occurs, the code is &quot;CRYP&quot;.
+</p>
+<p>A client receiving a KoD performs a set of sanity checks to
minimize security exposure, then updates the stratum and
reference identifier peer variables, sets the access
denied (TEST4) bit in the peer flash variable and sends
-a message to the log.
+a message to the log.
As long as the TEST4 bit is set,
-the client will send no further packets to the server.
+the client will send no further packets to the server.
The only way at present to recover from this condition is
-to restart the protocol at both the client and server.
+to restart the protocol at both the client and server.
This
-happens automatically at the client when the association times out.
+happens automatically at the client when the association times out.
It will happen at the server only if the server operator cooperates.
-
-<h5 class="subsubsection">Access Control Commands</h5>
-
- <dl>
-<dt><code>discard</code> <code>[average </code><kbd>avg</kbd><code>]</code> <code>[minimum </code><kbd>min</kbd><code>]</code> <code>[monitor </code><kbd>prob</kbd><code>]</code><dd>Set the parameters of the
+</p><a name="Access-Control-Commands"></a>
+<h4 class="subsubsection">1.1.4.2 Access Control Commands</h4>
+<dl compact="compact">
+<dt><code>discard</code> <code>[<code>average</code> <kbd>avg</kbd>]</code> <code>[<code>minimum</code> <kbd>min</kbd>]</code> <code>[<code>monitor</code> <kbd>prob</kbd>]</code></dt>
+<dd><p>Set the parameters of the
<code>limited</code>
facility which protects the server from
-client abuse.
+client abuse.
The
<code>average</code>
subcommand specifies the minimum average packet
spacing, while the
<code>minimum</code>
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing.
Packets that violate these minima are discarded
-and a kiss-o'-death packet returned if enabled.
+and a kiss-o&rsquo;-death packet returned if enabled.
The default
-minimum average and minimum are 5 and 2, respectively.
+minimum average and minimum are 5 and 2, respectively.
The
<code>monitor</code>
subcommand specifies the probability of discard
-for packets that overflow the rate-control window.
-<br><dt><code>restrict</code> <code>address</code> <code>[mask </code><kbd>mask</kbd><code>]</code> <code>[ippeerlimit </code><kbd>int</kbd><code>]</code> <code>[</code><kbd>flag</kbd> <kbd>...</kbd><code>]</code><dd>The
+for packets that overflow the rate-control window.
+</p></dd>
+<dt><code>restrict</code> <code>address</code> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt>
+<dd><p>The
<kbd>address</kbd>
argument expressed in
-dotted-quad form is the address of a host or network.
+dotted-quad form is the address of a host or network.
Alternatively, the
<kbd>address</kbd>
-argument can be a valid host DNS name.
+argument can be a valid host DNS name.
The
<kbd>mask</kbd>
argument expressed in dotted-quad form defaults to
<code>255.255.255.255</code>,
meaning that the
<kbd>address</kbd>
-is treated as the address of an individual host.
+is treated as the address of an individual host.
A default entry (address
<code>0.0.0.0</code>,
mask
<code>0.0.0.0</code>)
-is always included and is always the first entry in the list.
+is always included and is always the first entry in the list.
Note that text string
<code>default</code>,
with no mask option, may
-be used to indicate the default entry.
+be used to indicate the default entry.
The
<code>ippeerlimit</code>
directive limits the number of peer requests for each IP to
<kbd>int</kbd>,
-where a value of -1 means "unlimited", the current default.
-A value of 0 means "none".
+where a value of -1 means &quot;unlimited&quot;, the current default.
+A value of 0 means &quot;none&quot;.
There would usually be at most 1 peering request per IP,
but if the remote peering requests are behind a proxy
-there could well be more than 1 per IP.
+there could well be more than 1 per IP.
In the current implementation,
<code>flag</code>
always
restricts access, i.e., an entry with no flags indicates that free
-access to the server is to be given.
+access to the server is to be given.
The flags are not orthogonal,
in that more restrictive flags will often make less restrictive
-ones redundant.
+ones redundant.
The flags can generally be classed into two
categories, those which restrict time service and those which
restrict informational queries and attempts to do run-time
-reconfiguration of the server.
+reconfiguration of the server.
One or more of the following flags
may be specified:
- <dl>
-<dt><code>ignore</code><dd>Deny packets of all kinds, including
+</p><dl compact="compact">
+<dt><code>ignore</code></dt>
+<dd><p>Deny packets of all kinds, including
<code>ntpq(1ntpqmdoc)</code>
and
<code>ntpdc(1ntpdcmdoc)</code>
-queries.
-<br><dt><code>kod</code><dd>If this flag is set when an access violation occurs, a kiss-o'-death
-(KoD) packet is sent.
+queries.
+</p></dd>
+<dt><code>kod</code></dt>
+<dd><p>If this flag is set when an access violation occurs, a kiss-o&rsquo;-death
+(KoD) packet is sent.
KoD packets are rate limited to no more than one
-per second.
+per second.
If another KoD packet occurs within one second after the
-last one, the packet is dropped.
-<br><dt><code>limited</code><dd>Deny service if the packet spacing violates the lower limits specified
+last one, the packet is dropped.
+</p></dd>
+<dt><code>limited</code></dt>
+<dd><p>Deny service if the packet spacing violates the lower limits specified
in the
<code>discard</code>
-command.
+command.
A history of clients is kept using the
monitoring capability of
-<code>ntpd(1ntpdmdoc)</code>.
+<code>ntpd(1ntpdmdoc)</code>.
Thus, monitoring is always active as
long as there is a restriction entry with the
<code>limited</code>
-flag.
-<br><dt><code>lowpriotrap</code><dd>Declare traps set by matching hosts to be low priority.
+flag.
+</p></dd>
+<dt><code>lowpriotrap</code></dt>
+<dd><p>Declare traps set by matching hosts to be low priority.
The
number of traps a server can maintain is limited (the current limit
-is 3).
+is 3).
Traps are usually assigned on a first come, first served
-basis, with later trap requestors being denied service.
+basis, with later trap requestors being denied service.
This flag
modifies the assignment algorithm by allowing low priority traps to
-be overridden by later requests for normal priority traps.
-<br><dt><code>noepeer</code><dd>Deny ephemeral peer requests,
-even if they come from an authenticated source.
+be overridden by later requests for normal priority traps.
+</p></dd>
+<dt><code>noepeer</code></dt>
+<dd><p>Deny ephemeral peer requests,
+even if they come from an authenticated source.
Note that the ability to use a symmetric key for authentication may be restricted to
one or more IPs or subnets via the third field of the
-<span class="file">ntp.keys</span>
-file.
+<samp>ntp.keys</samp>
+file.
This restriction is not enabled by default,
-to maintain backward compatability.
+to maintain backward compatability.
Expect
<code>noepeer</code>
-to become the default in ntp-4.4.
-<br><dt><code>nomodify</code><dd>Deny
+to become the default in ntp-4.4.
+</p></dd>
+<dt><code>nomodify</code></dt>
+<dd><p>Deny
<code>ntpq(1ntpqmdoc)</code>
and
<code>ntpdc(1ntpdcmdoc)</code>
queries which attempt to modify the state of the
-server (i.e., run time reconfiguration).
+server (i.e., run time reconfiguration).
Queries which return
-information are permitted.
-<br><dt><code>noquery</code><dd>Deny
+information are permitted.
+</p></dd>
+<dt><code>noquery</code></dt>
+<dd><p>Deny
<code>ntpq(1ntpqmdoc)</code>
and
<code>ntpdc(1ntpdcmdoc)</code>
-queries.
-Time service is not affected.
-<br><dt><code>nopeer</code><dd>Deny unauthenticated packets which would result in mobilizing a new association.
+queries.
+Time service is not affected.
+</p></dd>
+<dt><code>nopeer</code></dt>
+<dd><p>Deny unauthenticated packets which would result in mobilizing a new association.
This includes
broadcast and symmetric active packets
-when a configured association does not exist.
+when a configured association does not exist.
It also includes
<code>pool</code>
-associations, so if you want to use servers from a
+associations, so if you want to use servers from a
<code>pool</code>
directive and also want to use
<code>nopeer</code>
-by default, you'll want a
+by default, you&rsquo;ll want a
<code>restrict source ...</code>
line as well that does
<em>not</em>
include the
<code>nopeer</code>
-directive.
-<br><dt><code>noserve</code><dd>Deny all packets except
+directive.
+</p></dd>
+<dt><code>noserve</code></dt>
+<dd><p>Deny all packets except
<code>ntpq(1ntpqmdoc)</code>
and
<code>ntpdc(1ntpdcmdoc)</code>
-queries.
-<br><dt><code>notrap</code><dd>Decline to provide mode 6 control message trap service to matching
-hosts.
+queries.
+</p></dd>
+<dt><code>notrap</code></dt>
+<dd><p>Decline to provide mode 6 control message trap service to matching
+hosts.
The trap service is a subsystem of the
<code>ntpq(1ntpqmdoc)</code>
control message
-protocol which is intended for use by remote event logging programs.
-<br><dt><code>notrust</code><dd>Deny service unless the packet is cryptographically authenticated.
-<br><dt><code>ntpport</code><dd>This is actually a match algorithm modifier, rather than a
-restriction flag.
+protocol which is intended for use by remote event logging programs.
+</p></dd>
+<dt><code>notrust</code></dt>
+<dd><p>Deny service unless the packet is cryptographically authenticated.
+</p></dd>
+<dt><code>ntpport</code></dt>
+<dd><p>This is actually a match algorithm modifier, rather than a
+restriction flag.
Its presence causes the restriction entry to be
matched only if the source port in the packet is the standard NTP
-UDP port (123).
+UDP port (123).
Both
<code>ntpport</code>
and
<code>non-ntpport</code>
may
-be specified.
+be specified.
The
<code>ntpport</code>
is considered more specific and
-is sorted later in the list.
-<br><dt><code>version</code><dd>Deny packets that do not match the current NTP version.
+is sorted later in the list.
+</p></dd>
+<dt><code>version</code></dt>
+<dd><p>Deny packets that do not match the current NTP version.
+</p></dd>
</dl>
- <p>Default restriction list entries with the flags ignore, interface,
-ntpport, for each of the local host's interface addresses are
+<p>Default restriction list entries with the flags ignore, interface,
+ntpport, for each of the local host&rsquo;s interface addresses are
inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
+from attempting to synchronize to its own time.
A default entry is also always present, though if it is
otherwise unconfigured; no flags are associated
with the default entry (i.e., everything besides your own
-NTP server is unrestricted).
+NTP server is unrestricted).
+</p></dd>
</dl>
-<div class="node">
-<p><hr>
+<hr>
<a name="Automatic-NTP-Configuration-Options"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#Reference-Clock-Support" accesskey="n" rel="next">Reference Clock Support</a>, Previous: <a href="#Access-Control-Support" accesskey="p" rel="prev">Access Control Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">Automatic NTP Configuration Options</h4>
-
-<h5 class="subsubsection">Manycasting</h5>
-
+<a name="Automatic-NTP-Configuration-Options-1"></a>
+<h4 class="subsection">1.1.5 Automatic NTP Configuration Options</h4>
+<a name="Manycasting"></a>
+<h4 class="subsubsection">1.1.5.1 Manycasting</h4>
<p>Manycasting is a automatic discovery and configuration paradigm
-new to NTPv4.
+new to NTPv4.
It is intended as a means for a multicast client
to troll the nearby network neighborhood to find cooperating
manycast servers, validate them using cryptographic means
and evaluate their time values with respect to other servers
-that might be lurking in the vicinity.
+that might be lurking in the vicinity.
The intended result is that each manycast client mobilizes
-client associations with some number of the "best"
+client associations with some number of the &quot;best&quot;
of the nearby manycast servers, yet automatically reconfigures
to sustain this number of servers should one or another fail.
-
- <p>Note that the manycasting paradigm does not coincide
+</p>
+<p>Note that the manycasting paradigm does not coincide
with the anycast paradigm described in RFC-1546,
which is designed to find a single server from a clique
-of servers providing the same service.
+of servers providing the same service.
The manycast paradigm is designed to find a plurality
of redundant servers satisfying defined optimality criteria.
-
- <p>Manycasting can be used with either symmetric key
-or public key cryptography.
+</p>
+<p>Manycasting can be used with either symmetric key
+or public key cryptography.
The public key infrastructure (PKI)
offers the best protection against compromised keys
and is generally considered stronger, at least with relatively
-large key sizes.
+large key sizes.
It is implemented using the Autokey protocol and
the OpenSSL cryptographic library available from
-<code>http://www.openssl.org/</code>.
+<code>http://www.openssl.org/</code>.
The library can also be used with other NTPv4 modes
as well and is highly recommended, especially for broadcast modes.
-
- <p>A persistent manycast client association is configured
+</p>
+<p>A persistent manycast client association is configured
using the
<code>manycastclient</code>
command, which is similar to the
@@ -1676,62 +1927,62 @@ command but with a multicast (IPv4 class
<code>D</code>
or IPv6 prefix
<code>FF</code>)
-group address.
+group address.
The IANA has designated IPv4 address 224.1.1.1
-and IPv6 address FF05::101 (site local) for NTP.
+and IPv6 address FF05::101 (site local) for NTP.
When more servers are needed, it broadcasts manycast
client messages to this address at the minimum feasible rate
and minimum feasible time-to-live (TTL) hops, depending
-on how many servers have already been found.
+on how many servers have already been found.
There can be as many manycast client associations
as different group address, each one serving as a template
for a future ephemeral unicast client/server association.
-
- <p>Manycast servers configured with the
+</p>
+<p>Manycast servers configured with the
<code>manycastserver</code>
command listen on the specified group address for manycast
-client messages.
+client messages.
Note the distinction between manycast client,
which actively broadcasts messages, and manycast server,
-which passively responds to them.
+which passively responds to them.
If a manycast server is
in scope of the current TTL and is itself synchronized
to a valid source and operating at a stratum level equal
to or lower than the manycast client, it replies to the
manycast client message with an ordinary unicast server message.
-
- <p>The manycast client receiving this message mobilizes
+</p>
+<p>The manycast client receiving this message mobilizes
an ephemeral client/server association according to the
matching manycast client template, but only if cryptographically
authenticated and the server stratum is less than or equal
-to the client stratum.
+to the client stratum.
Authentication is explicitly required
-and either symmetric key or public key (Autokey) can be used.
+and either symmetric key or public key (Autokey) can be used.
Then, the client polls the server at its unicast address
in burst mode in order to reliably set the host clock
-and validate the source.
+and validate the source.
This normally results
in a volley of eight client/server at 2-s intervals
during which both the synchronization and cryptographic
-protocols run concurrently.
+protocols run concurrently.
Following the volley,
the client runs the NTP intersection and clustering
-algorithms, which act to discard all but the "best"
+algorithms, which act to discard all but the &quot;best&quot;
associations according to stratum and synchronization
-distance.
+distance.
The surviving associations then continue
in ordinary client/server mode.
-
- <p>The manycast client polling strategy is designed to reduce
+</p>
+<p>The manycast client polling strategy is designed to reduce
as much as possible the volume of manycast client messages
and the effects of implosion due to near-simultaneous
-arrival of manycast server messages.
+arrival of manycast server messages.
The strategy is determined by the
<code>manycastclient</code>,
<code>tos</code>
and
<code>ttl</code>
-configuration commands.
+configuration commands.
The manycast poll interval is
normally eight times the system poll interval,
which starts out at the
@@ -1740,17 +1991,17 @@ value specified in the
<code>manycastclient</code>,
command and, under normal circumstances, increments to the
<code>maxpolll</code>
-value specified in this command.
+value specified in this command.
Initially, the TTL is
set at the minimum hops specified by the
<code>ttl</code>
-command.
+command.
At each retransmission the TTL is increased until reaching
the maximum hops specified by this command or a sufficient
-number client associations have been found.
+number client associations have been found.
Further retransmissions use the same TTL.
-
- <p>The quality and reliability of the suite of associations
+</p>
+<p>The quality and reliability of the suite of associations
discovered by the manycast client is determined by the NTP
mitigation algorithms and the
<code>minclock</code>
@@ -1758,66 +2009,66 @@ and
<code>minsane</code>
values specified in the
<code>tos</code>
-configuration command.
+configuration command.
At least
<code>minsane</code>
candidate servers must be available and the mitigation
algorithms produce at least
<code>minclock</code>
-survivors in order to synchronize the clock.
+survivors in order to synchronize the clock.
Byzantine agreement principles require at least four
-candidates in order to correctly discard a single falseticker.
+candidates in order to correctly discard a single falseticker.
For legacy purposes,
<code>minsane</code>
defaults to 1 and
<code>minclock</code>
-defaults to 3.
+defaults to 3.
For manycast service
<code>minsane</code>
should be explicitly set to 4, assuming at least that
number of servers are available.
-
- <p>If at least
+</p>
+<p>If at least
<code>minclock</code>
servers are found, the manycast poll interval is immediately
set to eight times
-<code>maxpoll</code>.
+<code>maxpoll</code>.
If less than
<code>minclock</code>
servers are found when the TTL has reached the maximum hops,
-the manycast poll interval is doubled.
+the manycast poll interval is doubled.
For each transmission
after that, the poll interval is doubled again until
reaching the maximum of eight times
-<code>maxpoll</code>.
+<code>maxpoll</code>.
Further transmissions use the same poll interval and
-TTL values.
+TTL values.
Note that while all this is going on,
each client/server association found is operating normally
it the system poll interval.
-
- <p>Administratively scoped multicast boundaries are normally
+</p>
+<p>Administratively scoped multicast boundaries are normally
specified by the network router configuration and,
-in the case of IPv6, the link/site scope prefix.
+in the case of IPv6, the link/site scope prefix.
By default, the increment for TTL hops is 32 starting
from 31; however, the
<code>ttl</code>
configuration command can be
used to modify the values to match the scope rules.
-
- <p>It is often useful to narrow the range of acceptable
-servers which can be found by manycast client associations.
+</p>
+<p>It is often useful to narrow the range of acceptable
+servers which can be found by manycast client associations.
Because manycast servers respond only when the client
stratum is equal to or greater than the server stratum,
primary (stratum 1) servers fill find only primary servers
-in TTL range, which is probably the most common objective.
+in TTL range, which is probably the most common objective.
However, unless configured otherwise, all manycast clients
in TTL range will eventually find all primary servers
in TTL range, which is probably not the most common
-objective in large networks.
+objective in large networks.
The
<code>tos</code>
-command can be used to modify this behavior.
+command can be used to modify this behavior.
Servers with stratum below
<code>floor</code>
or above
@@ -1829,270 +2080,283 @@ process; however, these servers may be temporally
accepted if the number of servers within TTL range is
less than
<code>minclock</code>.
-
- <p>The above actions occur for each manycast client message,
-which repeats at the designated poll interval.
+</p>
+<p>The above actions occur for each manycast client message,
+which repeats at the designated poll interval.
However, once the ephemeral client association is mobilized,
subsequent manycast server replies are discarded,
-since that would result in a duplicate association.
+since that would result in a duplicate association.
If during a poll interval the number of client associations
falls below
<code>minclock</code>,
all manycast client prototype associations are reset
to the initial poll interval and TTL hops and operation
-resumes from the beginning.
+resumes from the beginning.
It is important to avoid
frequent manycast client messages, since each one requires
-all manycast servers in TTL range to respond.
+all manycast servers in TTL range to respond.
The result could well be an implosion, either minor or major,
-depending on the number of servers in range.
+depending on the number of servers in range.
The recommended value for
<code>maxpoll</code>
is 12 (4,096 s).
-
- <p>It is possible and frequently useful to configure a host
-as both manycast client and manycast server.
+</p>
+<p>It is possible and frequently useful to configure a host
+as both manycast client and manycast server.
A number of hosts configured this way and sharing a common
group address will automatically organize themselves
in an optimum configuration based on stratum and
-synchronization distance.
+synchronization distance.
For example, consider an NTP
subnet of two primary servers and a hundred or more
-dependent clients.
+dependent clients.
With two exceptions, all servers
and clients have identical configuration files including both
<code>multicastclient</code>
and
<code>multicastserver</code>
commands using, for instance, multicast group address
-239.1.1.1.
+239.1.1.1.
The only exception is that each primary server
configuration file must include commands for the primary
reference source such as a GPS receiver.
-
- <p>The remaining configuration files for all secondary
+</p>
+<p>The remaining configuration files for all secondary
servers and clients have the same contents, except for the
<code>tos</code>
-command, which is specific for each stratum level.
+command, which is specific for each stratum level.
For stratum 1 and stratum 2 servers, that command is
-not necessary.
+not necessary.
For stratum 3 and above servers the
<code>floor</code>
-value is set to the intended stratum number.
+value is set to the intended stratum number.
Thus, all stratum 3 configuration files are identical,
all stratum 4 files are identical and so forth.
-
- <p>Once operations have stabilized in this scenario,
+</p>
+<p>Once operations have stabilized in this scenario,
the primary servers will find the primary reference source
and each other, since they both operate at the same
stratum (1), but not with any secondary server or client,
-since these operate at a higher stratum.
+since these operate at a higher stratum.
The secondary
-servers will find the servers at the same stratum level.
+servers will find the servers at the same stratum level.
If one of the primary servers loses its GPS receiver,
it will continue to operate as a client and other clients
will time out the corresponding association and
re-associate accordingly.
-
- <p>Some administrators prefer to avoid running
+</p>
+<p>Some administrators prefer to avoid running
<code>ntpd(1ntpdmdoc)</code>
continuously and run either
<code>sntp(1sntpmdoc)</code>
or
<code>ntpd(1ntpdmdoc)</code>
<code>-q</code>
-as a cron job.
+as a cron job.
In either case the servers must be
configured in advance and the program fails if none are
-available when the cron job runs.
+available when the cron job runs.
A really slick
application of manycast is with
<code>ntpd(1ntpdmdoc)</code>
-<code>-q</code>.
+<code>-q</code>.
The program wakes up, scans the local landscape looking
for the usual suspects, selects the best from among
-the rascals, sets the clock and then departs.
+the rascals, sets the clock and then departs.
Servers do not have to be configured in advance and
all clients throughout the network can have the same
configuration file.
-
-<h5 class="subsubsection">Manycast Interactions with Autokey</h5>
-
+</p><a name="Manycast-Interactions-with-Autokey"></a>
+<h4 class="subsubsection">1.1.5.2 Manycast Interactions with Autokey</h4>
<p>Each time a manycast client sends a client mode packet
to a multicast group address, all manycast servers
in scope generate a reply including the host name
-and status word.
+and status word.
The manycast clients then run
the Autokey protocol, which collects and verifies
-all certificates involved.
+all certificates involved.
Following the burst interval
all but three survivors are cast off,
-but the certificates remain in the local cache.
+but the certificates remain in the local cache.
It often happens that several complete signing trails
from the client to the primary servers are collected in this way.
-
- <p>About once an hour or less often if the poll interval
-exceeds this, the client regenerates the Autokey key list.
-This is in general transparent in client/server mode.
+</p>
+<p>About once an hour or less often if the poll interval
+exceeds this, the client regenerates the Autokey key list.
+This is in general transparent in client/server mode.
However, about once per day the server private value
used to generate cookies is refreshed along with all
-manycast client associations.
+manycast client associations.
In this case all
-cryptographic values including certificates is refreshed.
+cryptographic values including certificates is refreshed.
If a new certificate has been generated since
the last refresh epoch, it will automatically revoke
all prior certificates that happen to be in the
-certificate cache.
+certificate cache.
At the same time, the manycast
scheme starts all over from the beginning and
the expanding ring shrinks to the minimum and increments
from there while collecting all servers in scope.
-
-<h5 class="subsubsection">Broadcast Options</h5>
-
- <dl>
-<dt><code>tos</code> <code>[bcpollbstep </code><kbd>gate</kbd><code>]</code><dd>This command provides a way to delay,
+</p><a name="Broadcast-Options"></a>
+<h4 class="subsubsection">1.1.5.3 Broadcast Options</h4>
+<dl compact="compact">
+<dt><code>tos</code> <code>[<code>bcpollbstep</code> <kbd>gate</kbd>]</code></dt>
+<dd><p>This command provides a way to delay,
by the specified number of broadcast poll intervals,
-believing backward time steps from a broadcast server.
-Broadcast time networks are expected to be trusted.
-In the event a broadcast server's time is stepped backwards,
+believing backward time steps from a broadcast server.
+Broadcast time networks are expected to be trusted.
+In the event a broadcast server&rsquo;s time is stepped backwards,
there is clear benefit to having the clients notice this change
-as soon as possible.
+as soon as possible.
Attacks such as replay attacks can happen, however,
and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
+broadcast mode, attempts to perform a replay attack are possible.
This value defaults to 0, but can be changed
-to any number of poll intervals between 0 and 4.
+to any number of poll intervals between 0 and 4.
+</p></dd>
</dl>
-
-<h5 class="subsubsection">Manycast Options</h5>
-
- <dl>
-<dt><code>tos</code> <code>[ceiling </code><kbd>ceiling</kbd><code> | cohort { 0 | 1 } | floor </code><kbd>floor</kbd><code> | minclock </code><kbd>minclock</kbd><code> | minsane </code><kbd>minsane</kbd><code>]</code><dd>This command affects the clock selection and clustering
-algorithms.
+<a name="Manycast-Options"></a>
+<h4 class="subsubsection">1.1.5.4 Manycast Options</h4>
+<dl compact="compact">
+<dt><code>tos</code> <code>[<code>ceiling</code> <kbd>ceiling</kbd> | <code>cohort</code> <code>{</code> <code>0</code> | <code>1</code> <code>}</code> | <code>floor</code> <kbd>floor</kbd> | <code>minclock</code> <kbd>minclock</kbd> | <code>minsane</code> <kbd>minsane</kbd>]</code></dt>
+<dd><p>This command affects the clock selection and clustering
+algorithms.
It can be used to select the quality and
quantity of peers used to synchronize the system clock
-and is most useful in manycast mode.
+and is most useful in manycast mode.
The variables operate
as follows:
- <dl>
-<dt><code>ceiling</code> <kbd>ceiling</kbd><dd>Peers with strata above
+</p><dl compact="compact">
+<dt><code>ceiling</code> <kbd>ceiling</kbd></dt>
+<dd><p>Peers with strata above
<code>ceiling</code>
will be discarded if there are at least
<code>minclock</code>
-peers remaining.
+peers remaining.
This value defaults to 15, but can be changed
-to any number from 1 to 15.
-<br><dt><code>cohort</code> <code>{0 | 1}</code><dd>This is a binary flag which enables (0) or disables (1)
+to any number from 1 to 15.
+</p></dd>
+<dt><code>cohort</code> <code>{0 | 1}</code></dt>
+<dd><p>This is a binary flag which enables (0) or disables (1)
manycast server replies to manycast clients with the same
-stratum level.
+stratum level.
This is useful to reduce implosions where
large numbers of clients with the same stratum level
-are present.
-The default is to enable these replies.
-<br><dt><code>floor</code> <kbd>floor</kbd><dd>Peers with strata below
+are present.
+The default is to enable these replies.
+</p></dd>
+<dt><code>floor</code> <kbd>floor</kbd></dt>
+<dd><p>Peers with strata below
<code>floor</code>
will be discarded if there are at least
<code>minclock</code>
-peers remaining.
+peers remaining.
This value defaults to 1, but can be changed
-to any number from 1 to 15.
-<br><dt><code>minclock</code> <kbd>minclock</kbd><dd>The clustering algorithm repeatedly casts out outlier
+to any number from 1 to 15.
+</p></dd>
+<dt><code>minclock</code> <kbd>minclock</kbd></dt>
+<dd><p>The clustering algorithm repeatedly casts out outlier
associations until no more than
<code>minclock</code>
-associations remain.
+associations remain.
This value defaults to 3,
but can be changed to any number from 1 to the number of
-configured sources.
-<br><dt><code>minsane</code> <kbd>minsane</kbd><dd>This is the minimum number of candidates available
+configured sources.
+</p></dd>
+<dt><code>minsane</code> <kbd>minsane</kbd></dt>
+<dd><p>This is the minimum number of candidates available
to the clock selection algorithm in order to produce
-one or more truechimers for the clustering algorithm.
+one or more truechimers for the clustering algorithm.
If fewer than this number are available, the clock is
-undisciplined and allowed to run free.
+undisciplined and allowed to run free.
The default is 1
-for legacy purposes.
+for legacy purposes.
However, according to principles of
Byzantine agreement,
<code>minsane</code>
should be at least 4 in order to detect and discard
-a single falseticker.
+a single falseticker.
+</p></dd>
</dl>
- <br><dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd><dd>This command specifies a list of TTL values in increasing
-order, up to 8 values can be specified.
+</dd>
+<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt>
+<dd><p>This command specifies a list of TTL values in increasing
+order, up to 8 values can be specified.
In manycast mode these values are used in turn
-in an expanding-ring search.
+in an expanding-ring search.
The default is eight
-multiples of 32 starting at 31.
+multiples of 32 starting at 31.
+</p></dd>
</dl>
-<div class="node">
-<p><hr>
+<hr>
<a name="Reference-Clock-Support"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#Miscellaneous-Options" accesskey="n" rel="next">Miscellaneous Options</a>, Previous: <a href="#Automatic-NTP-Configuration-Options" accesskey="p" rel="prev">Automatic NTP Configuration Options</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">Reference Clock Support</h4>
-
+<a name="Reference-Clock-Support-1"></a>
+<h4 class="subsection">1.1.6 Reference Clock Support</h4>
<p>The NTP Version 4 daemon supports some three dozen different radio,
satellite and modem reference clocks plus a special pseudo-clock
-used for backup or when no other clock source is available.
+used for backup or when no other clock source is available.
Detailed descriptions of individual device drivers and options can
be found in the
-"Reference Clock Drivers"
+&quot;Reference Clock Drivers&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
+<samp>/usr/share/doc/ntp</samp>).
Additional information can be found in the pages linked
there, including the
-"Debugging Hints for Reference Clock Drivers"
+&quot;Debugging Hints for Reference Clock Drivers&quot;
and
-"How To Write a Reference Clock Driver"
+&quot;How To Write a Reference Clock Driver&quot;
pages
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
+<samp>/usr/share/doc/ntp</samp>).
In addition, support for a PPS
signal is available as described in the
-"Pulse-per-second (PPS) Signal Interfacing"
+&quot;Pulse-per-second (PPS) Signal Interfacing&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
+<samp>/usr/share/doc/ntp</samp>).
Many
drivers support special line discipline/streams modules which can
-significantly improve the accuracy using the driver.
+significantly improve the accuracy using the driver.
These are
described in the
-"Line Disciplines and Streams Drivers"
+&quot;Line Disciplines and Streams Drivers&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
-
- <p>A reference clock will generally (though not always) be a radio
+<samp>/usr/share/doc/ntp</samp>).
+</p>
+<p>A reference clock will generally (though not always) be a radio
timecode receiver which is synchronized to a source of standard
time such as the services offered by the NRC in Canada and NIST and
-USNO in the US.
+USNO in the US.
The interface between the computer and the timecode
-receiver is device dependent, but is usually a serial port.
+receiver is device dependent, but is usually a serial port.
A
device driver specific to each reference clock must be selected and
compiled in the distribution; however, most common radio, satellite
-and modem clocks are included by default.
+and modem clocks are included by default.
Note that an attempt to
configure a reference clock when the driver has not been compiled
or the hardware port has not been appropriately configured results
in a scalding remark to the system log file, but is otherwise non
hazardous.
-
- <p>For the purposes of configuration,
+</p>
+<p>For the purposes of configuration,
<code>ntpd(1ntpdmdoc)</code>
treats
reference clocks in a manner analogous to normal NTP peers as much
-as possible.
+as possible.
Reference clocks are identified by a syntactically
correct but invalid IP address, in order to distinguish them from
-normal NTP peers.
+normal NTP peers.
Reference clock addresses are of the form
<code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd>,
where
@@ -2101,199 +2365,222 @@ is an integer
denoting the clock type and
<kbd>u</kbd>
indicates the unit
-number in the range 0-3.
+number in the range 0-3.
While it may seem overkill, it is in fact
sometimes useful to configure multiple reference clocks of the same
type, in which case the unit numbers must be unique.
-
- <p>The
+</p>
+<p>The
<code>server</code>
command is used to configure a reference
clock, where the
<kbd>address</kbd>
argument in that command
-is the clock address.
+is the clock address.
The
<code>key</code>,
<code>version</code>
and
<code>ttl</code>
-options are not used for reference clock support.
+options are not used for reference clock support.
The
<code>mode</code>
option is added for reference clock support, as
-described below.
+described below.
The
<code>prefer</code>
option can be useful to
persuade the server to cherish a reference clock with somewhat more
-enthusiasm than other reference clocks or peers.
+enthusiasm than other reference clocks or peers.
Further
information on this option can be found in the
-"Mitigation Rules and the prefer Keyword"
+&quot;Mitigation Rules and the prefer Keyword&quot;
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>)
-page.
+<samp>/usr/share/doc/ntp</samp>)
+page.
The
<code>minpoll</code>
and
<code>maxpoll</code>
options have
-meaning only for selected clock drivers.
+meaning only for selected clock drivers.
See the individual clock
driver document pages for additional information.
-
- <p>The
+</p>
+<p>The
<code>fudge</code>
command is used to provide additional
information for individual clock drivers and normally follows
immediately after the
<code>server</code>
-command.
+command.
The
<kbd>address</kbd>
-argument specifies the clock address.
+argument specifies the clock address.
The
<code>refid</code>
and
<code>stratum</code>
options can be used to
-override the defaults for the device.
+override the defaults for the device.
There are two optional
device-dependent time offsets and four flags that can be included
in the
<code>fudge</code>
command as well.
-
- <p>The stratum number of a reference clock is by default zero.
+</p>
+<p>The stratum number of a reference clock is by default zero.
Since the
<code>ntpd(1ntpdmdoc)</code>
daemon adds one to the stratum of each
peer, a primary server ordinarily displays an external stratum of
-one.
+one.
In order to provide engineered backups, it is often useful to
-specify the reference clock stratum as greater than zero.
+specify the reference clock stratum as greater than zero.
The
<code>stratum</code>
-option is used for this purpose.
+option is used for this purpose.
Also, in cases
involving both a reference clock and a pulse-per-second (PPS)
discipline signal, it is useful to specify the reference clock
-identifier as other than the default, depending on the driver.
+identifier as other than the default, depending on the driver.
The
<code>refid</code>
-option is used for this purpose.
+option is used for this purpose.
Except where noted,
these options apply to all clock drivers.
-
-<h5 class="subsubsection">Reference Clock Commands</h5>
-
- <dl>
-<dt><code>server</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[prefer]</code> <code>[mode </code><kbd>int</kbd><code>]</code> <code>[minpoll </code><kbd>int</kbd><code>]</code> <code>[maxpoll </code><kbd>int</kbd><code>]</code><dd>This command can be used to configure reference clocks in
-special ways.
+</p><a name="Reference-Clock-Commands"></a>
+<h4 class="subsubsection">1.1.6.1 Reference Clock Commands</h4>
+<dl compact="compact">
+<dt><code>server</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[<code>prefer</code>]</code> <code>[<code>mode</code> <kbd>int</kbd>]</code> <code>[<code>minpoll</code> <kbd>int</kbd>]</code> <code>[<code>maxpoll</code> <kbd>int</kbd>]</code></dt>
+<dd><p>This command can be used to configure reference clocks in
+special ways.
The options are interpreted as follows:
- <dl>
-<dt><code>prefer</code><dd>Marks the reference clock as preferred.
+</p><dl compact="compact">
+<dt><code>prefer</code></dt>
+<dd><p>Marks the reference clock as preferred.
All other things being
equal, this host will be chosen for synchronization among a set of
-correctly operating hosts.
+correctly operating hosts.
See the
-"Mitigation Rules and the prefer Keyword"
+&quot;Mitigation Rules and the prefer Keyword&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>)
-for further information.
-<br><dt><code>mode</code> <kbd>int</kbd><dd>Specifies a mode number which is interpreted in a
-device-specific fashion.
+<samp>/usr/share/doc/ntp</samp>)
+for further information.
+</p></dd>
+<dt><code>mode</code> <kbd>int</kbd></dt>
+<dd><p>Specifies a mode number which is interpreted in a
+device-specific fashion.
For instance, it selects a dialing
protocol in the ACTS driver and a device subtype in the
parse
-drivers.
-<br><dt><code>minpoll</code> <kbd>int</kbd><br><dt><code>maxpoll</code> <kbd>int</kbd><dd>These options specify the minimum and maximum polling interval
+drivers.
+</p></dd>
+<dt><code>minpoll</code> <kbd>int</kbd></dt>
+<dt><code>maxpoll</code> <kbd>int</kbd></dt>
+<dd><p>These options specify the minimum and maximum polling interval
for reference clock messages, as a power of 2 in seconds
For
most directly connected reference clocks, both
<code>minpoll</code>
and
<code>maxpoll</code>
-default to 6 (64 s).
+default to 6 (64 s).
For modem reference clocks,
<code>minpoll</code>
defaults to 10 (17.1 m) and
<code>maxpoll</code>
-defaults to 14 (4.5 h).
-The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+</p></dd>
</dl>
- <br><dt><code>fudge</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[time1 </code><kbd>sec</kbd><code>]</code> <code>[time2 </code><kbd>sec</kbd><code>]</code> <code>[stratum </code><kbd>int</kbd><code>]</code> <code>[refid </code><kbd>string</kbd><code>]</code> <code>[mode </code><kbd>int</kbd><code>]</code> <code>[flag1 0 | 1]</code> <code>[flag2 0 | 1]</code> <code>[flag3 0 | 1]</code> <code>[flag4 0 | 1]</code><dd>This command can be used to configure reference clocks in
-special ways.
+</dd>
+<dt><code>fudge</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[<code>time1</code> <kbd>sec</kbd>]</code> <code>[<code>time2</code> <kbd>sec</kbd>]</code> <code>[<code>stratum</code> <kbd>int</kbd>]</code> <code>[<code>refid</code> <kbd>string</kbd>]</code> <code>[<code>mode</code> <kbd>int</kbd>]</code> <code>[<code>flag1</code> <code>0</code> <code>|</code> <code>1</code>]</code> <code>[<code>flag2</code> <code>0</code> <code>|</code> <code>1</code>]</code> <code>[<code>flag3</code> <code>0</code> <code>|</code> <code>1</code>]</code> <code>[<code>flag4</code> <code>0</code> <code>|</code> <code>1</code>]</code></dt>
+<dd><p>This command can be used to configure reference clocks in
+special ways.
It must immediately follow the
<code>server</code>
-command which configures the driver.
+command which configures the driver.
Note that the same capability
is possible at run time using the
<code>ntpdc(1ntpdcmdoc)</code>
-program.
+program.
The options are interpreted as
follows:
- <dl>
-<dt><code>time1</code> <kbd>sec</kbd><dd>Specifies a constant to be added to the time offset produced by
-the driver, a fixed-point decimal number in seconds.
+</p><dl compact="compact">
+<dt><code>time1</code> <kbd>sec</kbd></dt>
+<dd><p>Specifies a constant to be added to the time offset produced by
+the driver, a fixed-point decimal number in seconds.
This is used
as a calibration constant to adjust the nominal time offset of a
particular clock to agree with an external standard, such as a
-precision PPS signal.
+precision PPS signal.
It also provides a way to correct a
systematic error or bias due to serial port or operating system
-latencies, different cable lengths or receiver internal delay.
+latencies, different cable lengths or receiver internal delay.
The
specified offset is in addition to the propagation delay provided
-by other means, such as internal DIPswitches.
+by other means, such as internal DIPswitches.
Where a calibration
for an individual system and driver is available, an approximate
-correction is noted in the driver documentation pages.
+correction is noted in the driver documentation pages.
Note: in order to facilitate calibration when more than one
radio clock or PPS signal is supported, a special calibration
-feature is available.
+feature is available.
It takes the form of an argument to the
<code>enable</code>
command described in
<a href="#Miscellaneous-Options">Miscellaneous Options</a>
page and operates as described in the
-"Reference Clock Drivers"
+&quot;Reference Clock Drivers&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
-<br><dt><code>time2</code> <kbd>secs</kbd><dd>Specifies a fixed-point decimal number in seconds, which is
-interpreted in a driver-dependent way.
+<samp>/usr/share/doc/ntp</samp>).
+</p></dd>
+<dt><code>time2</code> <kbd>secs</kbd></dt>
+<dd><p>Specifies a fixed-point decimal number in seconds, which is
+interpreted in a driver-dependent way.
See the descriptions of
specific drivers in the
-"Reference Clock Drivers"
+&quot;Reference Clock Drivers&quot;
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span> <span class="file">).</span>
-<br><dt><code>stratum</code> <kbd>int</kbd><dd>Specifies the stratum number assigned to the driver, an integer
-between 0 and 15.
+<samp>/usr/share/doc/ntp</samp> <samp>).</samp>
+</p></dd>
+<dt><code>stratum</code> <kbd>int</kbd></dt>
+<dd><p>Specifies the stratum number assigned to the driver, an integer
+between 0 and 15.
This number overrides the default stratum number
-ordinarily assigned by the driver itself, usually zero.
-<br><dt><code>refid</code> <kbd>string</kbd><dd>Specifies an ASCII string of from one to four characters which
-defines the reference identifier used by the driver.
+ordinarily assigned by the driver itself, usually zero.
+</p></dd>
+<dt><code>refid</code> <kbd>string</kbd></dt>
+<dd><p>Specifies an ASCII string of from one to four characters which
+defines the reference identifier used by the driver.
This string
overrides the default identifier ordinarily assigned by the driver
-itself.
-<br><dt><code>mode</code> <kbd>int</kbd><dd>Specifies a mode number which is interpreted in a
-device-specific fashion.
+itself.
+</p></dd>
+<dt><code>mode</code> <kbd>int</kbd></dt>
+<dd><p>Specifies a mode number which is interpreted in a
+device-specific fashion.
For instance, it selects a dialing
protocol in the ACTS driver and a device subtype in the
parse
-drivers.
-<br><dt><code>flag1</code> <code>0</code> <code>|</code> <code>1</code><br><dt><code>flag2</code> <code>0</code> <code>|</code> <code>1</code><br><dt><code>flag3</code> <code>0</code> <code>|</code> <code>1</code><br><dt><code>flag4</code> <code>0</code> <code>|</code> <code>1</code><dd>These four flags are used for customizing the clock driver.
+drivers.
+</p></dd>
+<dt><code>flag1</code> <code>0</code> <code>|</code> <code>1</code></dt>
+<dt><code>flag2</code> <code>0</code> <code>|</code> <code>1</code></dt>
+<dt><code>flag3</code> <code>0</code> <code>|</code> <code>1</code></dt>
+<dt><code>flag4</code> <code>0</code> <code>|</code> <code>1</code></dt>
+<dd><p>These four flags are used for customizing the clock driver.
The
interpretation of these values, and whether they are used at all,
-is a function of the particular clock driver.
+is a function of the particular clock driver.
However, by
convention
<code>flag4</code>
@@ -2302,155 +2589,186 @@ data to the
<code>clockstats</code>
file configured with the
<code>filegen</code>
-command.
+command.
Further information on the
<code>filegen</code>
command can be found in
-<a href="#Monitoring-Options">Monitoring Options</a>.
+&lsquo;Monitoring Options&rsquo;.
+</p></dd>
+</dl>
+</dd>
</dl>
- </dl>
-<div class="node">
-<p><hr>
+<hr>
<a name="Miscellaneous-Options"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#ntp_002econf-Files" accesskey="n" rel="next">ntp.conf Files</a>, Previous: <a href="#Reference-Clock-Support" accesskey="p" rel="prev">Reference Clock Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">Miscellaneous Options</h4>
-
- <dl>
-<dt><code>broadcastdelay</code> <kbd>seconds</kbd><dd>The broadcast and multicast modes require a special calibration
+<a name="Miscellaneous-Options-1"></a>
+<h4 class="subsection">1.1.7 Miscellaneous Options</h4>
+<dl compact="compact">
+<dt><code>broadcastdelay</code> <kbd>seconds</kbd></dt>
+<dd><p>The broadcast and multicast modes require a special calibration
to determine the network delay between the local and remote
-servers.
+servers.
Ordinarily, this is done automatically by the initial
-protocol exchanges between the client and server.
+protocol exchanges between the client and server.
In some cases,
the calibration procedure may fail due to network or server access
-controls, for example.
+controls, for example.
This command specifies the default delay to
-be used under these circumstances.
+be used under these circumstances.
Typically (for Ethernet), a
-number between 0.003 and 0.007 seconds is appropriate.
+number between 0.003 and 0.007 seconds is appropriate.
The default
-when this command is not used is 0.004 seconds.
-<br><dt><code>calldelay</code> <kbd>delay</kbd><dd>This option controls the delay in seconds between the first and second
+when this command is not used is 0.004 seconds.
+</p></dd>
+<dt><code>calldelay</code> <kbd>delay</kbd></dt>
+<dd><p>This option controls the delay in seconds between the first and second
packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
-<br><dt><code>driftfile</code> <kbd>driftfile</kbd><dd>This command specifies the complete path and name of the file used to
-record the frequency of the local clock oscillator.
+or ISDN call to complete.
+</p></dd>
+<dt><code>driftfile</code> <kbd>driftfile</kbd></dt>
+<dd><p>This command specifies the complete path and name of the file used to
+record the frequency of the local clock oscillator.
This is the same
operation as the
<code>-f</code>
-command line option.
+command line option.
If the file exists, it is read at
startup in order to set the initial frequency and then updated once per
-hour with the current frequency computed by the daemon.
+hour with the current frequency computed by the daemon.
If the file name is
specified, but the file itself does not exist, the starts with an initial
-frequency of zero and creates the file when writing it for the first time.
+frequency of zero and creates the file when writing it for the first time.
If this command is not given, the daemon will always start with an initial
frequency of zero.
-
- <p>The file format consists of a single line containing a single
+</p>
+<p>The file format consists of a single line containing a single
floating point number, which records the frequency offset measured
-in parts-per-million (PPM).
+in parts-per-million (PPM).
The file is updated by first writing
the current drift value into a temporary file and then renaming
-this file to replace the old version.
+this file to replace the old version.
This implies that
<code>ntpd(1ntpdmdoc)</code>
must have write permission for the directory the
drift file is located in, and that file system links, symbolic or
-otherwise, should be avoided.
-<br><dt><code>dscp</code> <kbd>value</kbd><dd>This option specifies the Differentiated Services Control Point (DSCP) value,
-a 6-bit code.
-The default value is 46, signifying Expedited Forwarding.
-<br><dt><code>enable</code> <code>[auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats | peer_clear_digest_early | unpeer_crypto_early | unpeer_crypto_nak_early | unpeer_digest_early]</code><br><dt><code>disable</code> <code>[auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats | peer_clear_digest_early | unpeer_crypto_early | unpeer_crypto_nak_early | unpeer_digest_early]</code><dd>Provides a way to enable or disable various server options.
-Flags not mentioned are unaffected.
+otherwise, should be avoided.
+</p></dd>
+<dt><code>dscp</code> <kbd>value</kbd></dt>
+<dd><p>This option specifies the Differentiated Services Control Point (DSCP) value,
+a 6-bit code.
+The default value is 46, signifying Expedited Forwarding.
+</p></dd>
+<dt><code>enable</code> <code>[<code>auth</code> | <code>bclient</code> | <code>calibrate</code> | <code>kernel</code> | <code>mode7</code> | <code>monitor</code> | <code>ntp</code> | <code>stats</code> | <code>peer_clear_digest_early</code> | <code>unpeer_crypto_early</code> | <code>unpeer_crypto_nak_early</code> | <code>unpeer_digest_early</code>]</code></dt>
+<dt><code>disable</code> <code>[<code>auth</code> | <code>bclient</code> | <code>calibrate</code> | <code>kernel</code> | <code>mode7</code> | <code>monitor</code> | <code>ntp</code> | <code>stats</code> | <code>peer_clear_digest_early</code> | <code>unpeer_crypto_early</code> | <code>unpeer_crypto_nak_early</code> | <code>unpeer_digest_early</code>]</code></dt>
+<dd><p>Provides a way to enable or disable various server options.
+Flags not mentioned are unaffected.
Note that all of these flags
can be controlled remotely using the
<code>ntpdc(1ntpdcmdoc)</code>
utility program.
- <dl>
-<dt><code>auth</code><dd>Enables the server to synchronize with unconfigured peers only if the
+</p><dl compact="compact">
+<dt><code>auth</code></dt>
+<dd><p>Enables the server to synchronize with unconfigured peers only if the
peer has been correctly authenticated using either public key or
-private key cryptography.
+private key cryptography.
The default for this flag is
-<code>enable</code>.
-<br><dt><code>bclient</code><dd>Enables the server to listen for a message from a broadcast or
+<code>enable</code>.
+</p></dd>
+<dt><code>bclient</code></dt>
+<dd><p>Enables the server to listen for a message from a broadcast or
multicast server, as in the
<code>multicastclient</code>
command with default
-address.
+address.
The default for this flag is
-<code>disable</code>.
-<br><dt><code>calibrate</code><dd>Enables the calibrate feature for reference clocks.
+<code>disable</code>.
+</p></dd>
+<dt><code>calibrate</code></dt>
+<dd><p>Enables the calibrate feature for reference clocks.
The default for
this flag is
-<code>disable</code>.
-<br><dt><code>kernel</code><dd>Enables the kernel time discipline, if available.
+<code>disable</code>.
+</p></dd>
+<dt><code>kernel</code></dt>
+<dd><p>Enables the kernel time discipline, if available.
The default for this
flag is
<code>enable</code>
if support is available, otherwise
-<code>disable</code>.
-<br><dt><code>mode7</code><dd>Enables processing of NTP mode 7 implementation-specific requests
+<code>disable</code>.
+</p></dd>
+<dt><code>mode7</code></dt>
+<dd><p>Enables processing of NTP mode 7 implementation-specific requests
which are used by the deprecated
<code>ntpdc(1ntpdcmdoc)</code>
-program.
-The default for this flag is disable.
+program.
+The default for this flag is disable.
This flag is excluded from runtime configuration using
-<code>ntpq(1ntpqmdoc)</code>.
+<code>ntpq(1ntpqmdoc)</code>.
The
<code>ntpq(1ntpqmdoc)</code>
program provides the same capabilities as
<code>ntpdc(1ntpdcmdoc)</code>
-using standard mode 6 requests.
-<br><dt><code>monitor</code><dd>Enables the monitoring facility.
+using standard mode 6 requests.
+</p></dd>
+<dt><code>monitor</code></dt>
+<dd><p>Enables the monitoring facility.
See the
<code>ntpdc(1ntpdcmdoc)</code>
program
and the
<code>monlist</code>
-command or further information.
+command or further information.
The
default for this flag is
-<code>enable</code>.
-<br><dt><code>ntp</code><dd>Enables time and frequency discipline.
+<code>enable</code>.
+</p></dd>
+<dt><code>ntp</code></dt>
+<dd><p>Enables time and frequency discipline.
In effect, this switch opens and
-closes the feedback loop, which is useful for testing.
+closes the feedback loop, which is useful for testing.
The default for
this flag is
-<code>enable</code>.
-<br><dt><code>peer_clear_digest_early</code><dd>By default, if
+<code>enable</code>.
+</p></dd>
+<dt><code>peer_clear_digest_early</code></dt>
+<dd><p>By default, if
<code>ntpd(1ntpdmdoc)</code>
is using autokey and it
receives a crypto-NAK packet that
passes the duplicate packet and origin timestamp checks
-the peer variables are immediately cleared.
+the peer variables are immediately cleared.
While this is generally a feature
as it allows for quick recovery if a server key has changed,
a properly forged and appropriately delivered crypto-NAK packet
-can be used in a DoS attack.
+can be used in a DoS attack.
If you have active noticable problems with this type of DoS attack
then you should consider
-disabling this option.
+disabling this option.
You can check your
<code>peerstats</code>
-file for evidence of any of these attacks.
+file for evidence of any of these attacks.
The
default for this flag is
-<code>enable</code>.
-<br><dt><code>stats</code><dd>Enables the statistics facility.
+<code>enable</code>.
+</p></dd>
+<dt><code>stats</code></dt>
+<dd><p>Enables the statistics facility.
See the
-<a href="#Monitoring-Options">Monitoring Options</a>
-section for further information.
+&lsquo;Monitoring Options&rsquo;
+section for further information.
The default for this flag is
-<code>disable</code>.
-<br><dt><code>unpeer_crypto_early</code><dd>By default, if
+<code>disable</code>.
+</p></dd>
+<dt><code>unpeer_crypto_early</code></dt>
+<dd><p>By default, if
<code>ntpd(1ntpdmdoc)</code>
receives an autokey packet that fails TEST9,
a crypto failure,
-the association is immediately cleared.
+the association is immediately cleared.
This is almost certainly a feature,
but if, in spite of the current recommendation of not using autokey,
you are
@@ -2460,84 +2778,93 @@ using autokey
you are seeing this sort of DoS attack
disabling this flag will delay
tearing down the association until the reachability counter
-becomes zero.
+becomes zero.
You can check your
<code>peerstats</code>
-file for evidence of any of these attacks.
+file for evidence of any of these attacks.
The
default for this flag is
-<code>enable</code>.
-<br><dt><code>unpeer_crypto_nak_early</code><dd>By default, if
+<code>enable</code>.
+</p></dd>
+<dt><code>unpeer_crypto_nak_early</code></dt>
+<dd><p>By default, if
<code>ntpd(1ntpdmdoc)</code>
receives a crypto-NAK packet that
passes the duplicate packet and origin timestamp checks
-the association is immediately cleared.
+the association is immediately cleared.
While this is generally a feature
as it allows for quick recovery if a server key has changed,
a properly forged and appropriately delivered crypto-NAK packet
-can be used in a DoS attack.
+can be used in a DoS attack.
If you have active noticable problems with this type of DoS attack
then you should consider
-disabling this option.
+disabling this option.
You can check your
<code>peerstats</code>
-file for evidence of any of these attacks.
+file for evidence of any of these attacks.
The
default for this flag is
-<code>enable</code>.
-<br><dt><code>unpeer_digest_early</code><dd>By default, if
+<code>enable</code>.
+</p></dd>
+<dt><code>unpeer_digest_early</code></dt>
+<dd><p>By default, if
<code>ntpd(1ntpdmdoc)</code>
receives what should be an authenticated packet
that passes other packet sanity checks but
contains an invalid digest
-the association is immediately cleared.
+the association is immediately cleared.
While this is generally a feature
as it allows for quick recovery,
if this type of packet is carefully forged and sent
-during an appropriate window it can be used for a DoS attack.
+during an appropriate window it can be used for a DoS attack.
If you have active noticable problems with this type of DoS attack
then you should consider
-disabling this option.
+disabling this option.
You can check your
<code>peerstats</code>
-file for evidence of any of these attacks.
+file for evidence of any of these attacks.
The
default for this flag is
-<code>enable</code>.
+<code>enable</code>.
+</p></dd>
</dl>
- <br><dt><code>includefile</code> <kbd>includefile</kbd><dd>This command allows additional configuration commands
-to be included from a separate file.
+</dd>
+<dt><code>includefile</code> <kbd>includefile</kbd></dt>
+<dd><p>This command allows additional configuration commands
+to be included from a separate file.
Include files may
be nested to a depth of five; upon reaching the end of any
include file, command processing resumes in the previous
-configuration file.
+configuration file.
This option is useful for sites that run
<code>ntpd(1ntpdmdoc)</code>
on multiple hosts, with (mostly) common options (e.g., a
-restriction list).
-<br><dt><code>interface</code> <code>[listen | ignore | drop]</code> <code>[all | ipv4 | ipv6 | wildcard </code><kbd>name</kbd><code> | </code><kbd>address</kbd><code> [/ </code><kbd>prefixlen</kbd><code>]]</code><dd>The
+restriction list).
+</p></dd>
+<dt><code>interface</code> <code>[<code>listen</code> | <code>ignore</code> | <code>drop</code>]</code> <code>[<code>all</code> | <code>ipv4</code> | <code>ipv6</code> | <code>wildcard</code> <kbd>name</kbd> | <kbd>address</kbd> <code>[<code>/</code> <kbd>prefixlen</kbd>]</code>]</code></dt>
+<dd><p>The
<code>interface</code>
directive controls which network addresses
<code>ntpd(1ntpdmdoc)</code>
-opens, and whether input is dropped without processing.
+opens, and whether input is dropped without processing.
The first parameter determines the action for addresses
-which match the second parameter.
+which match the second parameter.
The second parameter specifies a class of addresses,
or a specific interface name,
-or an address.
+or an address.
In the address case,
<kbd>prefixlen</kbd>
-determines how many bits must match for this rule to apply.
+determines how many bits must match for this rule to apply.
<code>ignore</code>
prevents opening matching addresses,
<code>drop</code>
causes
<code>ntpd(1ntpdmdoc)</code>
-to open the address and drop all received packets without examination.
+to open the address and drop all received packets without examination.
Multiple
<code>interface</code>
-directives can be used.
-The last rule which matches a particular address determines the action for it.
+directives can be used.
+The last rule which matches a particular address determines the action for it.
<code>interface</code>
directives are disabled if any
<code>-I</code>,
@@ -2546,18 +2873,20 @@ directives are disabled if any
or
<code>--novirtualips</code>
command-line options are specified in the configuration file,
-all available network addresses are opened.
+all available network addresses are opened.
The
<code>nic</code>
directive is an alias for
-<code>interface</code>.
-<br><dt><code>leapfile</code> <kbd>leapfile</kbd><dd>This command loads the IERS leapseconds file and initializes the
+<code>interface</code>.
+</p></dd>
+<dt><code>leapfile</code> <kbd>leapfile</kbd></dt>
+<dd><p>This command loads the IERS leapseconds file and initializes the
leapsecond values for the next leapsecond event, leapfile expiration
-time, and TAI offset.
+time, and TAI offset.
The file can be obtained directly from the IERS at
<code>https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>
or
-<code>ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>.
+<code>ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list</code>.
The
<code>leapfile</code>
is scanned when
@@ -2566,56 +2895,60 @@ processes the
<code>leapfile</code> <code>directive</code> <code>or</code> <code>when</code>
<code>ntpd</code> <code>detects</code> <code>that</code> <code>the</code>
<kbd>leapfile</kbd>
-has changed.
+has changed.
<code>ntpd</code>
checks once a day to see if the
<kbd>leapfile</kbd>
-has changed.
+has changed.
The
<code>update-leap(1update_leapmdoc)</code>
script can be run to see if the
<kbd>leapfile</kbd>
-should be updated.
-<br><dt><code>leapsmearinterval</code> <kbd>seconds</kbd><dd>This EXPERIMENTAL option is only available if
+should be updated.
+</p></dd>
+<dt><code>leapsmearinterval</code> <kbd>seconds</kbd></dt>
+<dd><p>This EXPERIMENTAL option is only available if
<code>ntpd(1ntpdmdoc)</code>
was built with the
<code>--enable-leap-smear</code>
option to the
<code>configure</code>
-script.
-It specifies the interval over which a leap second correction will be applied.
+script.
+It specifies the interval over which a leap second correction will be applied.
Recommended values for this option are between
-7200 (2 hours) and 86400 (24 hours).
-.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
-See http://bugs.ntp.org/2855 for more information.
-<br><dt><code>logconfig</code> <kbd>configkeyword</kbd><dd>This command controls the amount and type of output written to
+7200 (2 hours) and 86400 (24 hours).
+.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
+See http://bugs.ntp.org/2855 for more information.
+</p></dd>
+<dt><code>logconfig</code> <kbd>configkeyword</kbd></dt>
+<dd><p>This command controls the amount and type of output written to
the system
<code>syslog(3)</code>
facility or the alternate
<code>logfile</code>
-log file.
-By default, all output is turned on.
+log file.
+By default, all output is turned on.
All
<kbd>configkeyword</kbd>
keywords can be prefixed with
-=,
-+
+&lsquo;=&rsquo;,
+&lsquo;+&rsquo;
and
--,
+&lsquo;-&rsquo;,
where
-=
+&lsquo;=&rsquo;
sets the
<code>syslog(3)</code>
priority mask,
-+
+&lsquo;+&rsquo;
adds and
--
+&lsquo;-&rsquo;
removes
-messages.
+messages.
<code>syslog(3)</code>
messages can be controlled in four
classes
-(<code>clock</code>, <code>peer</code>, <code>sys</code> and <code>sync</code>).
+(<code>clock</code>, <code>peer</code>, <code>sys</code> and <code>sync</code>).
Within these classes four types of messages can be
controlled: informational messages
(<code>info</code>),
@@ -2626,383 +2959,464 @@ statistics messages
and
status messages
(<code>status</code>).
-
- <p>Configuration keywords are formed by concatenating the message class with
-the event class.
+</p>
+<p>Configuration keywords are formed by concatenating the message class with
+the event class.
The
<code>all</code>
-prefix can be used instead of a message class.
+prefix can be used instead of a message class.
A
message class may also be followed by the
<code>all</code>
keyword to enable/disable all
-messages of the respective message class.
+messages of the respective message class.
Thus, a minimal log configuration
could look like this:
-<pre class="verbatim">
- logconfig =syncstatus +sysevents
+</p><pre class="verbatim">logconfig =syncstatus +sysevents
</pre>
-
- <p>This would just list the synchronizations state of
+<p>This would just list the synchronizations state of
<code>ntpd(1ntpdmdoc)</code>
-and the major system events.
+and the major system events.
For a simple reference server, the
following minimum message configuration could be useful:
-<pre class="verbatim">
- logconfig =syncall +clockall
+</p><pre class="verbatim">logconfig =syncall +clockall
</pre>
-
- <p>This configuration will list all clock information and
-synchronization information.
+<p>This configuration will list all clock information and
+synchronization information.
All other events and messages about
-peers, system events and so on is suppressed.
-<br><dt><code>logfile</code> <kbd>logfile</kbd><dd>This command specifies the location of an alternate log file to
+peers, system events and so on is suppressed.
+</p></dd>
+<dt><code>logfile</code> <kbd>logfile</kbd></dt>
+<dd><p>This command specifies the location of an alternate log file to
be used instead of the default system
<code>syslog(3)</code>
-facility.
+facility.
This is the same operation as the
<code>-l</code>
-command line option.
-<br><dt><code>mru</code> <code>[maxdepth </code><kbd>count</kbd><code> | maxmem </code><kbd>kilobytes</kbd><code> | mindepth </code><kbd>count</kbd><code> | maxage </code><kbd>seconds</kbd><code> | initialloc </code><kbd>count</kbd><code> | initmem </code><kbd>kilobytes</kbd><code> | incalloc </code><kbd>count</kbd><code> | incmem </code><kbd>kilobytes</kbd><code>]</code><dd>Controls size limite of the monitoring facility's Most Recently Used
+command line option.
+</p></dd>
+<dt><code>mru</code> <code>[<code>maxdepth</code> <kbd>count</kbd> | <code>maxmem</code> <kbd>kilobytes</kbd> | <code>mindepth</code> <kbd>count</kbd> | <code>maxage</code> <kbd>seconds</kbd> | <code>initialloc</code> <kbd>count</kbd> | <code>initmem</code> <kbd>kilobytes</kbd> | <code>incalloc</code> <kbd>count</kbd> | <code>incmem</code> <kbd>kilobytes</kbd>]</code></dt>
+<dd><p>Controls size limite of the monitoring facility&rsquo;s Most Recently Used
(MRU) list
of client addresses, which is also used by the
rate control facility.
- <dl>
-<dt><code>maxdepth</code> <kbd>count</kbd><br><dt><code>maxmem</code> <kbd>kilobytes</kbd><dd>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+</p><dl compact="compact">
+<dt><code>maxdepth</code> <kbd>count</kbd></dt>
+<dt><code>maxmem</code> <kbd>kilobytes</kbd></dt>
+<dd><p>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
The acutal limit will be up to
<code>incalloc</code>
entries or
<code>incmem</code>
-kilobytes larger.
+kilobytes larger.
As with all of the
<code>mru</code>
options offered in units of entries or kilobytes, if both
<code>maxdepth</code>
and
<code>maxmem</code> <code>are</code> <code>used,</code> <code>the</code> <code>last</code> <code>one</code> <code>used</code> <code>controls.</code>
-The default is 1024 kilobytes.
-<br><dt><code>mindepth</code> <kbd>count</kbd><dd>Lower limit on the MRU list size.
+The default is 1024 kilobytes.
+</p></dd>
+<dt><code>mindepth</code> <kbd>count</kbd></dt>
+<dd><p>Lower limit on the MRU list size.
When the MRU list has fewer than
<code>mindepth</code>
entries, existing entries are never removed to make room for newer ones,
-regardless of their age.
-The default is 600 entries.
-<br><dt><code>maxage</code> <kbd>seconds</kbd><dd>Once the MRU list has
+regardless of their age.
+The default is 600 entries.
+</p></dd>
+<dt><code>maxage</code> <kbd>seconds</kbd></dt>
+<dd><p>Once the MRU list has
<code>mindepth</code>
entries and an additional client is to ba added to the list,
if the oldest entry was updated more than
<code>maxage</code>
-seconds ago, that entry is removed and its storage is reused.
+seconds ago, that entry is removed and its storage is reused.
If the oldest entry was updated more recently the MRU list is grown,
-subject to
-<code>maxdepth</code> <code>/</code> <code>moxmem</code>.
-The default is 64 seconds.
-<br><dt><code>initalloc</code> <kbd>count</kbd><br><dt><code>initmem</code> <kbd>kilobytes</kbd><dd>Initial memory allocation at the time the monitoringfacility is first enabled,
-in terms of the number of entries or kilobytes.
-The default is 4 kilobytes.
-<br><dt><code>incalloc</code> <kbd>count</kbd><br><dt><code>incmem</code> <kbd>kilobytes</kbd><dd>Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
-The default is 4 kilobytes.
+subject to
+<code>maxdepth</code> <code>/</code> <code>moxmem</code>.
+The default is 64 seconds.
+</p></dd>
+<dt><code>initalloc</code> <kbd>count</kbd></dt>
+<dt><code>initmem</code> <kbd>kilobytes</kbd></dt>
+<dd><p>Initial memory allocation at the time the monitoringfacility is first enabled,
+in terms of the number of entries or kilobytes.
+The default is 4 kilobytes.
+</p></dd>
+<dt><code>incalloc</code> <kbd>count</kbd></dt>
+<dt><code>incmem</code> <kbd>kilobytes</kbd></dt>
+<dd><p>Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+</p></dd>
</dl>
- <br><dt><code>nonvolatile</code> <kbd>threshold</kbd><dd>Specify the
+</dd>
+<dt><code>nonvolatile</code> <kbd>threshold</kbd></dt>
+<dd><p>Specify the
<kbd>threshold</kbd>
delta in seconds before an hourly change to the
<code>driftfile</code>
-(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
-The frequency file is inspected each hour.
+(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
+The frequency file is inspected each hour.
If the difference between the current frequency and the last value written
exceeds the threshold, the file is written and the
<code>threshold</code>
-becomes the new threshold value.
-If the threshold is not exceeeded, it is reduced by half.
-This is intended to reduce the number of file writes
-for embedded systems with nonvolatile memory.
-<br><dt><code>phone</code> <kbd>dial</kbd> <kbd>...</kbd><dd>This command is used in conjunction with
+becomes the new threshold value.
+If the threshold is not exceeeded, it is reduced by half.
+This is intended to reduce the number of file writes
+for embedded systems with nonvolatile memory.
+</p></dd>
+<dt><code>phone</code> <kbd>dial</kbd> <kbd>...</kbd></dt>
+<dd><p>This command is used in conjunction with
the ACTS modem driver (type 18)
-or the JJY driver (type 40, mode 100 - 180).
+or the JJY driver (type 40, mode 100 - 180).
For the ACTS modem driver (type 18), the arguments consist of
a maximum of 10 telephone numbers used to dial USNO, NIST, or European
-time service.
-For the JJY driver (type 40 mode 100 - 180), the argument is
-one telephone number used to dial the telephone JJY service.
-The Hayes command ATDT is normally prepended to the number.
-The number can contain other modem control codes as well.
-<br><dt><code>reset</code> <code>[allpeers]</code> <code>[auth]</code> <code>[ctl]</code> <code>[io]</code> <code>[mem]</code> <code>[sys]</code> <code>[timer]</code><dd>Reset one or more groups of counters maintained by
+time service.
+For the JJY driver (type 40 mode 100 - 180), the argument is
+one telephone number used to dial the telephone JJY service.
+The Hayes command ATDT is normally prepended to the number.
+The number can contain other modem control codes as well.
+</p></dd>
+<dt><code>reset</code> <code>[<code>allpeers</code>]</code> <code>[<code>auth</code>]</code> <code>[<code>ctl</code>]</code> <code>[<code>io</code>]</code> <code>[<code>mem</code>]</code> <code>[<code>sys</code>]</code> <code>[<code>timer</code>]</code></dt>
+<dd><p>Reset one or more groups of counters maintained by
<code>ntpd</code>
and exposed by
<code>ntpq</code>
and
-<code>ntpdc</code>.
-<br><dt><code>rlimit</code> <code>[memlock </code><kbd>Nmegabytes</kbd><code> | stacksize </code><kbd>N4kPages</kbd><code> filenum </code><kbd>Nfiledescriptors</kbd><code>]</code><dd>
- <dl>
-<dt><code>memlock</code> <kbd>Nmegabytes</kbd><dd>Specify the number of megabytes of memory that should be
-allocated and locked.
+<code>ntpdc</code>.
+</p></dd>
+<dt><code>rlimit</code> <code>[<code>memlock</code> <kbd>Nmegabytes</kbd> | <code>stacksize</code> <kbd>N4kPages</kbd> <code>filenum</code> <kbd>Nfiledescriptors</kbd>]</code></dt>
+<dd><dl compact="compact">
+<dt><code>memlock</code> <kbd>Nmegabytes</kbd></dt>
+<dd><p>Specify the number of megabytes of memory that should be
+allocated and locked.
Probably only available under Linux, this option may be useful
when dropping root (the
<code>-i</code>
-option).
-The default is 32 megabytes on non-Linux machines, and -1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-<br><dt><code>stacksize</code> <kbd>N4kPages</kbd><dd>Specifies the maximum size of the process stack on systems with the
+option).
+The default is 32 megabytes on non-Linux machines, and -1 under Linux.
+-1 means &quot;do not lock the process into memory&quot;.
+0 means &quot;lock whatever memory the process wants into memory&quot;.
+</p></dd>
+<dt><code>stacksize</code> <kbd>N4kPages</kbd></dt>
+<dd><p>Specifies the maximum size of the process stack on systems with the
<code>mlockall()</code>
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-<br><dt><code>filenum</code> <kbd>Nfiledescriptors</kbd><dd>Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+</p></dd>
+<dt><code>filenum</code> <kbd>Nfiledescriptors</kbd></dt>
+<dd><p>Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+</p></dd>
</dl>
- <br><dt><code>saveconfigdir</code> <kbd>directory_path</kbd><dd>Specify the directory in which to write configuration snapshots
+</dd>
+<dt><code>saveconfigdir</code> <kbd>directory_path</kbd></dt>
+<dd><p>Specify the directory in which to write configuration snapshots
requested with
-.Cm ntpq 's
+.Cm ntpq &rsquo;s
<code>saveconfig</code>
-command.
+command.
If
<code>saveconfigdir</code>
does not appear in the configuration file,
<code>saveconfig</code>
requests are rejected by
-<code>ntpd</code>.
-<br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration, including any runtime
+<code>ntpd</code>.
+</p></dd>
+<dt><code>saveconfig</code> <kbd>filename</kbd></dt>
+<dd><p>Write the current configuration, including any runtime
modifications given with
<code>:config</code>
or
<code>config-from-file</code>
to the
<code>ntpd</code>
-host's
+host&rsquo;s
<kbd>filename</kbd>
in the
-<code>saveconfigdir</code>.
+<code>saveconfigdir</code>.
This command will be rejected unless the
<code>saveconfigdir</code>
directive appears in
-.Cm ntpd 's
-configuration file.
+.Cm ntpd &rsquo;s
+configuration file.
<kbd>filename</kbd>
can use
<code>strftime(3)</code>
format directives to substitute the current date and time,
for example,
-<code>saveconfig\ ntp-%Y%m%d-%H%M%S.conf</code>.
+<code>saveconfig\ ntp-%Y%m%d-%H%M%S.conf</code>.
The filename used is stored in the system variable
-<code>savedconfig</code>.
-Authentication is required.
-<br><dt><code>setvar</code> <kbd>variable</kbd> <code>[default]</code><dd>This command adds an additional system variable.
+<code>savedconfig</code>.
+Authentication is required.
+</p></dd>
+<dt><code>setvar</code> <kbd>variable</kbd> <code>[<code>default</code>]</code></dt>
+<dd><p>This command adds an additional system variable.
These
variables can be used to distribute additional information such as
-the access policy.
+the access policy.
If the variable of the form
<code>name</code><code>=</code><kbd>value</kbd>
is followed by the
<code>default</code>
keyword, the
variable will be listed as part of the default system variables
-(<code>rv</code> command)).
+(<code>rv</code> command)).
These additional variables serve
-informational purposes only.
+informational purposes only.
They are not related to the protocol
-other that they can be listed.
+other that they can be listed.
The known protocol variables will
always override any variables defined via the
<code>setvar</code>
-mechanism.
+mechanism.
There are three special variables that contain the names
-of all variable of the same group.
+of all variable of the same group.
The
<code>sys_var_list</code>
holds
-the names of all system variables.
+the names of all system variables.
The
<code>peer_var_list</code>
holds
the names of all peer variables and the
<code>clock_var_list</code>
-holds the names of the reference clock variables.
-<br><dt><code>sysinfo</code><dd>Display operational summary.
-<br><dt><code>sysstats</code><dd>Show statistics counters maintained in the protocol module.
-<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>step</kbd><code> | stepback </code><kbd>stepback</kbd><code> | stepfwd </code><kbd>stepfwd</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
-very exceptional circumstances.
+holds the names of the reference clock variables.
+</p></dd>
+<dt><code>sysinfo</code></dt>
+<dd><p>Display operational summary.
+</p></dd>
+<dt><code>sysstats</code></dt>
+<dd><p>Show statistics counters maintained in the protocol module.
+</p></dd>
+<dt><code>tinker</code> <code>[<code>allan</code> <kbd>allan</kbd> | <code>dispersion</code> <kbd>dispersion</kbd> | <code>freq</code> <kbd>freq</kbd> | <code>huffpuff</code> <kbd>huffpuff</kbd> | <code>panic</code> <kbd>panic</kbd> | <code>step</code> <kbd>step</kbd> | <code>stepback</code> <kbd>stepback</kbd> | <code>stepfwd</code> <kbd>stepfwd</kbd> | <code>stepout</code> <kbd>stepout</kbd>]</code></dt>
+<dd><p>This command can be used to alter several system variables in
+very exceptional circumstances.
It should occur in the
-configuration file before any other configuration options.
+configuration file before any other configuration options.
The
default values of these variables have been carefully optimized for
-a wide range of network speeds and reliability expectations.
+a wide range of network speeds and reliability expectations.
In
general, they interact in intricate ways that are hard to predict
-and some combinations can result in some very nasty behavior.
+and some combinations can result in some very nasty behavior.
Very
rarely is it necessary to change the default values; but, some
folks cannot resist twisting the knobs anyway and this command is
-for them.
+for them.
Emphasis added: twisters are on their own and can expect
no help from the support group.
-
- <p>The variables operate as follows:
- <dl>
-<dt><code>allan</code> <kbd>allan</kbd><dd>The argument becomes the new value for the minimum Allan
+</p>
+<p>The variables operate as follows:
+</p><dl compact="compact">
+<dt><code>allan</code> <kbd>allan</kbd></dt>
+<dd><p>The argument becomes the new value for the minimum Allan
intercept, which is a parameter of the PLL/FLL clock discipline
-algorithm.
+algorithm.
The value in log2 seconds defaults to 7 (1024 s), which is also the lower
-limit.
-<br><dt><code>dispersion</code> <kbd>dispersion</kbd><dd>The argument becomes the new value for the dispersion increase rate,
-normally .000015 s/s.
-<br><dt><code>freq</code> <kbd>freq</kbd><dd>The argument becomes the initial value of the frequency offset in
-parts-per-million.
+limit.
+</p></dd>
+<dt><code>dispersion</code> <kbd>dispersion</kbd></dt>
+<dd><p>The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+</p></dd>
+<dt><code>freq</code> <kbd>freq</kbd></dt>
+<dd><p>The argument becomes the initial value of the frequency offset in
+parts-per-million.
This overrides the value in the frequency file, if
-present, and avoids the initial training state if it is not.
-<br><dt><code>huffpuff</code> <kbd>huffpuff</kbd><dd>The argument becomes the new value for the experimental
-huff-n'-puff filter span, which determines the most recent interval
-the algorithm will search for a minimum delay.
+present, and avoids the initial training state if it is not.
+</p></dd>
+<dt><code>huffpuff</code> <kbd>huffpuff</kbd></dt>
+<dd><p>The argument becomes the new value for the experimental
+huff-n&rsquo;-puff filter span, which determines the most recent interval
+the algorithm will search for a minimum delay.
The lower limit is
-900 s (15 m), but a more reasonable value is 7200 (2 hours).
+900 s (15 m), but a more reasonable value is 7200 (2 hours).
There
is no default, since the filter is not enabled unless this command
-is given.
-<br><dt><code>panic</code> <kbd>panic</kbd><dd>The argument is the panic threshold, normally 1000 s.
+is given.
+</p></dd>
+<dt><code>panic</code> <kbd>panic</kbd></dt>
+<dd><p>The argument is the panic threshold, normally 1000 s.
If set to zero,
the panic sanity check is disabled and a clock offset of any value will
-be accepted.
-<br><dt><code>step</code> <kbd>step</kbd><dd>The argument is the step threshold, which by default is 0.128 s.
+be accepted.
+</p></dd>
+<dt><code>step</code> <kbd>step</kbd></dt>
+<dd><p>The argument is the step threshold, which by default is 0.128 s.
It can
-be set to any positive number in seconds.
+be set to any positive number in seconds.
If set to zero, step
-adjustments will never occur.
+adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
-default.
-<br><dt><code>stepback</code> <kbd>stepback</kbd><dd>The argument is the step threshold for the backward direction,
-which by default is 0.128 s.
+default.
+</p></dd>
+<dt><code>stepback</code> <kbd>stepback</kbd></dt>
+<dd><p>The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
It can
-be set to any positive number in seconds.
+be set to any positive number in seconds.
If both the forward and backward step thresholds are set to zero, step
-adjustments will never occur.
+adjustments will never occur.
Note: The kernel time discipline is
disabled if
each direction of step threshold are either
-set to zero or greater than .5 second.
-<br><dt><code>stepfwd</code> <kbd>stepfwd</kbd><dd>As for stepback, but for the forward direction.
-<br><dt><code>stepout</code> <kbd>stepout</kbd><dd>The argument is the stepout timeout, which by default is 900 s.
+set to zero or greater than .5 second.
+</p></dd>
+<dt><code>stepfwd</code> <kbd>stepfwd</kbd></dt>
+<dd><p>As for stepback, but for the forward direction.
+</p></dd>
+<dt><code>stepout</code> <kbd>stepout</kbd></dt>
+<dd><p>The argument is the stepout timeout, which by default is 900 s.
It can
-be set to any positive number in seconds.
+be set to any positive number in seconds.
If set to zero, the stepout
-pulses will not be suppressed.
+pulses will not be suppressed.
+</p></dd>
</dl>
- <br><dt><code>writevar</code> <kbd>assocID\ name</kbd> <kbd>=</kbd> <kbd>value</kbd> <kbd>[,...]</kbd><dd>Write (create or update) the specified variables.
+</dd>
+<dt><code>writevar</code> <kbd>assocID\ name</kbd> <kbd>=</kbd> <kbd>value</kbd> <kbd>[,...]</kbd></dt>
+<dd><p>Write (create or update) the specified variables.
If the
<code>assocID</code>
is zero, the variablea re from the
system variables
name space, otherwise they are from the
peer variables
-name space.
+name space.
The
<code>assocID</code>
-is required, as the same name can occur in both name spaces.
-<br><dt><code>trap</code> <kbd>host_address</kbd> <code>[port </code><kbd>port_number</kbd><code>]</code> <code>[interface </code><kbd>interface_address</kbd><code>]</code><dd>This command configures a trap receiver at the given host
+is required, as the same name can occur in both name spaces.
+</p></dd>
+<dt><code>trap</code> <kbd>host_address</kbd> <code>[<code>port</code> <kbd>port_number</kbd>]</code> <code>[<code>interface</code> <kbd>interface_address</kbd>]</code></dt>
+<dd><p>This command configures a trap receiver at the given host
address and port number for sending messages with the specified
-local interface address.
+local interface address.
If the port number is unspecified, a value
-of 18447 is used.
+of 18447 is used.
If the interface address is not specified, the
message is sent with a source address of the local interface the
-message is sent through.
+message is sent through.
Note that on a multihomed host the
-interface used may vary from time to time with routing changes.
-<br><dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd><dd>This command specifies a list of TTL values in increasing order.
-Up to 8 values can be specified.
+interface used may vary from time to time with routing changes.
+</p></dd>
+<dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd></dt>
+<dd><p>This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
In
<code>manycast</code>
-mode these values are used in-turn in an expanding-ring search.
+mode these values are used in-turn in an expanding-ring search.
The default is eight multiples of 32 starting at 31.
-
- <p>The trap receiver will generally log event messages and other
-information from the server in a log file.
+</p>
+<p>The trap receiver will generally log event messages and other
+information from the server in a log file.
While such monitor
programs may also request their own trap dynamically, configuring a
trap receiver will ensure that no messages are lost when the server
-is started.
-<br><dt><code>hop</code> <kbd>...</kbd><dd>This command specifies a list of TTL values in increasing order, up to 8
-values can be specified.
+is started.
+</p></dd>
+<dt><code>hop</code> <kbd>...</kbd></dt>
+<dd><p>This command specifies a list of TTL values in increasing order, up to 8
+values can be specified.
In manycast mode these values are used in turn in
-an expanding-ring search.
+an expanding-ring search.
The default is eight multiples of 32 starting at
-31.
+31.
+</p></dd>
</dl>
- <p>This section was generated by <strong>AutoGen</strong>,
-using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.conf</code> program.
+<p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.conf</code> program.
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
-
-<ul class="menu">
-<li><a accesskey="1" href="#ntp_002econf-Files">ntp.conf Files</a>: Files
-<li><a accesskey="2" href="#ntp_002econf-See-Also">ntp.conf See Also</a>: See Also
-<li><a accesskey="3" href="#ntp_002econf-Bugs">ntp.conf Bugs</a>: Bugs
-<li><a accesskey="4" href="#ntp_002econf-Notes">ntp.conf Notes</a>: Notes
-</ul>
-
-<div class="node">
-<p><hr>
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="1">ntp.conf Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="2">ntp.conf See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs" accesskey="3">ntp.conf Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="4">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+</td></tr>
+</table>
+
+<hr>
<a name="ntp_002econf-Files"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#ntp_002econf-See-Also" accesskey="n" rel="next">ntp.conf See Also</a>, Previous: <a href="#Miscellaneous-Options" accesskey="p" rel="prev">Miscellaneous Options</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntp.conf Files</h4>
-
- <dl>
-<dt><span class="file">/etc/ntp.conf</span><dd>the default name of the configuration file
-<br><dt><span class="file">ntp.keys</span><dd>private MD5 keys
-<br><dt><span class="file">ntpkey</span><dd>RSA private key
-<br><dt><span class="file">ntpkey_</span><kbd>host</kbd><dd>RSA public key
-<br><dt><span class="file">ntp_dh</span><dd>Diffie-Hellman agreement parameters
+<a name="ntp_002econf-Files-1"></a>
+<h4 class="subsection">1.1.8 ntp.conf Files</h4>
+<dl compact="compact">
+<dt><samp>/etc/ntp.conf</samp></dt>
+<dd><p>the default name of the configuration file
+</p></dd>
+<dt><samp>ntp.keys</samp></dt>
+<dd><p>private MD5 keys
+</p></dd>
+<dt><samp>ntpkey</samp></dt>
+<dd><p>RSA private key
+</p></dd>
+<dt><samp>ntpkey_</samp><kbd>host</kbd></dt>
+<dd><p>RSA public key
+</p></dd>
+<dt><samp>ntp_dh</samp></dt>
+<dd><p>Diffie-Hellman agreement parameters
+</p></dd>
</dl>
-<div class="node">
-<p><hr>
+<hr>
<a name="ntp_002econf-See-Also"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#ntp_002econf-Bugs" accesskey="n" rel="next">ntp.conf Bugs</a>, Previous: <a href="#ntp_002econf-Files" accesskey="p" rel="prev">ntp.conf Files</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntp.conf See Also</h4>
-
+<a name="ntp_002econf-See-Also-1"></a>
+<h4 class="subsection">1.1.9 ntp.conf See Also</h4>
<p><code>ntpd(1ntpdmdoc)</code>,
<code>ntpdc(1ntpdcmdoc)</code>,
<code>ntpq(1ntpqmdoc)</code>
-
- <p>In addition to the manual pages provided,
+</p>
+<p>In addition to the manual pages provided,
comprehensive documentation is available on the world wide web
at
-<code>http://www.ntp.org/</code>.
+<code>http://www.ntp.org/</code>.
A snapshot of this documentation is available in HTML format in
-<span class="file">/usr/share/doc/ntp</span>.
+<samp>/usr/share/doc/ntp</samp>.
<br>
-
- <p><br>
-David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
-<div class="node">
-<p><hr>
-<a name="ntp_002econf-Bugs"></a>
+</p>
<br>
+<p>David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
+</p><hr>
+<a name="ntp_002econf-Bugs"></a>
+<div class="header">
+<p>
+Previous: <a href="#ntp_002econf-See-Also" accesskey="p" rel="prev">ntp.conf See Also</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntp.conf Bugs</h4>
-
+<a name="ntp_002econf-Bugs-1"></a>
+<h4 class="subsection">1.1.10 ntp.conf Bugs</h4>
<p>The syntax checking is not picky; some combinations of
ridiculous and even hilarious options and modes may not be
detected.
-
- <p>The
-<span class="file">ntpkey_</span><kbd>host</kbd>
+</p>
+<p>The
+<samp>ntpkey_</samp><kbd>host</kbd>
files are really digital
-certificates.
+certificates.
These should be obtained via secure directory
-services when they become universally available.
-<div class="node">
-<p><hr>
-<a name="ntp_002econf-Notes"></a>
-<br>
+services when they become universally available.
+</p><hr>
+<div class="header">
+<p>
+ &nbsp; </p>
</div>
-
-<h4 class="subsection">ntp.conf Notes</h4>
-
+<a name="ntp_002econf-Notes-1"></a>
+<h4 class="subsection">1.1.11 ntp.conf Notes</h4>
<p>This document was derived from FreeBSD.
+</p><hr>
+
-</body></html>
+</body>
+</html>
diff --git a/contrib/ntp/ntpd/ntp.conf.man.in b/contrib/ntp/ntpd/ntp.conf.man.in
index 0f2b211..d1d9ca5 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 "27 Feb 2018" "4.2.8p11" "File Formats"
+.TH ntp.conf 5 "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LkaqTP/ag-XkaiSP)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:22 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:43 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -326,7 +326,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
\f\*[I-Font]key\f[]
-identifier with values from 1 to 65534, inclusive.
+identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.TP 7
@@ -611,7 +611,7 @@ and reports at the NTP project page linked from
\f[C]http://www.ntp.org/\f[].
.SS Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32-bit key identifier, to
+65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -932,7 +932,7 @@ The
\f\*[I-Font]key\f[]
argument is
the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
+range 1 to 65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
This command requires the OpenSSL library.
@@ -1038,7 +1038,7 @@ The
\f\*[I-Font]key\f[]
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
+65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[]
Specifies the interval between re-randomization of certain
@@ -1067,7 +1067,7 @@ servers.
The
\f\*[I-Font]key\f[]
arguments are 32-bit unsigned
-integers with values from 1 to 65,534.
+integers with values from 1 to 65,535.
.PP
.SS Error Codes
The following error codes are reported via the NTP control
diff --git a/contrib/ntp/ntpd/ntp.conf.mdoc.in b/contrib/ntp/ntpd/ntp.conf.mdoc.in
index 321acc9..a1c795d 100644
--- a/contrib/ntp/ntpd/ntp.conf.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 27 2018
+.Dd February 20 2019
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:42 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:34 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -325,7 +325,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
.Ar key
-identifier with values from 1 to 65534, inclusive.
+identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.It Cm minpoll Ar minpoll
@@ -583,7 +583,7 @@ and reports at the NTP project page linked from
.Li http://www.ntp.org/ .
.Ss Symmetric\-Key Cryptography
The original RFC\-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32\-bit key identifier, to
+65,535 keys, each distinguished by a 32\-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -877,7 +877,7 @@ The
.Ar key
argument is
the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
+range 1 to 65,535, inclusive.
.It Xo Ic crypto
.Op Cm cert Ar file
.Op Cm leap Ar file
@@ -981,7 +981,7 @@ The
.Ar key
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
+65,535, inclusive.
.It Ic revoke Ar logsec
Specifies the interval between re\-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -1008,7 +1008,7 @@ servers.
The
.Ar key
arguments are 32\-bit unsigned
-integers with values from 1 to 65,534.
+integers with values from 1 to 65,535.
.El
.Ss Error Codes
The following error codes are reported via the NTP control
diff --git a/contrib/ntp/ntpd/ntp.keys.5man b/contrib/ntp/ntpd/ntp.keys.5man
index b107e02..2642c56 100644
--- a/contrib/ntp/ntpd/ntp.keys.5man
+++ b/contrib/ntp/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "27 Feb 2018" "4.2.8p11" "File Formats"
+.TH ntp.keys 5man "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:44 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -54,7 +54,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
-one or more keys numbered between 1 and 65534
+one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.sp \n(Ppu
.ne 2
@@ -73,7 +73,7 @@ Key entries use a fixed format of the form
where
\f\*[I-Font]keyno\f[]
-is a positive integer (between 1 and 65534),
+is a positive integer (between 1 and 65535),
\f\*[I-Font]type\f[]
is the message digest algorithm,
\f\*[I-Font]key\f[]
diff --git a/contrib/ntp/ntpd/ntp.keys.5mdoc b/contrib/ntp/ntpd/ntp.keys.5mdoc
index bec3980..8a2dbcbc 100644
--- a/contrib/ntp/ntpd/ntp.keys.5mdoc
+++ b/contrib/ntp/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd February 27 2018
+.Dd February 20 2019
.Dt NTP_KEYS 5mdoc File Formats
-.Os SunOS 5.10
+.Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:46 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:35 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -37,7 +37,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
-one or more keys numbered between 1 and 65534
+one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.Pp
The key file uses the same comment conventions
@@ -48,7 +48,7 @@ Key entries use a fixed format of the form
.Pp
where
.Ar keyno
-is a positive integer (between 1 and 65534),
+is a positive integer (between 1 and 65535),
.Ar type
is the message digest algorithm,
.Ar key
diff --git a/contrib/ntp/ntpd/ntp.keys.def b/contrib/ntp/ntpd/ntp.keys.def
index 88dd2aa..e73ce4d 100644
--- a/contrib/ntp/ntpd/ntp.keys.def
+++ b/contrib/ntp/ntpd/ntp.keys.def
@@ -36,7 +36,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
-one or more keys numbered between 1 and 65534
+one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.Pp
The key file uses the same comment conventions
@@ -47,7 +47,7 @@ Key entries use a fixed format of the form
.Pp
where
.Ar keyno
-is a positive integer (between 1 and 65534),
+is a positive integer (between 1 and 65535),
.Ar type
is the message digest algorithm,
.Ar key
diff --git a/contrib/ntp/ntpd/ntp.keys.html b/contrib/ntp/ntpd/ntp.keys.html
index 28a4076..08d8922 100644
--- a/contrib/ntp/ntpd/ntp.keys.html
+++ b/contrib/ntp/ntpd/ntp.keys.html
@@ -1,103 +1,145 @@
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>NTP Symmetric Key</title>
-<meta http-equiv="Content-Type" content="text/html">
+
<meta name="description" content="NTP Symmetric Key">
-<meta name="generator" content="makeinfo 4.7">
-<link title="Top" rel="top" href="#Top">
-<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family: serif; font-weight: normal; }
---></style>
+<meta name="keywords" content="NTP Symmetric Key">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
+<link href="#Top" rel="start" title="Top">
+<link href="dir.html#Top" rel="up" title="(dir)">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.indentedblock {margin-right: 0em}
+blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style: oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nolinebreak {white-space: nowrap}
+span.roman {font-family: initial; font-weight: normal}
+span.sansserif {font-family: sans-serif; font-weight: normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
</head>
-<body>
-<h1 class="settitle">NTP Symmetric Key</h1>
-<div class="node">
-<p><hr>
-<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Description">ntp.keys Description</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
-<br>
-</div>
-<h2 class="unnumbered">NTP's Symmetric Key File User Manual</h2>
+<body lang="en">
+<h1 class="settitle" align="center">NTP Symmetric Key</h1>
-<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.8p11 of <code>ntp.keys</code>.
- <div class="shortcontents">
-<h2>Short Contents</h2>
-<ul>
-<a href="#Top">NTP's Symmetric Key File User Manual</a>
-</ul>
+
+
+<a name="Top"></a>
+<div class="header">
+<p>
+Next: <a href="#ntp_002ekeys-Description" accesskey="n" rel="next">ntp.keys Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
+<a name="NTP_0027s-Symmetric-Key-File-User-Manual"></a>
+<h1 class="top">NTP&rsquo;s Symmetric Key File User Manual</h1>
-<ul class="menu">
-<li><a accesskey="1" href="#ntp_002ekeys-Description">ntp.keys Description</a>
-<li><a accesskey="2" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
-</ul>
+<p>This document describes the symmetric key file for the NTP Project&rsquo;s
+<code>ntpd</code> program.
+</p>
+<p>This document applies to version 4.2.8p13 of <code>ntp.keys</code>.
+</p>
+<a name="SEC_Overview"></a>
+<h2 class="shortcontents-heading">Short Table of Contents</h2>
-<div class="node">
-<p><hr>
-<a name="ntp_002ekeys-Description"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
+<div class="shortcontents">
+<ul class="no-bullet">
+<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+</ul>
</div>
-<!-- node-name, next, previous, up -->
-<h3 class="section">Description</h3>
+
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Description" accesskey="1">ntp.keys Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="2">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+</table>
+
+<hr>
+<a name="ntp_002ekeys-Description"></a>
+<div class="header">
+<p>
+Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
+</div>
+<a name="Description"></a>
+<h2 class="chapter">1 Description</h2>
<p>The name and location of the symmetric key file for <code>ntpd</code> can
be specified in a configuration file, by default <code>/etc/ntp.keys</code>.
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="1">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+</table>
-<div class="node">
-<p><hr>
+<hr>
<a name="ntp_002ekeys-Notes"></a>
-<br>
+<div class="header">
+<p>
+Previous: <a href="#ntp_002ekeys-See-Also" accesskey="p" rel="prev">ntp.keys See Also</a>, Up: <a href="#ntp_002ekeys-Description" accesskey="u" rel="up">ntp.keys Description</a> &nbsp; </p>
</div>
+<a name="Notes-about-ntp_002ekeys"></a>
+<h3 class="section">1.1 Notes about ntp.keys</h3>
+<a name="index-ntp_002ekeys"></a>
+<a name="index-NTP-symmetric-key-file-format"></a>
-<h3 class="section">Notes about ntp.keys</h3>
-<p><a name="index-ntp_002ekeys-1"></a><a name="index-NTP-symmetric-key-file-format-2"></a>
- <p>This document describes the format of an NTP symmetric key file.
+<p>This document describes the format of an NTP symmetric key file.
For a description of the use of this type of file, see the
-"Authentication Support"
+&quot;Authentication Support&quot;
section of the
<code>ntp.conf(5)</code>
page.
-
- <p><code>ntpd(8)</code>
+</p>
+<p><code>ntpd(8)</code>
reads its keys from a file specified using the
<code>-k</code>
command line option or the
<code>keys</code>
-statement in the configuration file.
+statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
-one or more keys numbered between 1 and 65534
+one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
-
- <p>The key file uses the same comment conventions
-as the configuration file.
+</p>
+<p>The key file uses the same comment conventions
+as the configuration file.
Key entries use a fixed format of the form
+</p>
+<div class="example">
+<pre class="example"><kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd> <kbd>opt_IP_list</kbd>
+</pre></div>
-<pre class="example"> <kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd> <kbd>opt_IP_list</kbd>
-</pre>
- <p>where
+<p>where
<kbd>keyno</kbd>
-is a positive integer (between 1 and 65534),
+is a positive integer (between 1 and 65535),
<kbd>type</kbd>
is the message digest algorithm,
<kbd>key</kbd>
@@ -106,111 +148,120 @@ is the key itself, and
is an optional comma-separated list of IPs
where the
<kbd>keyno</kbd>
-should be trusted.
-that are allowed to serve time.
+should be trusted.
+that are allowed to serve time.
Each IP in
<kbd>opt_IP_list</kbd>
may contain an optional
<code>/subnetbits</code>
specification which identifies the number of bits for
-the desired subnet of trust.
+the desired subnet of trust.
If
<kbd>opt_IP_list</kbd>
is empty,
any properly-authenticated message will be
accepted.
-
- <p>The
+</p>
+<p>The
<kbd>key</kbd>
may be given in a format
controlled by the
<kbd>type</kbd>
-field.
+field.
The
<kbd>type</kbd>
<code>MD5</code>
-is always supported.
+is always supported.
If
<code>ntpd</code>
was built with the OpenSSL library
-then any digest library supported by that library may be specified.
+then any digest library supported by that library may be specified.
However, if compliance with FIPS 140-2 is required the
<kbd>type</kbd>
must be either
<code>SHA</code>
or
<code>SHA1</code>.
-
- <p>What follows are some key types, and corresponding formats:
-
- <dl>
-<dt><code>MD5</code><dd>The key is 1 to 16 printable characters terminated by
+</p>
+<p>What follows are some key types, and corresponding formats:
+</p>
+<dl compact="compact">
+<dt><code>MD5</code></dt>
+<dd><p>The key is 1 to 16 printable characters terminated by
an EOL,
whitespace,
or
a
<code>#</code>
-(which is the "start of comment" character).
-
- <br><dt><code>SHA</code><br><dt><code>SHA1</code><br><dt><code>RMD160</code><dd>The key is a hex-encoded ASCII string of 40 characters,
-which is truncated as necessary.
+(which is the &quot;start of comment&quot; character).
+</p>
+</dd>
+<dt><code>SHA</code></dt>
+<dt><code>SHA1</code></dt>
+<dt><code>RMD160</code></dt>
+<dd><p>The key is a hex-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+</p></dd>
</dl>
- <p>Note that the keys used by the
+<p>Note that the keys used by the
<code>ntpq(8)</code>
and
<code>ntpdc(8)</code>
programs are checked against passwords
requested by the programs and entered by hand,
so it is generally appropriate to specify these keys in ASCII format.
-
- <p>This section was generated by <strong>AutoGen</strong>,
-using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.keys</code> program.
+</p>
+<p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.keys</code> program.
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Files" accesskey="1">ntp.keys Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-See-Also" accesskey="2">ntp.keys See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="3">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+</td></tr>
+</table>
-<ul class="menu">
-<li><a accesskey="1" href="#ntp_002ekeys-Files">ntp.keys Files</a>: Files
-<li><a accesskey="2" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>: See Also
-<li><a accesskey="3" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>: Notes
-</ul>
-
-<div class="node">
-<p><hr>
-<a name="ntp_002ekeys-Files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
-<br>
+<hr>
+<a name="ntp_002ekeys-Files"></a>
+<div class="header">
+<p>
+Next: <a href="#ntp_002ekeys-See-Also" accesskey="n" rel="next">ntp.keys See Also</a>, Up: <a href="#ntp_002ekeys-Notes" accesskey="u" rel="up">ntp.keys Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntp.keys Files</h4>
-
- <dl>
-<dt><span class="file">/etc/ntp.keys</span><dd>the default name of the configuration file
+<a name="ntp_002ekeys-Files-1"></a>
+<h4 class="subsection">1.1.1 ntp.keys Files</h4>
+<dl compact="compact">
+<dt><samp>/etc/ntp.keys</samp></dt>
+<dd><p>the default name of the configuration file
+</p></dd>
</dl>
-<div class="node">
-<p><hr>
-<a name="ntp_002ekeys-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-Files">ntp.keys Files</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
-<br>
+<hr>
+<a name="ntp_002ekeys-See-Also"></a>
+<div class="header">
+<p>
+Previous: <a href="#ntp_002ekeys-Files" accesskey="p" rel="prev">ntp.keys Files</a>, Up: <a href="#ntp_002ekeys-Notes" accesskey="u" rel="up">ntp.keys Notes</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntp.keys See Also</h4>
-
+<a name="ntp_002ekeys-See-Also-1"></a>
+<h4 class="subsection">1.1.2 ntp.keys See Also</h4>
<p><code>ntp.conf(5)</code>,
<code>ntpd(1ntpdmdoc)</code>,
<code>ntpdate(1ntpdatemdoc)</code>,
<code>ntpdc(1ntpdcmdoc)</code>,
<code>sntp(1sntpmdoc)</code>
-<div class="node">
-<p><hr>
-<a name="ntp_002ekeys-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
-<br>
+</p><hr>
+<div class="header">
+<p>
+ &nbsp; </p>
</div>
-
-<h4 class="subsection">ntp.keys Notes</h4>
-
+<a name="ntp_002ekeys-Notes-1"></a>
+<h4 class="subsection">1.1.3 ntp.keys Notes</h4>
<p>This document was derived from FreeBSD.
+</p><hr>
+
-</body></html>
+</body>
+</html>
diff --git a/contrib/ntp/ntpd/ntp.keys.man.in b/contrib/ntp/ntpd/ntp.keys.man.in
index 3712747..9d8b995 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 "27 Feb 2018" "4.2.8p11" "File Formats"
+.TH ntp.keys 5 "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:44 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -54,7 +54,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
-one or more keys numbered between 1 and 65534
+one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.sp \n(Ppu
.ne 2
@@ -73,7 +73,7 @@ Key entries use a fixed format of the form
where
\f\*[I-Font]keyno\f[]
-is a positive integer (between 1 and 65534),
+is a positive integer (between 1 and 65535),
\f\*[I-Font]type\f[]
is the message digest algorithm,
\f\*[I-Font]key\f[]
diff --git a/contrib/ntp/ntpd/ntp.keys.mdoc.in b/contrib/ntp/ntpd/ntp.keys.mdoc.in
index 6dc4f88..1bc36e3 100644
--- a/contrib/ntp/ntpd/ntp.keys.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 27 2018
+.Dd February 20 2019
.Dt NTP_KEYS 5 File Formats
-.Os SunOS 5.10
+.Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:46 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:35 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -37,7 +37,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
-one or more keys numbered between 1 and 65534
+one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.Pp
The key file uses the same comment conventions
@@ -48,7 +48,7 @@ Key entries use a fixed format of the form
.Pp
where
.Ar keyno
-is a positive integer (between 1 and 65534),
+is a positive integer (between 1 and 65535),
.Ar type
is the message digest algorithm,
.Ar key
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
index 003b153..0597393 100644
--- a/contrib/ntp/ntpd/ntp_config.c
+++ b/contrib/ntp/ntpd/ntp_config.c
@@ -364,7 +364,7 @@ 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);
-static void appendstr(char *, size_t, char *);
+static void appendstr(char *, size_t, const char *);
#ifndef SIM
@@ -382,14 +382,14 @@ 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
* ----------------------------
*/
@@ -742,7 +742,7 @@ dump_config_tree(
atrv->value.i);
}
break;
-
+
case T_Double:
fprintf(df, " %s %s",
keyword(atrv->attr),
@@ -938,7 +938,7 @@ dump_config_tree(
if (T_Source == flag_tok_fifo->i) {
s = "source";
break;
- }
+ }
}
} else {
const char *ap = rest_node->addr->address;
@@ -1446,7 +1446,7 @@ create_unpeer_node(
/* accumulate with overflow retention */
u = (10 * u + *pch - '0') | (u & 0xFF000000u);
}
-
+
if (!*pch && u <= ASSOCID_MAX) {
my_node->assocID = (associd_t)u;
my_node->addr = NULL;
@@ -2065,8 +2065,12 @@ config_auth(
#ifdef AUTOKEY
/* crypto revoke command */
- if (ptree->auth.revoke)
- sys_revoke = 1UL << ptree->auth.revoke;
+ if (ptree->auth.revoke > 2 && ptree->auth.revoke < 32)
+ sys_revoke = (u_char)ptree->auth.revoke;
+ else if (ptree->auth.revoke)
+ msyslog(LOG_ERR,
+ "'revoke' value %d ignored",
+ ptree->auth.revoke);
#endif /* AUTOKEY */
}
#endif /* !SIM */
@@ -2112,6 +2116,10 @@ config_tos_clock(
break;
}
}
+
+ if (basedate_get_day() <= NTP_TO_UNIX_DAYS)
+ basedate_set_day(basedate_eval_buildstamp() - 11);
+
return ret;
}
@@ -2132,7 +2140,7 @@ config_tos(
* 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;
@@ -2162,7 +2170,7 @@ config_tos(
tos->value.d = 0;
}
break;
-
+
case T_Ceiling:
val = tos->value.d;
if (val > STRATUM_UNSPEC - 1) {
@@ -2194,8 +2202,8 @@ config_tos(
case T_Minsane:
val = tos->value.d;
- if ((int)tos->value.d < 1)
- tos->value.d = 1;
+ if ((int)tos->value.d < 0)
+ tos->value.d = 0;
l_minsane = (int)tos->value.d;
break;
}
@@ -2207,7 +2215,7 @@ config_tos(
" - 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) {
@@ -3383,6 +3391,10 @@ config_ttl(
size_t i = 0;
int_node *curr_ttl;
+ /* [Bug 3465] There is a built-in default for the TTLs. We must
+ * overwrite 'sys_ttlmax' if we change that preset, and leave it
+ * alone otherwise!
+ */
curr_ttl = HEAD_PFIFO(ptree->ttl);
for (; curr_ttl != NULL; curr_ttl = curr_ttl->link) {
if (i < COUNTOF(sys_ttl))
@@ -3392,7 +3404,8 @@ config_ttl(
"ttl: Number of TTL entries exceeds %zu. Ignoring TTL %d...",
COUNTOF(sys_ttl), curr_ttl->i);
}
- sys_ttlmax = (i) ? (i - 1) : 0;
+ if (0 != i) /* anything written back at all? */
+ sys_ttlmax = i - 1;
}
#endif /* !SIM */
@@ -3621,10 +3634,8 @@ config_fudge(
err_flag = 1;
msyslog(LOG_ERR,
"unrecognized fudge reference clock address %s, line ignored",
- stoa(&addr_sock));
- }
-
- if (!ISREFCLOCKADR(&addr_sock)) {
+ addr_node->address);
+ } else if (!ISREFCLOCKADR(&addr_sock)) {
err_flag = 1;
msyslog(LOG_ERR,
"inappropriate address %s for the fudge command, line ignored",
@@ -3696,7 +3707,7 @@ config_fudge(
msyslog(LOG_ERR,
"Unexpected fudge flag %s (%d) for %s",
token_name(curr_opt->attr),
- curr_opt->attr, stoa(&addr_sock));
+ curr_opt->attr, addr_node->address);
exit(curr_opt->attr ? curr_opt->attr : 1);
}
}
@@ -3810,7 +3821,12 @@ config_vars(
case T_Automax:
#ifdef AUTOKEY
- sys_automax = curr_var->value.i;
+ if (curr_var->value.i > 2 && curr_var->value.i < 32)
+ sys_automax = (u_char)curr_var->value.i;
+ else
+ msyslog(LOG_ERR,
+ "'automax' value %d ignored",
+ curr_var->value.i);
#endif
break;
@@ -4565,7 +4581,7 @@ config_ntpd(
if (config_tos_clock(ptree))
clamp_systime();
}
-
+
config_nic_rules(ptree, input_from_files);
config_monitor(ptree);
config_auth(ptree);
@@ -4845,7 +4861,7 @@ is_refclk_addr(
const address_node * addr
)
{
- return addr && addr->address && !strncmp(addr->address, "127.127.", 6);
+ return addr && addr->address && !strncmp(addr->address, "127.127.", 8);
}
static void
@@ -5463,7 +5479,7 @@ static void
appendstr(
char *string,
size_t s,
- char *new
+ const char *new
)
{
if (*string != '\0') {
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index d98f6aa..49a197e 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -916,7 +916,7 @@ is_safe_filename(const char * name)
u_int widx, bidx, mask;
if ( ! (name && *name))
return FALSE;
-
+
mask = 1u;
while (0 != (widx = (u_char)*name++)) {
bidx = (widx & 15) << 1;
@@ -955,7 +955,7 @@ save_config(
* level. On POSIX systems we could allow '\\' but such
* filenames are tricky to manipulate from a shell, so just
* reject both types of slashes on all platforms.
- */
+ */
/* TALOS-CAN-0062: block directory traversal for VMS, too */
static const char * illegal_in_filename =
#if defined(VMS)
@@ -983,8 +983,8 @@ save_config(
# if defined(_O_TEXT) /* windows, again */
| _O_TEXT
#endif
- ;
-
+ ;
+
char filespec[128];
char filename[128];
char fullpath[512];
@@ -1046,7 +1046,7 @@ save_config(
/* copy data directly as we exactly know the size */
memcpy(filespec, reqpt, reqlen);
filespec[reqlen] = '\0';
-
+
/*
* allow timestamping of the saved config filename with
* strftime() format such as:
@@ -1110,7 +1110,7 @@ save_config(
*/
prc = snprintf(fullpath, sizeof(fullpath), "%s%s",
saveconfigdir, filename);
- if (prc < 0 || prc >= sizeof(fullpath)) {
+ if (prc < 0 || (size_t)prc >= sizeof(fullpath)) {
ctl_printf("saveconfig exceeded maximum path length (%u)",
(u_int)sizeof(fullpath));
ctl_flushpkt(0);
@@ -1127,8 +1127,8 @@ save_config(
fptr = fdopen(fd, "w");
if (NULL == fptr || -1 == dump_all_config_trees(fptr, 1)) {
- ctl_printf("Unable to save configuration to file '%s': %m",
- filename);
+ ctl_printf("Unable to save configuration to file '%s': %s",
+ filename, strerror(errno));
msyslog(LOG_ERR,
"saveconfig %s from %s failed", filename,
stoa(&rbufp->recv_srcadr));
@@ -1154,7 +1154,7 @@ save_config(
#else /* !SAVECONFIG follows */
ctl_printf("%s",
"saveconfig unavailable, configured with --disable-saveconfig");
-#endif
+#endif
ctl_flushpkt(0);
}
@@ -1506,11 +1506,11 @@ ctl_putdata_ex(
} else {
datanotbinflag = TRUE;
add_len = 3;
-
+
if (datasent) {
*datapt++ = ',';
datalinelen++;
-
+
/* sum up total length */
for (argi = 0, src_len = 0; argi < argc; ++argi)
src_len += argv[argi].len;
@@ -1539,14 +1539,14 @@ ctl_putdata_ex(
/* Not enough room in this one, flush it out. */
if (src_len < cur_len)
cur_len = src_len;
-
+
memcpy(datapt, src_ptr, cur_len);
datapt += cur_len;
datalinelen += cur_len;
src_ptr += cur_len;
src_len -= cur_len;
-
+
ctl_flushpkt(CTL_MORE);
cur_len = (size_t)(dataend - datapt);
}
@@ -1571,7 +1571,7 @@ ctl_putdata(
)
{
CtlMemBufT args[1];
-
+
args[0].buf = dp;
args[0].len = dlen;
ctl_putdata_ex(args, 1, bin);
@@ -1594,7 +1594,7 @@ ctl_putstr(
)
{
CtlMemBufT args[4];
-
+
args[0].buf = tag;
args[0].len = strlen(tag);
if (data && len) {
@@ -1606,7 +1606,9 @@ ctl_putstr(
args[3].len = 1;
ctl_putdata_ex(args, 4, FALSE);
} else {
- ctl_putdata_ex(args, 1, FALSE);
+ args[1].buf = "=\"\"";
+ args[1].len = 3;
+ ctl_putdata_ex(args, 2, FALSE);
}
}
@@ -1628,17 +1630,17 @@ ctl_putunqstr(
)
{
CtlMemBufT args[3];
-
+
args[0].buf = tag;
args[0].len = strlen(tag);
+ args[1].buf = "=";
+ args[1].len = 1;
if (data && len) {
- args[1].buf = "=";
- args[1].len = 1;
- args[2].buf = data;
- args[2].len = len;
- ctl_putdata_ex(args, 3, FALSE);
+ args[2].buf = data;
+ args[2].len = len;
+ ctl_putdata_ex(args, 3, FALSE);
} else {
- ctl_putdata_ex(args, 1, FALSE);
+ ctl_putdata_ex(args, 2, FALSE);
}
}
@@ -1656,7 +1658,7 @@ ctl_putdblf(
{
char buffer[40];
int rc;
-
+
rc = snprintf(buffer, sizeof(buffer),
(use_f ? "%.*f" : "%.*g"),
precision, d);
@@ -1677,7 +1679,7 @@ ctl_putuint(
int rc;
rc = snprintf(buffer, sizeof(buffer), "%lu", uval);
- INSIST(rc >= 0 && rc < sizeof(buffer));
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
ctl_putunqstr(tag, buffer, rc);
}
@@ -1716,7 +1718,7 @@ ctl_putfs(
{
char buffer[16];
int rc;
-
+
time_t fstamp = (time_t)uval - JAN_1970;
struct tm *tm = gmtime(&fstamp);
@@ -1744,7 +1746,7 @@ ctl_puthex(
{
char buffer[24]; /* must fit 64bit int! */
int rc;
-
+
rc = snprintf(buffer, sizeof(buffer), "0x%lx", uval);
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
ctl_putunqstr(tag, buffer, rc);
@@ -1762,9 +1764,9 @@ ctl_putint(
{
char buffer[24]; /*must fit 64bit int */
int rc;
-
+
rc = snprintf(buffer, sizeof(buffer), "%ld", ival);
- INSIST(rc >= 0 && rc < sizeof(buffer));
+ INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
ctl_putunqstr(tag, buffer, rc);
}
@@ -1780,7 +1782,7 @@ ctl_putts(
{
char buffer[24];
int rc;
-
+
rc = snprintf(buffer, sizeof(buffer),
"0x%08lx.%08lx",
(u_long)ts->l_ui, (u_long)ts->l_uf);
@@ -1800,7 +1802,7 @@ ctl_putadr(
)
{
const char *cq;
-
+
if (NULL == addr)
cq = numtoa(addr32);
else
@@ -1827,7 +1829,9 @@ ctl_putrefid(
bytes.w = refid;
for (nc = 0; nc < sizeof(bytes.b) && bytes.b[nc]; ++nc)
- if (!isprint(bytes.b[nc]))
+ if ( !isprint(bytes.b[nc])
+ || isspace(bytes.b[nc])
+ || bytes.b[nc] == ',' )
bytes.b[nc] = '.';
ctl_putunqstr(tag, (const char*)bytes.b, nc);
}
@@ -1874,11 +1878,11 @@ ctl_printf(
va_list va;
char fmtbuf[128];
int rc;
-
+
va_start(va, fmt);
rc = vsnprintf(fmtbuf, sizeof(fmtbuf), fmt, va);
va_end(va);
- if (rc < 0 || rc >= sizeof(fmtbuf))
+ if (rc < 0 || (size_t)rc >= sizeof(fmtbuf))
strcpy(fmtbuf + sizeof(fmtbuf) - strlen(ellipsis) - 1,
ellipsis);
ctl_putdata(fmtbuf, strlen(fmtbuf), 0);
@@ -1906,11 +1910,13 @@ ctl_putsys(
static struct timex ntx;
static u_long ntp_adjtime_time;
- static const double to_ms =
+ static const double to_ms_usec =
+ 1.0e-3; /* usec to msec */
+ static const double to_ms_nusec =
# ifdef STA_NANO
1.0e-6; /* nsec to msec */
# else
- 1.0e-3; /* usec to msec */
+ to_ms_usec;
# endif
/*
@@ -1951,10 +1957,10 @@ ctl_putsys(
break;
case CS_REFID:
- if (sys_stratum > 1 && sys_stratum < STRATUM_UNSPEC)
- ctl_putadr(sys_var[varid].text, sys_refid, NULL);
- else
+ if (REFID_ISTEXT(sys_stratum))
ctl_putrefid(sys_var[varid].text, sys_refid);
+ else
+ ctl_putadr(sys_var[varid].text, sys_refid, NULL);
break;
case CS_REFTIME:
@@ -2315,7 +2321,7 @@ ctl_putsys(
case CS_K_OFFSET:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, 0, -1, to_ms * ntx.offset)
+ (sys_var[varid].text, 0, -1, to_ms_nusec * ntx.offset)
);
break;
@@ -2330,7 +2336,7 @@ ctl_putsys(
CTL_IF_KERNLOOP(
ctl_putdblf,
(sys_var[varid].text, 0, 6,
- to_ms * ntx.maxerror)
+ to_ms_usec * ntx.maxerror)
);
break;
@@ -2338,7 +2344,7 @@ ctl_putsys(
CTL_IF_KERNLOOP(
ctl_putdblf,
(sys_var[varid].text, 0, 6,
- to_ms * ntx.esterror)
+ to_ms_usec * ntx.esterror)
);
break;
@@ -2362,7 +2368,7 @@ ctl_putsys(
CTL_IF_KERNLOOP(
ctl_putdblf,
(sys_var[varid].text, 0, 6,
- to_ms * ntx.precision)
+ to_ms_usec * ntx.precision)
);
break;
@@ -2390,7 +2396,7 @@ ctl_putsys(
case CS_K_PPS_JITTER:
CTL_IF_KERNPPS(
ctl_putdbl,
- (sys_var[varid].text, to_ms * ntx.jitter)
+ (sys_var[varid].text, to_ms_nusec * ntx.jitter)
);
break;
@@ -2678,11 +2684,10 @@ ctl_putpeer(
break;
}
#endif
- if (p->stratum > 1 && p->stratum < STRATUM_UNSPEC)
- ctl_putadr(peer_var[id].text, p->refid,
- NULL);
- else
+ if (REFID_ISTEXT(p->stratum))
ctl_putrefid(peer_var[id].text, p->refid);
+ else
+ ctl_putadr(peer_var[id].text, p->refid, NULL);
break;
case CP_REFTIME:
@@ -3061,7 +3066,7 @@ ctl_getitem(
* packet; If it's EOV, it will never be NULL again until the
* variable is found and processed in a given 'var_list'. (That
* is, a result is returned that is neither NULL nor EOV).
- */
+ */
static const struct ctl_var eol = { 0, EOV, NULL };
static char buf[128];
static u_long quiet_until;
@@ -3101,7 +3106,7 @@ ctl_getitem(
++plhead;
while (plhead != pltail && isspace((u_char)pltail[-1]))
--pltail;
-
+
/* check payload size, terminate packet on overflow */
plsize = (size_t)(pltail - plhead);
if (plsize >= sizeof(buf))
@@ -3126,7 +3131,7 @@ ctl_getitem(
* variable lists after an EoV was returned. (Such a behavior
* actually caused Bug 3008.)
*/
-
+
if (NULL == var_list)
return &eol;
@@ -3443,11 +3448,11 @@ write_variables(
* Look through the variables. Dump out at the first sign of
* trouble.
*/
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
+ while ((v = ctl_getitem(sys_var, &valuep)) != NULL) {
ext_var = 0;
if (v->flags & EOV) {
- if ((v = ctl_getitem(ext_sys_var, &valuep)) !=
- 0) {
+ v = ctl_getitem(ext_sys_var, &valuep);
+ if (v != NULL) {
if (v->flags & EOV) {
ctl_error(CERR_UNKNOWNVAR);
return;
@@ -3461,16 +3466,24 @@ write_variables(
ctl_error(CERR_PERMISSION);
return;
}
- if (!ext_var && (*valuep == '\0' || !atoint(valuep,
- &val))) {
+ /* [bug 3565] writing makes sense only if we *have* a
+ * value in the packet!
+ */
+ if (valuep == NULL) {
ctl_error(CERR_BADFMT);
return;
}
- if (!ext_var && (val & ~LEAP_NOTINSYNC) != 0) {
- ctl_error(CERR_BADVALUE);
- return;
+ if (!ext_var) {
+ if ( !(*valuep && atoint(valuep, &val))) {
+ ctl_error(CERR_BADFMT);
+ return;
+ }
+ if ((val & ~LEAP_NOTINSYNC) != 0) {
+ ctl_error(CERR_BADVALUE);
+ return;
+ }
}
-
+
if (ext_var) {
octets = strlen(v->text) + strlen(valuep) + 2;
vareqv = emalloc(octets);
@@ -3647,7 +3660,7 @@ static u_int32 derive_nonce(
/* [Bug 3457] set flags and don't kill them again */
EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
EVP_DigestInit_ex(ctx, EVP_get_digestbynid(NID_md5), NULL);
-# else
+# else
EVP_DigestInit(ctx, EVP_get_digestbynid(NID_md5));
# endif
EVP_DigestUpdate(ctx, salt, sizeof(salt));
@@ -3944,7 +3957,7 @@ static void read_mru_list(
int restrict_mask
)
{
- static const char nulltxt[1] = { '\0' };
+ static const char nulltxt[1] = { '\0' };
static const char nonce_text[] = "nonce";
static const char frags_text[] = "frags";
static const char limit_text[] = "limit";
@@ -3954,7 +3967,7 @@ static void read_mru_list(
static const char maxlstint_text[] = "maxlstint";
static const char laddr_text[] = "laddr";
static const char resaxx_fmt[] = "0x%hx";
-
+
u_int limit;
u_short frags;
u_short resall;
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
index fd74222..fa0017f 100644
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ b/contrib/ntp/ntpd/ntp_crypto.c
@@ -353,8 +353,8 @@ make_keylist(
* included in the hash is zero if broadcast mode, the peer
* cookie if client mode or the host cookie if symmetric modes.
*/
- mpoll = 1 << min(peer->ppoll, peer->hpoll);
- lifetime = min(1U << sys_automax, NTP_MAXSESSION * mpoll);
+ mpoll = 1U << min(peer->ppoll, peer->hpoll);
+ lifetime = min((1UL << sys_automax), NTP_MAXSESSION * mpoll);
if (peer->hmode == MODE_BROADCAST)
cookie = 0;
else
@@ -1486,7 +1486,8 @@ crypto_verify(
return (XEVNT_LEN);
i = (vallen + 3) / 4;
- siglen = ntohl(ep->pkt[i++]);
+ siglen = ntohl(ep->pkt[i]);
+ ++i;
if ( siglen > MAX_VALLEN
|| len - VALUE_LEN < ((vallen + 3) / 4) * 4
|| len - VALUE_LEN - ((vallen + 3) / 4) * 4
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index ed5f0dc..b89b996 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -1612,6 +1612,34 @@ set_wildcard_reuse(
}
#endif /* OS_NEEDS_REUSEADDR_FOR_IFADDRBIND */
+static isc_boolean_t
+check_flags(
+ sockaddr_u *psau,
+ const char *name,
+ u_int32 flags
+ )
+{
+#if defined(SIOCGIFAFLAG_IN)
+ struct ifreq ifr;
+ int fd;
+
+ if (psau->sa.sa_family != AF_INET)
+ return ISC_FALSE;
+ if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ return ISC_FALSE;
+ ZERO(ifr);
+ memcpy(&ifr.ifr_addr, &psau->sa, sizeof(ifr.ifr_addr));
+ strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
+ if (ioctl(fd, SIOCGIFAFLAG_IN, &ifr) < 0) {
+ close(fd);
+ return ISC_FALSE;
+ }
+ close(fd);
+ if ((ifr.ifr_addrflags & flags) != 0)
+ return ISC_TRUE;
+#endif /* SIOCGIFAFLAG_IN */
+ return ISC_FALSE;
+}
static isc_boolean_t
check_flags6(
@@ -1661,19 +1689,32 @@ is_valid(
const char *name
)
{
- u_int32 flags6;
+ u_int32 flags;
- flags6 = 0;
+ flags = 0;
+ switch (psau->sa.sa_family) {
+ case AF_INET:
+#ifdef IN_IFF_DETACHED
+ flags |= IN_IFF_DETACHED;
+#endif
+#ifdef IN_IFF_TENTATIVE
+ flags |= IN_IFF_TENTATIVE;
+#endif
+ return check_flags(psau, name, flags) ? ISC_FALSE : ISC_TRUE;
+ case AF_INET6:
#ifdef IN6_IFF_DEPARTED
- flags6 |= IN6_IFF_DEPARTED;
+ flags |= IN6_IFF_DEPARTED;
#endif
#ifdef IN6_IFF_DETACHED
- flags6 |= IN6_IFF_DETACHED;
+ flags |= IN6_IFF_DETACHED;
#endif
#ifdef IN6_IFF_TENTATIVE
- flags6 |= IN6_IFF_TENTATIVE;
+ flags |= IN6_IFF_TENTATIVE;
#endif
- return check_flags6(psau, name, flags6) ? ISC_FALSE : ISC_TRUE;
+ return check_flags6(psau, name, flags) ? ISC_FALSE : ISC_TRUE;
+ default:
+ return ISC_FALSE;
+ }
}
/*
@@ -3092,7 +3133,7 @@ sendpkt(
int cc;
int rc;
u_char cttl;
- l_fp fp_zero = { 0, 0 };
+ l_fp fp_zero = { { 0 }, 0 };
ismcast = IS_MCAST(dest);
if (!ismcast)
diff --git a/contrib/ntp/ntpd/ntp_loopfilter.c b/contrib/ntp/ntpd/ntp_loopfilter.c
index 8d44fb1..01772bd 100644
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ b/contrib/ntp/ntpd/ntp_loopfilter.c
@@ -246,7 +246,11 @@ ntp_adjtime_error_handler(
)
{
char des[1024] = ""; /* Decoded Error Status */
+ char *dbp, *ebp;
+ dbp = des;
+ ebp = dbp + sizeof(des);
+
switch (ret) {
case -1:
switch (saved_errno) {
@@ -363,37 +367,37 @@ or, from ntp_adjtime():
/* error (see status word) */
if (ptimex->status & STA_UNSYNC)
- snprintf(des, sizeof(des), "%s%sClock Unsynchronized",
- des, (*des) ? "; " : "");
+ xsbprintf(&dbp, ebp, "%sClock Unsynchronized",
+ (*des) ? "; " : "");
if (ptimex->status & STA_CLOCKERR)
- snprintf(des, sizeof(des), "%s%sClock Error",
- des, (*des) ? "; " : "");
+ xsbprintf(&dbp, ebp, "%sClock Error",
+ (*des) ? "; " : "");
if (!(ptimex->status & STA_PPSSIGNAL)
&& ptimex->status & STA_PPSFREQ)
- snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but no PPS",
- des, (*des) ? "; " : "");
+ xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but no PPS",
+ (*des) ? "; " : "");
if (!(ptimex->status & STA_PPSSIGNAL)
&& ptimex->status & STA_PPSTIME)
- snprintf(des, sizeof(des), "%s%sPPS Time Sync wanted but no PPS signal",
- des, (*des) ? "; " : "");
+ xsbprintf(&dbp, ebp, "%sPPS Time Sync wanted but no PPS signal",
+ (*des) ? "; " : "");
if ( ptimex->status & STA_PPSTIME
&& ptimex->status & STA_PPSJITTER)
- snprintf(des, sizeof(des), "%s%sPPS Time Sync wanted but PPS Jitter exceeded",
- des, (*des) ? "; " : "");
+ xsbprintf(&dbp, ebp, "%sPPS Time Sync wanted but PPS Jitter exceeded",
+ (*des) ? "; " : "");
if ( ptimex->status & STA_PPSFREQ
&& ptimex->status & STA_PPSWANDER)
- snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but PPS Wander exceeded",
- des, (*des) ? "; " : "");
+ xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but PPS Wander exceeded",
+ (*des) ? "; " : "");
if ( ptimex->status & STA_PPSFREQ
&& ptimex->status & STA_PPSERROR)
- snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but Calibration error detected",
- des, (*des) ? "; " : "");
+ xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but Calibration error detected",
+ (*des) ? "; " : "");
if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL,
@@ -1099,10 +1103,14 @@ start_kern_loop(void)
pll_control = TRUE;
ZERO(ntv);
ntv.modes = MOD_BITS;
- ntv.status = STA_PLL;
- ntv.maxerror = MAXDISPERSE;
- ntv.esterror = MAXDISPERSE;
- ntv.constant = sys_poll; /* why is it that here constant is unconditionally set to sys_poll, whereas elsewhere is is modified depending on nanosecond vs. microsecond kernel? */
+ ntv.status = STA_PLL | STA_UNSYNC;
+ ntv.maxerror = MAXDISPERSE * 1.0e6;
+ ntv.esterror = MAXDISPERSE * 1.0e6;
+ ntv.constant = sys_poll;
+ /* ^^^^^^^^ why is it that here constant is
+ * unconditionally set to sys_poll, whereas elsewhere is is
+ * modified depending on nanosecond vs. microsecond kernel?
+ */
#ifdef SIGSYS
/*
* Use sigsetjmp() to save state and then call ntp_adjtime(); if
diff --git a/contrib/ntp/ntpd/ntp_parser.c b/contrib/ntp/ntpd/ntp_parser.c
index 782019c..8156a5f 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>
@@ -76,6 +76,7 @@
#include "ntp_scanner.h"
#include "ntp_config.h"
#include "ntp_crypto.h"
+ #include "ntp_calendar.h"
#include "ntpsim.h" /* HMS: Do we really want this all the time? */
/* SK: It might be a good idea to always
@@ -96,7 +97,7 @@
# define ONLY_SIM(a) NULL
#endif
-#line 100 "ntp_parser.c" /* yacc.c:339 */
+#line 101 "ntp_parser.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -540,7 +541,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
+#line 52 "ntp_parser.y" /* yacc.c:355 */
char * String;
double Double;
@@ -559,7 +560,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 563 "ntp_parser.c" /* yacc.c:355 */
+#line 564 "ntp_parser.c" /* yacc.c:355 */
};
typedef union YYSTYPE YYSTYPE;
@@ -576,7 +577,7 @@ int yyparse (void);
/* Copy the second part of user declarations. */
-#line 580 "ntp_parser.c" /* yacc.c:358 */
+#line 581 "ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -893,39 +894,39 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 377, 377, 381, 382, 383, 398, 399, 400, 401,
- 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
- 419, 429, 430, 431, 432, 433, 437, 438, 443, 448,
- 450, 456, 457, 465, 466, 467, 471, 476, 477, 478,
- 479, 480, 481, 482, 483, 487, 489, 494, 495, 496,
- 497, 498, 499, 503, 508, 517, 527, 528, 538, 540,
- 542, 544, 555, 562, 564, 569, 571, 573, 575, 577,
- 587, 593, 594, 602, 604, 616, 617, 618, 619, 620,
- 629, 634, 639, 647, 649, 651, 653, 658, 659, 660,
- 661, 662, 663, 664, 665, 666, 670, 671, 680, 682,
- 691, 701, 706, 714, 715, 716, 717, 718, 719, 720,
- 721, 726, 727, 735, 745, 754, 769, 774, 775, 779,
- 780, 784, 785, 786, 787, 788, 789, 790, 799, 803,
- 807, 815, 823, 831, 846, 861, 874, 875, 895, 896,
- 904, 905, 906, 907, 908, 909, 910, 911, 912, 913,
- 914, 915, 916, 917, 918, 919, 920, 924, 929, 937,
- 942, 943, 944, 948, 953, 961, 966, 967, 968, 969,
- 970, 971, 972, 973, 981, 991, 996, 1004, 1006, 1008,
- 1017, 1019, 1024, 1025, 1029, 1030, 1031, 1032, 1040, 1045,
- 1050, 1058, 1063, 1064, 1065, 1074, 1076, 1081, 1086, 1094,
- 1096, 1113, 1114, 1115, 1116, 1117, 1118, 1122, 1123, 1124,
- 1125, 1126, 1127, 1135, 1140, 1145, 1153, 1158, 1159, 1160,
- 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1176, 1177, 1178,
- 1185, 1192, 1199, 1215, 1234, 1236, 1238, 1240, 1242, 1244,
- 1251, 1256, 1257, 1258, 1262, 1266, 1275, 1276, 1280, 1281,
- 1282, 1286, 1297, 1315, 1327, 1332, 1334, 1339, 1340, 1348,
- 1350, 1358, 1363, 1371, 1396, 1403, 1413, 1414, 1418, 1419,
- 1420, 1421, 1425, 1426, 1427, 1431, 1436, 1441, 1449, 1450,
- 1451, 1452, 1453, 1454, 1455, 1465, 1470, 1478, 1483, 1491,
- 1493, 1497, 1502, 1507, 1515, 1520, 1528, 1537, 1538, 1542,
- 1543, 1547, 1555, 1573, 1577, 1582, 1590, 1595, 1596, 1600,
- 1605, 1613, 1618, 1623, 1628, 1633, 1641, 1646, 1651, 1659,
- 1664, 1665, 1666, 1667, 1668
+ 0, 378, 378, 382, 383, 384, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 420, 430, 431, 432, 433, 434, 438, 439, 444, 449,
+ 451, 457, 458, 466, 467, 468, 472, 477, 478, 479,
+ 480, 481, 482, 483, 484, 488, 490, 495, 496, 497,
+ 498, 499, 500, 504, 509, 518, 528, 529, 539, 541,
+ 543, 545, 556, 563, 565, 570, 572, 574, 576, 578,
+ 588, 594, 595, 603, 605, 617, 618, 619, 620, 621,
+ 630, 635, 640, 648, 650, 652, 654, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 671, 672, 681, 683,
+ 692, 702, 707, 715, 716, 717, 718, 719, 720, 721,
+ 722, 727, 728, 736, 746, 755, 770, 775, 776, 780,
+ 781, 785, 786, 787, 788, 789, 790, 791, 800, 804,
+ 808, 816, 824, 832, 847, 862, 875, 876, 896, 897,
+ 905, 906, 907, 908, 909, 910, 911, 912, 913, 914,
+ 915, 916, 917, 918, 919, 920, 921, 925, 930, 938,
+ 943, 944, 945, 949, 954, 962, 967, 968, 969, 970,
+ 971, 972, 973, 974, 982, 992, 997, 1005, 1007, 1009,
+ 1018, 1020, 1025, 1026, 1030, 1031, 1032, 1033, 1041, 1046,
+ 1051, 1059, 1064, 1065, 1066, 1075, 1077, 1082, 1087, 1095,
+ 1097, 1114, 1115, 1116, 1117, 1118, 1119, 1123, 1124, 1125,
+ 1126, 1127, 1128, 1136, 1141, 1146, 1154, 1159, 1160, 1161,
+ 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1177, 1178, 1179,
+ 1186, 1193, 1200, 1216, 1235, 1237, 1239, 1241, 1243, 1245,
+ 1252, 1257, 1258, 1259, 1263, 1267, 1276, 1277, 1281, 1282,
+ 1283, 1287, 1298, 1316, 1328, 1333, 1335, 1340, 1341, 1349,
+ 1351, 1359, 1364, 1372, 1397, 1404, 1414, 1415, 1419, 1420,
+ 1421, 1422, 1426, 1427, 1428, 1432, 1437, 1442, 1450, 1451,
+ 1452, 1453, 1454, 1455, 1456, 1466, 1471, 1479, 1484, 1492,
+ 1494, 1498, 1503, 1508, 1516, 1521, 1529, 1538, 1539, 1543,
+ 1544, 1548, 1556, 1574, 1578, 1583, 1591, 1596, 1597, 1601,
+ 1606, 1614, 1619, 1624, 1629, 1634, 1642, 1647, 1652, 1660,
+ 1665, 1666, 1667, 1668, 1669
};
#endif
@@ -2126,7 +2127,7 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 384 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 385 "ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2139,85 +2140,85 @@ yyreduce:
ip_ctx->errpos.nline,
ip_ctx->errpos.ncol);
}
-#line 2143 "ntp_parser.c" /* yacc.c:1646 */
+#line 2144 "ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-#line 420 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 421 "ntp_parser.y" /* yacc.c:1646 */
{
peer_node *my_node;
my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.peers, my_node);
}
-#line 2154 "ntp_parser.c" /* yacc.c:1646 */
+#line 2155 "ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-#line 439 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 440 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2160 "ntp_parser.c" /* yacc.c:1646 */
+#line 2161 "ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-#line 444 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 445 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2166 "ntp_parser.c" /* yacc.c:1646 */
+#line 2167 "ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-#line 449 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 450 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
-#line 2172 "ntp_parser.c" /* yacc.c:1646 */
+#line 2173 "ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-#line 451 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 452 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
-#line 2178 "ntp_parser.c" /* yacc.c:1646 */
+#line 2179 "ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-#line 456 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 457 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2184 "ntp_parser.c" /* yacc.c:1646 */
+#line 2185 "ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-#line 458 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 459 "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));
}
-#line 2193 "ntp_parser.c" /* yacc.c:1646 */
+#line 2194 "ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-#line 472 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 473 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2199 "ntp_parser.c" /* yacc.c:1646 */
+#line 2200 "ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-#line 488 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 489 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2205 "ntp_parser.c" /* yacc.c:1646 */
+#line 2206 "ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-#line 490 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 491 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2211 "ntp_parser.c" /* yacc.c:1646 */
+#line 2212 "ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-#line 504 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 505 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2217 "ntp_parser.c" /* yacc.c:1646 */
+#line 2218 "ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-#line 518 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 519 "ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
@@ -2225,85 +2226,85 @@ yyreduce:
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2229 "ntp_parser.c" /* yacc.c:1646 */
+#line 2230 "ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-#line 539 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 540 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
-#line 2235 "ntp_parser.c" /* yacc.c:1646 */
+#line 2236 "ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-#line 541 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 542 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2241 "ntp_parser.c" /* yacc.c:1646 */
+#line 2242 "ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-#line 543 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 544 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2247 "ntp_parser.c" /* yacc.c:1646 */
+#line 2248 "ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-#line 545 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 546 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.mdnstries = (yyvsp[0].Integer); }
-#line 2253 "ntp_parser.c" /* yacc.c:1646 */
+#line 2254 "ntp_parser.c" /* yacc.c:1646 */
break;
case 62:
-#line 556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 557 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *atrv;
atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, atrv);
}
-#line 2264 "ntp_parser.c" /* yacc.c:1646 */
+#line 2265 "ntp_parser.c" /* yacc.c:1646 */
break;
case 63:
-#line 563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 564 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2270 "ntp_parser.c" /* yacc.c:1646 */
+#line 2271 "ntp_parser.c" /* yacc.c:1646 */
break;
case 64:
-#line 565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 566 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2279 "ntp_parser.c" /* yacc.c:1646 */
+#line 2280 "ntp_parser.c" /* yacc.c:1646 */
break;
case 65:
-#line 570 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 571 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keys = (yyvsp[0].String); }
-#line 2285 "ntp_parser.c" /* yacc.c:1646 */
+#line 2286 "ntp_parser.c" /* yacc.c:1646 */
break;
case 66:
-#line 572 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 573 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2291 "ntp_parser.c" /* yacc.c:1646 */
+#line 2292 "ntp_parser.c" /* yacc.c:1646 */
break;
case 67:
-#line 574 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 575 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2297 "ntp_parser.c" /* yacc.c:1646 */
+#line 2298 "ntp_parser.c" /* yacc.c:1646 */
break;
case 68:
-#line 576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 577 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2303 "ntp_parser.c" /* yacc.c:1646 */
+#line 2304 "ntp_parser.c" /* yacc.c:1646 */
break;
case 69:
-#line 578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 579 "ntp_parser.y" /* yacc.c:1646 */
{
/* [Bug 948] leaves it open if appending or
* replacing the trusted key list is the right
@@ -2313,38 +2314,38 @@ yyreduce:
DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2317 "ntp_parser.c" /* yacc.c:1646 */
+#line 2318 "ntp_parser.c" /* yacc.c:1646 */
break;
case 70:
-#line 588 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 589 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2323 "ntp_parser.c" /* yacc.c:1646 */
+#line 2324 "ntp_parser.c" /* yacc.c:1646 */
break;
case 71:
-#line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 594 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2329 "ntp_parser.c" /* yacc.c:1646 */
+#line 2330 "ntp_parser.c" /* yacc.c:1646 */
break;
case 72:
-#line 595 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 596 "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));
}
-#line 2338 "ntp_parser.c" /* yacc.c:1646 */
+#line 2339 "ntp_parser.c" /* yacc.c:1646 */
break;
case 73:
-#line 603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 604 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2344 "ntp_parser.c" /* yacc.c:1646 */
+#line 2345 "ntp_parser.c" /* yacc.c:1646 */
break;
case 74:
-#line 605 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 606 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2353,65 +2354,65 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2357 "ntp_parser.c" /* yacc.c:1646 */
+#line 2358 "ntp_parser.c" /* yacc.c:1646 */
break;
case 80:
-#line 630 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 631 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2363 "ntp_parser.c" /* yacc.c:1646 */
+#line 2364 "ntp_parser.c" /* yacc.c:1646 */
break;
case 81:
-#line 635 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 636 "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));
}
-#line 2372 "ntp_parser.c" /* yacc.c:1646 */
+#line 2373 "ntp_parser.c" /* yacc.c:1646 */
break;
case 82:
-#line 640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 641 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2381 "ntp_parser.c" /* yacc.c:1646 */
+#line 2382 "ntp_parser.c" /* yacc.c:1646 */
break;
case 83:
-#line 648 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 649 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2387 "ntp_parser.c" /* yacc.c:1646 */
+#line 2388 "ntp_parser.c" /* yacc.c:1646 */
break;
case 84:
-#line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 651 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2393 "ntp_parser.c" /* yacc.c:1646 */
+#line 2394 "ntp_parser.c" /* yacc.c:1646 */
break;
case 85:
-#line 652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 653 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2399 "ntp_parser.c" /* yacc.c:1646 */
+#line 2400 "ntp_parser.c" /* yacc.c:1646 */
break;
case 86:
-#line 654 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 655 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
-#line 2405 "ntp_parser.c" /* yacc.c:1646 */
+#line 2406 "ntp_parser.c" /* yacc.c:1646 */
break;
case 98:
-#line 681 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 682 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2411 "ntp_parser.c" /* yacc.c:1646 */
+#line 2412 "ntp_parser.c" /* yacc.c:1646 */
break;
case 99:
-#line 683 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 684 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2420,55 +2421,55 @@ yyreduce:
yyerror("statsdir remote configuration ignored");
}
}
-#line 2424 "ntp_parser.c" /* yacc.c:1646 */
+#line 2425 "ntp_parser.c" /* yacc.c:1646 */
break;
case 100:
-#line 692 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 693 "ntp_parser.y" /* yacc.c:1646 */
{
filegen_node *fgn;
fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
-#line 2435 "ntp_parser.c" /* yacc.c:1646 */
+#line 2436 "ntp_parser.c" /* yacc.c:1646 */
break;
case 101:
-#line 702 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 703 "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)));
}
-#line 2444 "ntp_parser.c" /* yacc.c:1646 */
+#line 2445 "ntp_parser.c" /* yacc.c:1646 */
break;
case 102:
-#line 707 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 708 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2453 "ntp_parser.c" /* yacc.c:1646 */
+#line 2454 "ntp_parser.c" /* yacc.c:1646 */
break;
case 111:
-#line 726 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 727 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2459 "ntp_parser.c" /* yacc.c:1646 */
+#line 2460 "ntp_parser.c" /* yacc.c:1646 */
break;
case 112:
-#line 728 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 729 "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));
}
-#line 2468 "ntp_parser.c" /* yacc.c:1646 */
+#line 2469 "ntp_parser.c" /* yacc.c:1646 */
break;
case 113:
-#line 736 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 737 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2478,11 +2479,11 @@ yyreduce:
yyerror("filegen file remote config ignored");
}
}
-#line 2482 "ntp_parser.c" /* yacc.c:1646 */
+#line 2483 "ntp_parser.c" /* yacc.c:1646 */
break;
case 114:
-#line 746 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 747 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2491,11 +2492,11 @@ yyreduce:
yyerror("filegen type remote config ignored");
}
}
-#line 2495 "ntp_parser.c" /* yacc.c:1646 */
+#line 2496 "ntp_parser.c" /* yacc.c:1646 */
break;
case 115:
-#line 755 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 756 "ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
@@ -2510,33 +2511,33 @@ yyreduce:
yyerror(err);
}
}
-#line 2514 "ntp_parser.c" /* yacc.c:1646 */
+#line 2515 "ntp_parser.c" /* yacc.c:1646 */
break;
case 116:
-#line 770 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 771 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2520 "ntp_parser.c" /* yacc.c:1646 */
+#line 2521 "ntp_parser.c" /* yacc.c:1646 */
break;
case 128:
-#line 800 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 801 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2528 "ntp_parser.c" /* yacc.c:1646 */
+#line 2529 "ntp_parser.c" /* yacc.c:1646 */
break;
case 129:
-#line 804 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 805 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2536 "ntp_parser.c" /* yacc.c:1646 */
+#line 2537 "ntp_parser.c" /* yacc.c:1646 */
break;
case 130:
-#line 808 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 809 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2544,11 +2545,11 @@ yyreduce:
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2548 "ntp_parser.c" /* yacc.c:1646 */
+#line 2549 "ntp_parser.c" /* yacc.c:1646 */
break;
case 131:
-#line 816 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 817 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2556,11 +2557,11 @@ yyreduce:
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2560 "ntp_parser.c" /* yacc.c:1646 */
+#line 2561 "ntp_parser.c" /* yacc.c:1646 */
break;
case 132:
-#line 824 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 825 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2568,11 +2569,11 @@ yyreduce:
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2572 "ntp_parser.c" /* yacc.c:1646 */
+#line 2573 "ntp_parser.c" /* yacc.c:1646 */
break;
case 133:
-#line 832 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 833 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2587,11 +2588,11 @@ yyreduce:
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2591 "ntp_parser.c" /* yacc.c:1646 */
+#line 2592 "ntp_parser.c" /* yacc.c:1646 */
break;
case 134:
-#line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 848 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2606,11 +2607,11 @@ yyreduce:
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2610 "ntp_parser.c" /* yacc.c:1646 */
+#line 2611 "ntp_parser.c" /* yacc.c:1646 */
break;
case 135:
-#line 862 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 863 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
@@ -2619,17 +2620,17 @@ yyreduce:
NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2623 "ntp_parser.c" /* yacc.c:1646 */
+#line 2624 "ntp_parser.c" /* yacc.c:1646 */
break;
case 136:
-#line 874 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 875 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = -1; }
-#line 2629 "ntp_parser.c" /* yacc.c:1646 */
+#line 2630 "ntp_parser.c" /* yacc.c:1646 */
break;
case 137:
-#line 876 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 877 "ntp_parser.y" /* yacc.c:1646 */
{
if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
struct FILE_INFO * ip_ctx;
@@ -2645,115 +2646,115 @@ yyreduce:
}
(yyval.Integer) = (yyvsp[0].Integer);
}
-#line 2649 "ntp_parser.c" /* yacc.c:1646 */
+#line 2650 "ntp_parser.c" /* yacc.c:1646 */
break;
case 138:
-#line 895 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 896 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
-#line 2655 "ntp_parser.c" /* yacc.c:1646 */
+#line 2656 "ntp_parser.c" /* yacc.c:1646 */
break;
case 139:
-#line 897 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 898 "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)));
}
-#line 2664 "ntp_parser.c" /* yacc.c:1646 */
+#line 2665 "ntp_parser.c" /* yacc.c:1646 */
break;
case 157:
-#line 925 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 926 "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));
}
-#line 2673 "ntp_parser.c" /* yacc.c:1646 */
+#line 2674 "ntp_parser.c" /* yacc.c:1646 */
break;
case 158:
-#line 930 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 931 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2682 "ntp_parser.c" /* yacc.c:1646 */
+#line 2683 "ntp_parser.c" /* yacc.c:1646 */
break;
case 159:
-#line 938 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 939 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2688 "ntp_parser.c" /* yacc.c:1646 */
+#line 2689 "ntp_parser.c" /* yacc.c:1646 */
break;
case 163:
-#line 949 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 950 "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));
}
-#line 2697 "ntp_parser.c" /* yacc.c:1646 */
+#line 2698 "ntp_parser.c" /* yacc.c:1646 */
break;
case 164:
-#line 954 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 955 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2706 "ntp_parser.c" /* yacc.c:1646 */
+#line 2707 "ntp_parser.c" /* yacc.c:1646 */
break;
case 165:
-#line 962 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 963 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2712 "ntp_parser.c" /* yacc.c:1646 */
+#line 2713 "ntp_parser.c" /* yacc.c:1646 */
break;
case 174:
-#line 982 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 983 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.fudge, aon);
}
-#line 2723 "ntp_parser.c" /* yacc.c:1646 */
+#line 2724 "ntp_parser.c" /* yacc.c:1646 */
break;
case 175:
-#line 992 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 993 "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));
}
-#line 2732 "ntp_parser.c" /* yacc.c:1646 */
+#line 2733 "ntp_parser.c" /* yacc.c:1646 */
break;
case 176:
-#line 997 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 998 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2741 "ntp_parser.c" /* yacc.c:1646 */
+#line 2742 "ntp_parser.c" /* yacc.c:1646 */
break;
case 177:
-#line 1005 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1006 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2747 "ntp_parser.c" /* yacc.c:1646 */
+#line 2748 "ntp_parser.c" /* yacc.c:1646 */
break;
case 178:
-#line 1007 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1008 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2753 "ntp_parser.c" /* yacc.c:1646 */
+#line 2754 "ntp_parser.c" /* yacc.c:1646 */
break;
case 179:
-#line 1009 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1010 "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));
@@ -2762,89 +2763,89 @@ yyreduce:
yyerror("fudge factor: stratum value not in [0..16], ignored");
}
}
-#line 2766 "ntp_parser.c" /* yacc.c:1646 */
+#line 2767 "ntp_parser.c" /* yacc.c:1646 */
break;
case 180:
-#line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1019 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2772 "ntp_parser.c" /* yacc.c:1646 */
+#line 2773 "ntp_parser.c" /* yacc.c:1646 */
break;
case 181:
-#line 1020 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1021 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2778 "ntp_parser.c" /* yacc.c:1646 */
+#line 2779 "ntp_parser.c" /* yacc.c:1646 */
break;
case 188:
-#line 1041 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1042 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 2784 "ntp_parser.c" /* yacc.c:1646 */
+#line 2785 "ntp_parser.c" /* yacc.c:1646 */
break;
case 189:
-#line 1046 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1047 "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));
}
-#line 2793 "ntp_parser.c" /* yacc.c:1646 */
+#line 2794 "ntp_parser.c" /* yacc.c:1646 */
break;
case 190:
-#line 1051 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1052 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2802 "ntp_parser.c" /* yacc.c:1646 */
+#line 2803 "ntp_parser.c" /* yacc.c:1646 */
break;
case 191:
-#line 1059 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1060 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2808 "ntp_parser.c" /* yacc.c:1646 */
+#line 2809 "ntp_parser.c" /* yacc.c:1646 */
break;
case 195:
-#line 1075 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1076 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2814 "ntp_parser.c" /* yacc.c:1646 */
+#line 2815 "ntp_parser.c" /* yacc.c:1646 */
break;
case 196:
-#line 1077 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1078 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2820 "ntp_parser.c" /* yacc.c:1646 */
+#line 2821 "ntp_parser.c" /* yacc.c:1646 */
break;
case 197:
-#line 1082 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1083 "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));
}
-#line 2829 "ntp_parser.c" /* yacc.c:1646 */
+#line 2830 "ntp_parser.c" /* yacc.c:1646 */
break;
case 198:
-#line 1087 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1088 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2838 "ntp_parser.c" /* yacc.c:1646 */
+#line 2839 "ntp_parser.c" /* yacc.c:1646 */
break;
case 199:
-#line 1095 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1096 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2844 "ntp_parser.c" /* yacc.c:1646 */
+#line 2845 "ntp_parser.c" /* yacc.c:1646 */
break;
case 200:
-#line 1097 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1098 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2858,74 +2859,74 @@ yyreduce:
yyerror(err_str);
}
}
-#line 2862 "ntp_parser.c" /* yacc.c:1646 */
+#line 2863 "ntp_parser.c" /* yacc.c:1646 */
break;
case 213:
-#line 1136 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1137 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 2868 "ntp_parser.c" /* yacc.c:1646 */
+#line 2869 "ntp_parser.c" /* yacc.c:1646 */
break;
case 214:
-#line 1141 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1142 "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));
}
-#line 2877 "ntp_parser.c" /* yacc.c:1646 */
+#line 2878 "ntp_parser.c" /* yacc.c:1646 */
break;
case 215:
-#line 1146 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1147 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2886 "ntp_parser.c" /* yacc.c:1646 */
+#line 2887 "ntp_parser.c" /* yacc.c:1646 */
break;
case 216:
-#line 1154 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1155 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2892 "ntp_parser.c" /* yacc.c:1646 */
+#line 2893 "ntp_parser.c" /* yacc.c:1646 */
break;
case 229:
-#line 1179 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1180 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2903 "ntp_parser.c" /* yacc.c:1646 */
+#line 2904 "ntp_parser.c" /* yacc.c:1646 */
break;
case 230:
-#line 1186 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1187 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2914 "ntp_parser.c" /* yacc.c:1646 */
+#line 2915 "ntp_parser.c" /* yacc.c:1646 */
break;
case 231:
-#line 1193 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1194 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2925 "ntp_parser.c" /* yacc.c:1646 */
+#line 2926 "ntp_parser.c" /* yacc.c:1646 */
break;
case 232:
-#line 1200 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1201 "ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
@@ -2941,11 +2942,11 @@ yyreduce:
yyerror(error_text);
}
}
-#line 2945 "ntp_parser.c" /* yacc.c:1646 */
+#line 2946 "ntp_parser.c" /* yacc.c:1646 */
break;
case 233:
-#line 1216 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1217 "ntp_parser.y" /* yacc.c:1646 */
{
if (!lex_from_file()) {
YYFREE((yyvsp[-1].String)); /* avoid leak */
@@ -2964,68 +2965,68 @@ yyreduce:
}
YYFREE((yyvsp[-1].String)); /* avoid leak */
}
-#line 2968 "ntp_parser.c" /* yacc.c:1646 */
+#line 2969 "ntp_parser.c" /* yacc.c:1646 */
break;
case 234:
-#line 1235 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1236 "ntp_parser.y" /* yacc.c:1646 */
{ lex_flush_stack(); }
-#line 2974 "ntp_parser.c" /* yacc.c:1646 */
+#line 2975 "ntp_parser.c" /* yacc.c:1646 */
break;
case 235:
-#line 1237 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1238 "ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
-#line 2980 "ntp_parser.c" /* yacc.c:1646 */
+#line 2981 "ntp_parser.c" /* yacc.c:1646 */
break;
case 236:
-#line 1239 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1240 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 2986 "ntp_parser.c" /* yacc.c:1646 */
+#line 2987 "ntp_parser.c" /* yacc.c:1646 */
break;
case 237:
-#line 1241 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1242 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 2992 "ntp_parser.c" /* yacc.c:1646 */
+#line 2993 "ntp_parser.c" /* yacc.c:1646 */
break;
case 238:
-#line 1243 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1244 "ntp_parser.y" /* yacc.c:1646 */
{ APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 2998 "ntp_parser.c" /* yacc.c:1646 */
+#line 2999 "ntp_parser.c" /* yacc.c:1646 */
break;
case 239:
-#line 1245 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1246 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.trap, aon);
}
-#line 3009 "ntp_parser.c" /* yacc.c:1646 */
+#line 3010 "ntp_parser.c" /* yacc.c:1646 */
break;
case 240:
-#line 1252 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1253 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 3015 "ntp_parser.c" /* yacc.c:1646 */
+#line 3016 "ntp_parser.c" /* yacc.c:1646 */
break;
case 245:
-#line 1267 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1268 "ntp_parser.y" /* yacc.c:1646 */
{
#ifndef LEAP_SMEAR
yyerror("Built without LEAP_SMEAR support.");
#endif
}
-#line 3025 "ntp_parser.c" /* yacc.c:1646 */
+#line 3026 "ntp_parser.c" /* yacc.c:1646 */
break;
case 251:
-#line 1287 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1288 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -3036,11 +3037,11 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3040 "ntp_parser.c" /* yacc.c:1646 */
+#line 3041 "ntp_parser.c" /* yacc.c:1646 */
break;
case 252:
-#line 1298 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1299 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -3057,11 +3058,11 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3061 "ntp_parser.c" /* yacc.c:1646 */
+#line 3062 "ntp_parser.c" /* yacc.c:1646 */
break;
case 253:
-#line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1316 "ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -3071,71 +3072,71 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3075 "ntp_parser.c" /* yacc.c:1646 */
+#line 3076 "ntp_parser.c" /* yacc.c:1646 */
break;
case 254:
-#line 1328 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1329 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 3081 "ntp_parser.c" /* yacc.c:1646 */
+#line 3082 "ntp_parser.c" /* yacc.c:1646 */
break;
case 256:
-#line 1334 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1335 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 3087 "ntp_parser.c" /* yacc.c:1646 */
+#line 3088 "ntp_parser.c" /* yacc.c:1646 */
break;
case 257:
-#line 1339 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1340 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 3093 "ntp_parser.c" /* yacc.c:1646 */
+#line 3094 "ntp_parser.c" /* yacc.c:1646 */
break;
case 258:
-#line 1341 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1342 "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));
}
-#line 3102 "ntp_parser.c" /* yacc.c:1646 */
+#line 3103 "ntp_parser.c" /* yacc.c:1646 */
break;
case 259:
-#line 1349 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1350 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3108 "ntp_parser.c" /* yacc.c:1646 */
+#line 3109 "ntp_parser.c" /* yacc.c:1646 */
break;
case 260:
-#line 1351 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1352 "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));
}
-#line 3117 "ntp_parser.c" /* yacc.c:1646 */
+#line 3118 "ntp_parser.c" /* yacc.c:1646 */
break;
case 261:
-#line 1359 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1360 "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));
}
-#line 3126 "ntp_parser.c" /* yacc.c:1646 */
+#line 3127 "ntp_parser.c" /* yacc.c:1646 */
break;
case 262:
-#line 1364 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1365 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3135 "ntp_parser.c" /* yacc.c:1646 */
+#line 3136 "ntp_parser.c" /* yacc.c:1646 */
break;
case 263:
-#line 1372 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1373 "ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
@@ -3157,141 +3158,141 @@ yyreduce:
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
YYFREE((yyvsp[0].String));
}
-#line 3161 "ntp_parser.c" /* yacc.c:1646 */
+#line 3162 "ntp_parser.c" /* yacc.c:1646 */
break;
case 264:
-#line 1397 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1398 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3172 "ntp_parser.c" /* yacc.c:1646 */
+#line 3173 "ntp_parser.c" /* yacc.c:1646 */
break;
case 265:
-#line 1404 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1405 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3183 "ntp_parser.c" /* yacc.c:1646 */
+#line 3184 "ntp_parser.c" /* yacc.c:1646 */
break;
case 275:
-#line 1432 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1433 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3189 "ntp_parser.c" /* yacc.c:1646 */
+#line 3190 "ntp_parser.c" /* yacc.c:1646 */
break;
case 276:
-#line 1437 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1438 "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)));
}
-#line 3198 "ntp_parser.c" /* yacc.c:1646 */
+#line 3199 "ntp_parser.c" /* yacc.c:1646 */
break;
case 277:
-#line 1442 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1443 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3207 "ntp_parser.c" /* yacc.c:1646 */
+#line 3208 "ntp_parser.c" /* yacc.c:1646 */
break;
case 285:
-#line 1466 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1467 "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)));
}
-#line 3216 "ntp_parser.c" /* yacc.c:1646 */
+#line 3217 "ntp_parser.c" /* yacc.c:1646 */
break;
case 286:
-#line 1471 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1472 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3225 "ntp_parser.c" /* yacc.c:1646 */
+#line 3226 "ntp_parser.c" /* yacc.c:1646 */
break;
case 287:
-#line 1479 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1480 "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));
}
-#line 3234 "ntp_parser.c" /* yacc.c:1646 */
+#line 3235 "ntp_parser.c" /* yacc.c:1646 */
break;
case 288:
-#line 1484 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1485 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3243 "ntp_parser.c" /* yacc.c:1646 */
+#line 3244 "ntp_parser.c" /* yacc.c:1646 */
break;
case 289:
-#line 1492 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1493 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3249 "ntp_parser.c" /* yacc.c:1646 */
+#line 3250 "ntp_parser.c" /* yacc.c:1646 */
break;
case 291:
-#line 1498 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1499 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3255 "ntp_parser.c" /* yacc.c:1646 */
+#line 3256 "ntp_parser.c" /* yacc.c:1646 */
break;
case 292:
-#line 1503 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1504 "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)));
}
-#line 3264 "ntp_parser.c" /* yacc.c:1646 */
+#line 3265 "ntp_parser.c" /* yacc.c:1646 */
break;
case 293:
-#line 1508 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1509 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3273 "ntp_parser.c" /* yacc.c:1646 */
+#line 3274 "ntp_parser.c" /* yacc.c:1646 */
break;
case 294:
-#line 1516 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1517 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3282 "ntp_parser.c" /* yacc.c:1646 */
+#line 3283 "ntp_parser.c" /* yacc.c:1646 */
break;
case 295:
-#line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1522 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3291 "ntp_parser.c" /* yacc.c:1646 */
+#line 3292 "ntp_parser.c" /* yacc.c:1646 */
break;
case 296:
-#line 1529 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1530 "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");
@@ -3300,35 +3301,35 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3304 "ntp_parser.c" /* yacc.c:1646 */
+#line 3305 "ntp_parser.c" /* yacc.c:1646 */
break;
case 297:
-#line 1537 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1538 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
-#line 3310 "ntp_parser.c" /* yacc.c:1646 */
+#line 3311 "ntp_parser.c" /* yacc.c:1646 */
break;
case 298:
-#line 1538 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1539 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 3316 "ntp_parser.c" /* yacc.c:1646 */
+#line 3317 "ntp_parser.c" /* yacc.c:1646 */
break;
case 299:
-#line 1542 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1543 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3322 "ntp_parser.c" /* yacc.c:1646 */
+#line 3323 "ntp_parser.c" /* yacc.c:1646 */
break;
case 301:
-#line 1548 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1549 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
-#line 3328 "ntp_parser.c" /* yacc.c:1646 */
+#line 3329 "ntp_parser.c" /* yacc.c:1646 */
break;
case 302:
-#line 1556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1557 "ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
@@ -3338,125 +3339,125 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3342 "ntp_parser.c" /* yacc.c:1646 */
+#line 3343 "ntp_parser.c" /* yacc.c:1646 */
break;
case 303:
-#line 1573 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1574 "ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
-#line 3348 "ntp_parser.c" /* yacc.c:1646 */
+#line 3349 "ntp_parser.c" /* yacc.c:1646 */
break;
case 304:
-#line 1578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1579 "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));
}
-#line 3357 "ntp_parser.c" /* yacc.c:1646 */
+#line 3358 "ntp_parser.c" /* yacc.c:1646 */
break;
case 305:
-#line 1583 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1584 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3366 "ntp_parser.c" /* yacc.c:1646 */
+#line 3367 "ntp_parser.c" /* yacc.c:1646 */
break;
case 306:
-#line 1591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1592 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3372 "ntp_parser.c" /* yacc.c:1646 */
+#line 3373 "ntp_parser.c" /* yacc.c:1646 */
break;
case 309:
-#line 1601 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1602 "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));
}
-#line 3381 "ntp_parser.c" /* yacc.c:1646 */
+#line 3382 "ntp_parser.c" /* yacc.c:1646 */
break;
case 310:
-#line 1606 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1607 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3390 "ntp_parser.c" /* yacc.c:1646 */
+#line 3391 "ntp_parser.c" /* yacc.c:1646 */
break;
case 311:
-#line 1614 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1615 "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 3396 "ntp_parser.c" /* yacc.c:1646 */
+#line 3397 "ntp_parser.c" /* yacc.c:1646 */
break;
case 312:
-#line 1619 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1620 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (yyvsp[-1].Double); }
-#line 3402 "ntp_parser.c" /* yacc.c:1646 */
+#line 3403 "ntp_parser.c" /* yacc.c:1646 */
break;
case 313:
-#line 1624 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1625 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3408 "ntp_parser.c" /* yacc.c:1646 */
+#line 3409 "ntp_parser.c" /* yacc.c:1646 */
break;
case 314:
-#line 1629 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1630 "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));
}
-#line 3417 "ntp_parser.c" /* yacc.c:1646 */
+#line 3418 "ntp_parser.c" /* yacc.c:1646 */
break;
case 315:
-#line 1634 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1635 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3426 "ntp_parser.c" /* yacc.c:1646 */
+#line 3427 "ntp_parser.c" /* yacc.c:1646 */
break;
case 316:
-#line 1642 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1643 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3432 "ntp_parser.c" /* yacc.c:1646 */
+#line 3433 "ntp_parser.c" /* yacc.c:1646 */
break;
case 317:
-#line 1647 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1648 "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));
}
-#line 3441 "ntp_parser.c" /* yacc.c:1646 */
+#line 3442 "ntp_parser.c" /* yacc.c:1646 */
break;
case 318:
-#line 1652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1653 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3450 "ntp_parser.c" /* yacc.c:1646 */
+#line 3451 "ntp_parser.c" /* yacc.c:1646 */
break;
case 319:
-#line 1660 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+#line 1661 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3456 "ntp_parser.c" /* yacc.c:1646 */
+#line 3457 "ntp_parser.c" /* yacc.c:1646 */
break;
-#line 3460 "ntp_parser.c" /* yacc.c:1646 */
+#line 3461 "ntp_parser.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3684,7 +3685,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1671 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
+#line 1672 "ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/contrib/ntp/ntpd/ntp_parser.h b/contrib/ntp/ntpd/ntp_parser.h
index 308c2d4..e24b3f4 100644
--- a/contrib/ntp/ntpd/ntp_parser.h
+++ b/contrib/ntp/ntpd/ntp_parser.h
@@ -454,7 +454,7 @@ extern int yydebug;
union YYSTYPE
{
-#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:1909 */
+#line 52 "ntp_parser.y" /* yacc.c:1909 */
char * String;
double Double;
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
index fb8a837..eb66351 100644
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ b/contrib/ntp/ntpd/ntp_proto.c
@@ -33,7 +33,7 @@
/*
* This macro defines the authentication state. If x is 1 authentication
- * is required; othewise it is optional.
+ * is required; otherwise it is optional.
*/
#define AUTH(x, y) ((x) ? (y) == AUTH_OK \
: (y) == AUTH_OK || (y) == AUTH_NONE)
@@ -272,7 +272,7 @@ kiss_code_check(
}
-/*
+/*
* Check that NAK is valid
*/
nak_code
@@ -315,7 +315,7 @@ valid_NAK(
return INVALIDNAK;
}
- /*
+ /*
* Make sure that the extra field in the packet is all zeros
*/
rpkt = &rbufp->recv_pkt;
@@ -324,10 +324,13 @@ valid_NAK(
return INVALIDNAK;
}
- /*
- * Only valid if peer uses a key
+ /*
+ * During the first few packets of the autokey dance there will
+ * not (yet) be a keyid, but in this case FLAG_SKEY is set.
+ * So the NAK is invalid if either there's no peer, or
+ * if the keyid is 0 and FLAG_SKEY is not set.
*/
- if (!peer || !peer->keyid || !(peer->flags & FLAG_SKEY)) {
+ if (!peer || (!peer->keyid && !(peer->flags & FLAG_SKEY))) {
return INVALIDNAK;
}
@@ -372,14 +375,21 @@ transmit(
hpoll = peer->hpoll;
/*
+ * If we haven't received anything (even if unsync) since last
+ * send, reset ppoll.
+ */
+ if (peer->outdate > peer->timelastrec && !peer->reach)
+ peer->ppoll = peer->maxpoll;
+
+ /*
* In broadcast mode the poll interval is never changed from
* minpoll.
*/
if (peer->cast_flags & (MDF_BCAST | MDF_MCAST)) {
peer->outdate = current_time;
+ poll_update(peer, hpoll);
if (sys_leap != LEAP_NOTINSYNC)
peer_xmit(peer);
- poll_update(peer, hpoll);
return;
}
@@ -398,6 +408,7 @@ transmit(
*/
if (peer->cast_flags & MDF_ACAST) {
peer->outdate = current_time;
+ poll_update(peer, hpoll);
if (peer->unreach > sys_beacon) {
peer->unreach = 0;
peer->ttl = 0;
@@ -409,7 +420,6 @@ transmit(
peer_xmit(peer);
}
peer->unreach++;
- poll_update(peer, hpoll);
return;
}
@@ -427,11 +437,11 @@ transmit(
*/
if (peer->cast_flags & MDF_POOL) {
peer->outdate = current_time;
+ poll_update(peer, hpoll);
if ( (peer_associations <= 2 * sys_maxclock)
&& ( peer_associations < sys_maxclock
|| sys_survivors < sys_minclock))
pool_xmit(peer);
- poll_update(peer, hpoll);
return;
}
@@ -539,9 +549,9 @@ transmit(
/*
* Do not transmit if in broadcast client mode.
*/
+ poll_update(peer, hpoll);
if (peer->hmode != MODE_BCLIENT)
peer_xmit(peer);
- poll_update(peer, hpoll);
return;
}
@@ -645,7 +655,7 @@ receive(
hisleap = PKT_LEAP(pkt->li_vn_mode);
hismode = (int)PKT_MODE(pkt->li_vn_mode);
hisstratum = PKT_TO_STRATUM(pkt->stratum);
- DPRINTF(2, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s restrict %s org %#010x.%08x xmt %#010x.%08x\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s restrict %s org %#010x.%08x xmt %#010x.%08x\n",
current_time, stoa(&rbufp->dstadr->sin),
stoa(&rbufp->recv_srcadr), r4a.ippeerlimit, hismode,
build_iflags(rbufp->dstadr->flags),
@@ -737,7 +747,7 @@ receive(
} else {
DPRINTF(2, ("receive: drop: MODE_UNSPEC\n"));
sys_badlength++;
- return; /* invalid mode */
+ return; /* invalid mode */
}
}
@@ -841,7 +851,7 @@ receive(
/*
** Packet Data Verification Layer
**
- ** This layer verifies the packet data content. If
+ ** This layer verifies the packet data content. If
** authentication is required, a MAC must be present.
** If a MAC is present, it must validate.
** Crypto-NAK? Look - a shiny thing!
@@ -949,7 +959,7 @@ receive(
if (0 != peer) {
peer->badNAK++;
}
- msyslog(LOG_ERR, "Invalid-NAK error at %ld %s<-%s",
+ msyslog(LOG_ERR, "Invalid-NAK error at %ld %s<-%s",
current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr));
return;
}
@@ -957,7 +967,7 @@ receive(
if (has_mac == 0) {
restrict_mask &= ~RES_MSSNTP;
is_authentic = AUTH_NONE; /* not required */
- DPRINTF(2, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x NOMAC\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x NOMAC\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
authlen,
@@ -966,7 +976,7 @@ receive(
} else if (crypto_nak_test == VALIDNAK) {
restrict_mask &= ~RES_MSSNTP;
is_authentic = AUTH_CRYPTO; /* crypto-NAK */
- DPRINTF(2, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x MAC4\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x CRYPTONAK\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
skeyid, authlen + has_mac, is_authentic,
@@ -989,13 +999,19 @@ receive(
&& (memcmp(zero_key, (char *)pkt + authlen + 4,
MAX_MD5_LEN - 4) == 0)) {
is_authentic = AUTH_NONE;
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x SIGND\n",
+ current_time, stoa(dstadr_sin),
+ stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
+ authlen,
+ ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
+ ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
#endif /* HAVE_NTP_SIGND */
} else {
/*
* has_mac is not 0
* Not a VALID_NAK
- * Not an MS-SNTP SIGND packet
+ * Not an MS-SNTP SIGND packet
*
* So there is a MAC here.
*/
@@ -1054,7 +1070,7 @@ receive(
ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr)) {
DPRINTF(2, ("receive: drop: BCAST from wildcard\n"));
sys_restricted++;
- return; /* no wildcard */
+ return; /* no wildcard */
}
pkeyid = 0;
if (!SOCK_UNSPEC(&rbufp->dstadr->bcast))
@@ -1106,7 +1122,7 @@ receive(
if (crypto_flags && skeyid > NTP_MAXKEY)
authtrust(skeyid, 0);
#endif /* AUTOKEY */
- DPRINTF(2, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x\n",
+ DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x MAC\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
skeyid, authlen + has_mac, is_authentic,
@@ -1198,6 +1214,8 @@ receive(
* client association; a symmetric active packet mobilizes a
* symmetric passive association.
*/
+ DPRINTF(1, ("receive: MATCH_ASSOC dispatch: mode %d/%s:%s \n",
+ hismode, hm_str, am_str));
switch (retcode) {
/*
@@ -1373,7 +1391,7 @@ receive(
if (NULL == peer) {
DPRINTF(2, ("receive: AM_MANYCAST drop: duplicate\n"));
sys_declined++;
- return; /* ignore duplicate */
+ return; /* ignore duplicate */
}
/*
@@ -1511,10 +1529,10 @@ receive(
* is fixed at this value.
*/
peer = newpeer(&rbufp->recv_srcadr, NULL, match_ep,
- r4a.ippeerlimit, MODE_CLIENT, hisversion,
- pkt->ppoll, pkt->ppoll,
- FLAG_BC_VOL | FLAG_IBURST | FLAG_PREEMPT, MDF_BCLNT,
- 0, skeyid, sys_ident);
+ r4a.ippeerlimit, MODE_CLIENT, hisversion,
+ pkt->ppoll, pkt->ppoll,
+ FLAG_BC_VOL | FLAG_IBURST | FLAG_PREEMPT, MDF_BCLNT,
+ 0, skeyid, sys_ident);
if (NULL == peer) {
DPRINTF(2, ("receive: AM_NEWBCL drop: empty newpeer() failed\n"));
sys_restricted++;
@@ -1529,15 +1547,19 @@ receive(
return; /* hooray */
/*
- * This is the first packet received from a symmetric active
- * peer. If the packet is authentic, the first he sent, and
- * RES_NOEPEER is not enabled, mobilize a passive association
- * If not, kiss the frog.
+ * This is the first packet received from a potential ephemeral
+ * symmetric active peer. First, deal with broken Windows clients.
+ * Then, if NOEPEER is enabled, drop it. If the packet meets our
+ * authenticty requirements and is the first he sent, mobilize
+ * a passive association.
+ * Otherwise, kiss the frog.
*
* There are cases here where we do not call record_raw_stats().
*/
case AM_NEWPASS:
+ DEBUG_REQUIRE(MODE_ACTIVE == hismode);
+
#ifdef AUTOKEY
/*
* Do not respond if not the same group.
@@ -1551,27 +1573,33 @@ receive(
if (!AUTH(sys_authenticate | (restrict_mask &
(RES_NOPEER | RES_DONTTRUST)), is_authentic)
) {
- if (0 == (restrict_mask & RES_NOEPEER)) {
- /*
- * If authenticated but cannot mobilize an
- * association, send a symmetric passive
- * response without mobilizing an association.
- * This is for drat broken Windows clients. See
- * Microsoft KB 875424 for preferred workaround.
- */
- if (AUTH(restrict_mask & RES_DONTTRUST,
- is_authentic)) {
- fast_xmit(rbufp, MODE_PASSIVE, skeyid,
- restrict_mask);
- return; /* hooray */
- }
- if (is_authentic == AUTH_ERROR) {
- fast_xmit(rbufp, MODE_ACTIVE, 0,
- restrict_mask);
- sys_restricted++;
- return;
- }
+ /*
+ * If authenticated but cannot mobilize an
+ * association, send a symmetric passive
+ * response without mobilizing an association.
+ * This is for drat broken Windows clients. See
+ * Microsoft KB 875424 for preferred workaround.
+ */
+ if (AUTH(restrict_mask & RES_DONTTRUST,
+ is_authentic)) {
+ fast_xmit(rbufp, MODE_PASSIVE, skeyid,
+ restrict_mask);
+ return; /* hooray */
}
+ /* HMS: Why is this next set of lines a feature? */
+ if (is_authentic == AUTH_ERROR) {
+ fast_xmit(rbufp, MODE_PASSIVE, 0,
+ restrict_mask);
+ sys_restricted++;
+ return;
+ }
+
+ if (restrict_mask & RES_NOEPEER) {
+ DPRINTF(2, ("receive: AM_NEWPASS drop: NOEPEER\n"));
+ sys_declined++;
+ return;
+ }
+
/* [Bug 2941]
* If we got here, the packet isn't part of an
* existing association, either isn't correctly
@@ -1593,6 +1621,12 @@ receive(
return;
}
+ if (restrict_mask & RES_NOEPEER) {
+ DPRINTF(2, ("receive: AM_NEWPASS drop: NOEPEER\n"));
+ sys_declined++;
+ return;
+ }
+
/*
* Do not respond if synchronized and if stratum is
* below the floor or at or above the ceiling. Note,
@@ -1670,8 +1704,8 @@ receive(
}
/* This is error-worthy */
- if (pkt->ppoll < peer->minpoll ||
- pkt->ppoll > peer->maxpoll ) {
+ if ( pkt->ppoll < peer->minpoll
+ || pkt->ppoll > peer->maxpoll) {
msyslog(LOG_INFO, "receive: broadcast poll of %u from %s is out-of-range (%d to %d)!",
pkt->ppoll, stoa(&rbufp->recv_srcadr),
peer->minpoll, peer->maxpoll);
@@ -1719,7 +1753,7 @@ receive(
* network is trustable, so we take our accepted
* broadcast packets as we receive them. But
* some folks might want to take additional poll
- * delays before believing a backward step.
+ * delays before believing a backward step.
*/
if (sys_bcpollbstep) {
/* pkt->ppoll or peer->ppoll ? */
@@ -1735,8 +1769,8 @@ receive(
tdiff = p_xmt;
L_SUB(&tdiff, &peer->bxmt);
}
- if (tdiff.l_i < 0 &&
- (current_time - peer->timereceived) < deadband)
+ if ( tdiff.l_i < 0
+ && (current_time - peer->timereceived) < deadband)
{
msyslog(LOG_INFO, "receive: broadcast packet from %s contains non-monotonic timestamp: %#010x.%08x -> %#010x.%08x",
stoa(&rbufp->recv_srcadr),
@@ -2431,6 +2465,7 @@ process_packet(
peer->seldisptoolarge++;
DPRINTF(1, ("packet: flash header %04x\n",
peer->flash));
+ poll_update(peer, peer->hpoll); /* ppoll updated? */
return;
}
@@ -2586,7 +2621,7 @@ process_packet(
* between the unicast timestamp and the broadcast
* timestamp. This works for both basic and interleaved
* modes.
- * [Bug 3031] Don't keep this peer when the delay
+ * [Bug 3031] Don't keep this peer when the delay
* calculation gives reason to suspect clock steps.
* This is assumed for delays > 50ms.
*/
@@ -2977,8 +3012,6 @@ poll_update(
} else {
if (peer->retry > 0)
hpoll = peer->minpoll;
- else if (!(peer->reach))
- hpoll = peer->hpoll;
else
hpoll = min(peer->ppoll, peer->hpoll);
#ifdef REFCLOCK
@@ -3072,6 +3105,10 @@ peer_clear(
peer->stratum = STRATUM_UNSPEC;
memcpy(&peer->refid, ident, 4);
#ifdef REFCLOCK
+ } else {
+ /* Clear refclock sample filter */
+ peer->procptr->codeproc = 0;
+ peer->procptr->coderecv = 0;
}
#endif
@@ -3987,7 +4024,7 @@ peer_xmit(
DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d len %zu xmt %#010x.%08x\n",
current_time,
peer->dstadr ? stoa(&peer->dstadr->sin) : "-",
- stoa(&peer->srcadr), peer->hmode, sendlen,
+ stoa(&peer->srcadr), peer->hmode, sendlen,
xmt_tx.l_ui, xmt_tx.l_uf));
return;
}
@@ -4330,7 +4367,7 @@ leap_smear_add_offs(
return;
}
-#endif /* LEAP_SMEAR */
+#endif /* LEAP_SMEAR */
/*
diff --git a/contrib/ntp/ntpd/ntp_refclock.c b/contrib/ntp/ntpd/ntp_refclock.c
index a0dbd4c..d109b71 100644
--- a/contrib/ntp/ntpd/ntp_refclock.c
+++ b/contrib/ntp/ntpd/ntp_refclock.c
@@ -112,7 +112,7 @@ refclock_report(
/* ignore others */
break;
}
- if (pp->lastevent < 15)
+ if ((code != CEVNT_NOMINAL) && (pp->lastevent < 15))
pp->lastevent++;
if (pp->currentstatus != code) {
pp->currentstatus = (u_char)code;
diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c
index e541f7c..5358508 100644
--- a/contrib/ntp/ntpd/ntp_request.c
+++ b/contrib/ntp/ntpd/ntp_request.c
@@ -890,6 +890,7 @@ peer_info (
ip->flags |= INFO_FLAG_SHORTLIST;
ip->leap = pp->leap;
ip->hmode = pp->hmode;
+ ip->pmode = pp->pmode;
ip->keyid = pp->keyid;
ip->stratum = pp->stratum;
ip->ppoll = pp->ppoll;
@@ -2535,7 +2536,15 @@ get_clock_info(
DTOLFP(clock_stat.fudgetime2, &ltmp);
HTONL_FP(&ltmp, &ic->fudgetime2);
ic->fudgeval1 = htonl((u_int32)clock_stat.fudgeval1);
+ /* [Bug3527] Backward Incompatible: ic->fudgeval2 is
+ * a string, instantiated via memcpy() so there is no
+ * endian issue to correct.
+ */
+#ifdef DISABLE_BUG3527_FIX
ic->fudgeval2 = htonl(clock_stat.fudgeval2);
+#else
+ ic->fudgeval2 = clock_stat.fudgeval2;
+#endif
free_varlist(clock_stat.kv_list);
diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c
index 9ee35f8..9725b5b 100644
--- a/contrib/ntp/ntpd/ntp_timer.c
+++ b/contrib/ntp/ntpd/ntp_timer.c
@@ -82,8 +82,8 @@ u_long orphwait; /* orphan wait time */
#ifdef AUTOKEY
static u_long revoke_timer; /* keys revoke timer */
static u_long keys_timer; /* session key timer */
-u_long sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
-u_long sys_automax = NTP_AUTOMAX; /* key list timeout (log2 s) */
+u_char sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
+u_char sys_automax = NTP_AUTOMAX; /* key list timeout (log2 s) */
#endif /* AUTOKEY */
/*
@@ -404,7 +404,7 @@ timer(void)
* Garbage collect expired keys.
*/
if (keys_timer <= current_time) {
- keys_timer += 1 << sys_automax;
+ keys_timer += (1UL << sys_automax);
auth_agekeys();
}
@@ -413,7 +413,7 @@ timer(void)
* to regenerate cookies.
*/
if (revoke_timer && revoke_timer <= current_time) {
- revoke_timer += 1 << sys_revoke;
+ revoke_timer += (1UL << sys_revoke);
RAND_bytes((u_char *)&sys_private, 4);
}
#endif /* AUTOKEY */
diff --git a/contrib/ntp/ntpd/ntpd-opts.c b/contrib/ntp/ntpd/ntpd-opts.c
index 47b0808..f07269d 100644
--- a/contrib/ntp/ntpd/ntpd-opts.c
+++ b/contrib/ntp/ntpd/ntpd-opts.c
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed February 27, 2018 at 05:13:19 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed February 20, 2019 at 09:56:15 AM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:0:16 templates.
+ * Generated from AutoOpts 41:1:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -75,7 +75,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpd options
*/
static char const ntpd_opt_strs[3132] =
-/* 0 */ "ntpd 4.2.8p11\n"
+/* 0 */ "ntpd 4.2.8p13\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"
@@ -205,12 +205,12 @@ static char const ntpd_opt_strs[3132] =
/* 2901 */ "output version information and exit\0"
/* 2937 */ "version\0"
/* 2945 */ "NTPD\0"
-/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p11\n"
+/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p13\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
/* 3082 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 3116 */ "\n\0"
-/* 3118 */ "ntpd 4.2.8p11";
+/* 3118 */ "ntpd 4.2.8p13";
/**
* ipv4 option description with
@@ -1529,7 +1529,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8p11\n\
+ puts(_("ntpd 4.2.8p13\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\
@@ -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.8p11\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p13\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.8p11"));
+ puts(_("ntpd 4.2.8p13"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpd/ntpd-opts.h b/contrib/ntp/ntpd/ntpd-opts.h
index 3372d4d..e7e8a60 100644
--- a/contrib/ntp/ntpd/ntpd-opts.h
+++ b/contrib/ntp/ntpd/ntpd-opts.h
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed February 27, 2018 at 05:13:17 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed February 20, 2019 at 09:56:15 AM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:0:16 templates.
+ * Generated from AutoOpts 41:1:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -53,7 +53,7 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167936
+#define AO_TEMPLATE_VERSION 167937
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
@@ -106,9 +106,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.8p11"
+#define NTPD_VERSION "4.2.8p13"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8p11"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p13"
/**
* 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 ec02e0c..92d053e 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 "27 Feb 2018" "4.2.8p11" "User Commands"
+.TH ntpd 1ntpdman "20 Feb 2019" "4.2.8p13" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Ffa4WQ/ag-RfaWVQ)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:30 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:46 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdmdoc b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
index 339d2cf..9620898 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdmdoc
+++ b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd February 27 2018
+.Dd February 20 2019
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:47 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:37 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
index d4204ef..912da26 100644
--- a/contrib/ntp/ntpd/ntpd.c
+++ b/contrib/ntp/ntpd/ntpd.c
@@ -104,6 +104,10 @@
#endif
#endif
+#ifdef SYS_WINNT
+# include "ntservice.h"
+#endif
+
#ifdef _AIX
# include <ulimit.h>
#endif /* _AIX */
@@ -182,7 +186,6 @@ char *group; /* group to switch to */
const char *chrootdir; /* directory to chroot to */
uid_t sw_uid;
gid_t sw_gid;
-char *endp;
struct group *gr;
struct passwd *pw;
#endif /* HAVE_DROPROOT */
@@ -523,6 +526,236 @@ set_process_priority(void)
}
#endif /* !SIM */
+#if !defined(SIM) && !defined(SYS_WINNT)
+/*
+ * Detach from terminal (much like daemon())
+ * Nothe that this function calls exit()
+ */
+# ifdef HAVE_WORKING_FORK
+static void
+detach_from_terminal(
+ int pipe_fds[2],
+ long wait_sync,
+ const char *logfilename
+ )
+{
+ int rc;
+ int exit_code;
+# if !defined(HAVE_SETSID) && !defined (HAVE_SETPGID) && defined(TIOCNOTTY)
+ int fid;
+# endif
+# ifdef _AIX
+ struct sigaction sa;
+# endif
+
+ rc = fork();
+ if (-1 == rc) {
+ exit_code = (errno) ? errno : -1;
+ msyslog(LOG_ERR, "fork: %m");
+ exit(exit_code);
+ }
+ if (rc > 0) {
+ /* parent */
+ exit_code = wait_child_sync_if(pipe_fds[0],
+ wait_sync);
+ exit(exit_code);
+ }
+
+ /*
+ * child/daemon
+ * close all open files excepting waitsync_fd_to_close.
+ * msyslog() unreliable until after init_logging().
+ */
+ closelog();
+ if (syslog_file != NULL) {
+ fclose(syslog_file);
+ syslog_file = NULL;
+ syslogit = TRUE;
+ }
+ close_all_except(waitsync_fd_to_close);
+ INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \
+ && 2 == dup2(0, 2));
+
+ init_logging(progname, 0, TRUE);
+ /* we lost our logfile (if any) daemonizing */
+ setup_logfile(logfilename);
+
+# ifdef SYS_DOMAINOS
+ {
+ uid_$t puid;
+ status_$t st;
+
+ proc2_$who_am_i(&puid);
+ proc2_$make_server(&puid, &st);
+ }
+# endif /* SYS_DOMAINOS */
+# ifdef HAVE_SETSID
+ if (setsid() == (pid_t)-1)
+ msyslog(LOG_ERR, "setsid(): %m");
+# elif defined(HAVE_SETPGID)
+ if (setpgid(0, 0) == -1)
+ msyslog(LOG_ERR, "setpgid(): %m");
+# else /* !HAVE_SETSID && !HAVE_SETPGID follows */
+# ifdef TIOCNOTTY
+ fid = open("/dev/tty", 2);
+ if (fid >= 0) {
+ ioctl(fid, (u_long)TIOCNOTTY, NULL);
+ close(fid);
+ }
+# endif /* TIOCNOTTY */
+ ntp_setpgrp(0, getpid());
+# endif /* !HAVE_SETSID && !HAVE_SETPGID */
+# ifdef _AIX
+ /* Don't get killed by low-on-memory signal. */
+ sa.sa_handler = catch_danger;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_RESTART;
+ sigaction(SIGDANGER, &sa, NULL);
+# endif /* _AIX */
+
+ return;
+}
+# endif /* HAVE_WORKING_FORK */
+
+#ifdef HAVE_DROPROOT
+/*
+ * Map user name/number to user ID
+*/
+static int
+map_user(
+ )
+{
+ char *endp;
+
+ if (isdigit((unsigned char)*user)) {
+ sw_uid = (uid_t)strtoul(user, &endp, 0);
+ if (*endp != '\0')
+ goto getuser;
+
+ if ((pw = getpwuid(sw_uid)) != NULL) {
+ free(user);
+ user = estrdup(pw->pw_name);
+ sw_gid = pw->pw_gid;
+ } else {
+ errno = 0;
+ msyslog(LOG_ERR, "Cannot find user ID %s", user);
+ return 0;
+ }
+
+ } else {
+getuser:
+ errno = 0;
+ if ((pw = getpwnam(user)) != NULL) {
+ sw_uid = pw->pw_uid;
+ sw_gid = pw->pw_gid;
+ } else {
+ if (errno)
+ msyslog(LOG_ERR, "getpwnam(%s) failed: %m", user);
+ else
+ msyslog(LOG_ERR, "Cannot find user `%s'", user);
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+/*
+ * Map group name/number to group ID
+*/
+static int
+map_group(void)
+{
+ char *endp;
+
+ if (isdigit((unsigned char)*group)) {
+ sw_gid = (gid_t)strtoul(group, &endp, 0);
+ if (*endp != '\0')
+ goto getgroup;
+ } else {
+getgroup:
+ if ((gr = getgrnam(group)) != NULL) {
+ sw_gid = gr->gr_gid;
+ } else {
+ errno = 0;
+ msyslog(LOG_ERR, "Cannot find group `%s'", group);
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+static int
+set_group_ids(void)
+{
+ if (user && initgroups(user, sw_gid)) {
+ msyslog(LOG_ERR, "Cannot initgroups() to user `%s': %m", user);
+ return 0;
+ }
+ if (group && setgid(sw_gid)) {
+ msyslog(LOG_ERR, "Cannot setgid() to group `%s': %m", group);
+ return 0;
+ }
+ if (group && setegid(sw_gid)) {
+ msyslog(LOG_ERR, "Cannot setegid() to group `%s': %m", group);
+ return 0;
+ }
+ if (group) {
+ if (0 != setgroups(1, &sw_gid)) {
+ msyslog(LOG_ERR, "setgroups(1, %d) failed: %m", sw_gid);
+ return 0;
+ }
+ }
+ else if (pw)
+ if (0 != initgroups(pw->pw_name, pw->pw_gid)) {
+ msyslog(LOG_ERR, "initgroups(<%s>, %d) filed: %m", pw->pw_name, pw->pw_gid);
+ return 0;
+ }
+ return 1;
+}
+
+static int
+set_user_ids(void)
+{
+ if (user && setuid(sw_uid)) {
+ msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
+ return 0;
+ }
+ if (user && seteuid(sw_uid)) {
+ msyslog(LOG_ERR, "Cannot seteuid() to user `%s': %m", user);
+ return 0;
+ }
+ return 1;
+}
+
+/*
+ * Change (effective) user and group IDs, also initialize the supplementary group access list
+ */
+int set_user_group_ids(void);
+int
+set_user_group_ids(void)
+{
+ /* If the the user was already mapped, no need to map it again */
+ if ((NULL != user) && (0 == sw_uid)) {
+ if (0 == map_user())
+ exit (-1);
+ }
+ /* same applies for the group */
+ if ((NULL != group) && (0 == sw_gid)) {
+ if (0 == map_group())
+ exit (-1);
+ }
+
+ if (getegid() != sw_gid && 0 == set_group_ids())
+ return 0;
+ if (geteuid() != sw_uid && 0 == set_user_ids())
+ return 0;
+
+ return 1;
+}
+#endif /* HAVE_DROPROOT */
+#endif /* !SIM */
/*
* Main program. Initialize us, disconnect us from the tty if necessary,
@@ -549,12 +782,6 @@ ntpdmain(
int pipe_fds[2];
int rc;
int exit_code;
-# ifdef _AIX
- struct sigaction sa;
-# endif
-# if !defined(HAVE_SETSID) && !defined (HAVE_SETPGID) && defined(TIOCNOTTY)
- int fid;
-# endif
# endif /* HAVE_WORKING_FORK*/
# ifdef SCO5_CLOCK
int fd;
@@ -718,6 +945,11 @@ ntpdmain(
init_lib();
# ifdef SYS_WINNT
/*
+ * Make sure the service is initialized before we do anything else
+ */
+ ntservice_init();
+
+ /*
* Start interpolation thread, must occur before first
* get_systime()
*/
@@ -736,70 +968,7 @@ ntpdmain(
if (!nofork) {
# ifdef HAVE_WORKING_FORK
- rc = fork();
- if (-1 == rc) {
- exit_code = (errno) ? errno : -1;
- msyslog(LOG_ERR, "fork: %m");
- exit(exit_code);
- }
- if (rc > 0) {
- /* parent */
- exit_code = wait_child_sync_if(pipe_fds[0],
- wait_sync);
- exit(exit_code);
- }
-
- /*
- * child/daemon
- * close all open files excepting waitsync_fd_to_close.
- * msyslog() unreliable until after init_logging().
- */
- closelog();
- if (syslog_file != NULL) {
- fclose(syslog_file);
- syslog_file = NULL;
- syslogit = TRUE;
- }
- close_all_except(waitsync_fd_to_close);
- INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \
- && 2 == dup2(0, 2));
-
- init_logging(progname, 0, TRUE);
- /* we lost our logfile (if any) daemonizing */
- setup_logfile(logfilename);
-
-# ifdef SYS_DOMAINOS
- {
- uid_$t puid;
- status_$t st;
-
- proc2_$who_am_i(&puid);
- proc2_$make_server(&puid, &st);
- }
-# endif /* SYS_DOMAINOS */
-# ifdef HAVE_SETSID
- if (setsid() == (pid_t)-1)
- msyslog(LOG_ERR, "setsid(): %m");
-# elif defined(HAVE_SETPGID)
- if (setpgid(0, 0) == -1)
- msyslog(LOG_ERR, "setpgid(): %m");
-# else /* !HAVE_SETSID && !HAVE_SETPGID follows */
-# ifdef TIOCNOTTY
- fid = open("/dev/tty", 2);
- if (fid >= 0) {
- ioctl(fid, (u_long)TIOCNOTTY, NULL);
- close(fid);
- }
-# endif /* TIOCNOTTY */
- ntp_setpgrp(0, getpid());
-# endif /* !HAVE_SETSID && !HAVE_SETPGID */
-# ifdef _AIX
- /* Don't get killed by low-on-memory signal. */
- sa.sa_handler = catch_danger;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART;
- sigaction(SIGDANGER, &sa, NULL);
-# endif /* _AIX */
+ detach_from_terminal(pipe_fds, wait_sync, logfilename);
# endif /* HAVE_WORKING_FORK */
}
@@ -972,51 +1141,12 @@ ntpdmain(
# endif /* HAVE_LINUX_CAPABILITIES || HAVE_SOLARIS_PRIVS */
if (user != NULL) {
- if (isdigit((unsigned char)*user)) {
- sw_uid = (uid_t)strtoul(user, &endp, 0);
- if (*endp != '\0')
- goto getuser;
-
- if ((pw = getpwuid(sw_uid)) != NULL) {
- free(user);
- user = estrdup(pw->pw_name);
- sw_gid = pw->pw_gid;
- } else {
- errno = 0;
- msyslog(LOG_ERR, "Cannot find user ID %s", user);
- exit (-1);
- }
-
- } else {
-getuser:
- errno = 0;
- if ((pw = getpwnam(user)) != NULL) {
- sw_uid = pw->pw_uid;
- sw_gid = pw->pw_gid;
- } else {
- if (errno)
- msyslog(LOG_ERR, "getpwnam(%s) failed: %m", user);
- else
- msyslog(LOG_ERR, "Cannot find user `%s'", user);
- exit (-1);
- }
- }
+ if (0 == map_user())
+ exit (-1);
}
if (group != NULL) {
- if (isdigit((unsigned char)*group)) {
- sw_gid = (gid_t)strtoul(group, &endp, 0);
- if (*endp != '\0')
- goto getgroup;
- } else {
-getgroup:
- if ((gr = getgrnam(group)) != NULL) {
- sw_gid = gr->gr_gid;
- } else {
- errno = 0;
- msyslog(LOG_ERR, "Cannot find group `%s'", group);
- exit (-1);
- }
- }
+ if (0 == map_group())
+ exit (-1);
}
if (chrootdir ) {
@@ -1050,37 +1180,8 @@ getgroup:
exit(-1);
}
# endif /* HAVE_SOLARIS_PRIVS */
- if (user && initgroups(user, sw_gid)) {
- msyslog(LOG_ERR, "Cannot initgroups() to user `%s': %m", user);
- exit (-1);
- }
- if (group && setgid(sw_gid)) {
- msyslog(LOG_ERR, "Cannot setgid() to group `%s': %m", group);
- exit (-1);
- }
- if (group && setegid(sw_gid)) {
- msyslog(LOG_ERR, "Cannot setegid() to group `%s': %m", group);
- exit (-1);
- }
- if (group) {
- if (0 != setgroups(1, &sw_gid)) {
- msyslog(LOG_ERR, "setgroups(1, %d) failed: %m", sw_gid);
- exit (-1);
- }
- }
- else if (pw)
- if (0 != initgroups(pw->pw_name, pw->pw_gid)) {
- msyslog(LOG_ERR, "initgroups(<%s>, %d) filed: %m", pw->pw_name, pw->pw_gid);
- exit (-1);
- }
- if (user && setuid(sw_uid)) {
- msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
- exit (-1);
- }
- if (user && seteuid(sw_uid)) {
- msyslog(LOG_ERR, "Cannot seteuid() to user `%s': %m", user);
- exit (-1);
- }
+ if (0 == set_user_group_ids())
+ exit(-1);
# if !defined(HAVE_LINUX_CAPABILITIES) && !defined(HAVE_SOLARIS_PRIVS)
/*
@@ -1245,6 +1346,10 @@ int scmp_sc[] = {
}
#endif /* LIBSECCOMP and KERN_SECCOMP */
+#ifdef SYS_WINNT
+ ntservice_isup();
+#endif
+
# ifdef HAVE_IO_COMPLETION_PORT
for (;;) {
diff --git a/contrib/ntp/ntpd/ntpd.html b/contrib/ntp/ntpd/ntpd.html
index 3af0cc5..50a3ac8 100644
--- a/contrib/ntp/ntpd/ntpd.html
+++ b/contrib/ntp/ntpd/ntpd.html
@@ -1,128 +1,179 @@
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
-<title>ntpd: Network Time Protocol (NTP) Daemon User's Manual</title>
-<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="ntpd: Network Time Protocol (NTP) Daemon User's Manual">
-<meta name="generator" content="makeinfo 4.7">
-<link title="Top" rel="top" href="#Top">
-<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family: serif; font-weight: normal; }
---></style>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual</title>
+
+<meta name="description" content="ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual">
+<meta name="keywords" content="ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
+<link href="#Top" rel="start" title="Top">
+<link href="dir.html#Top" rel="up" title="(dir)">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.indentedblock {margin-right: 0em}
+blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style: oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nolinebreak {white-space: nowrap}
+span.roman {font-family: initial; font-weight: normal}
+span.sansserif {font-family: sans-serif; font-weight: normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
</head>
-<body>
-<h1 class="settitle">ntpd: Network Time Protocol (NTP) Daemon User's Manual</h1>
-<div class="node">
-<p><hr>
-<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Description">ntpd Description</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
-<br>
-</div>
-<h2 class="unnumbered">ntpd: Network Time Protocol (NTP) Daemon User Manual</h2>
+<body lang="en">
+<h1 class="settitle" align="center">ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual</h1>
+
+
+
+
+
+<a name="Top"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-Description" accesskey="n" rel="next">ntpd Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
+</div>
+<a name="ntpd_003a-Network-Time-Protocol-_0028NTP_0029-Daemon-User-Manual"></a>
+<h1 class="top">ntpd: Network Time Protocol (NTP) Daemon User Manual</h1>
<p>The <code>ntpd</code> program is an operating system daemon that synchronizes the
-system clock to remote NTP time servers or local reference clocks.
+system clock to remote NTP time servers or local reference clocks.
It is a complete implementation of NTP version 4 defined by RFC-5905, but
also retains compatible with version 3 defined by RFC-1305 and versions
-1 and 2, defined by RFC-1059 and RFC-1119, respectively.
+1 and 2, defined by RFC-1059 and RFC-1119, respectively.
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>
+<p>This document applies to version 4.2.8p13 of <code>ntpd</code>.
+</p>
+<a name="SEC_Overview"></a>
+<h2 class="shortcontents-heading">Short Table of Contents</h2>
+
+<div class="shortcontents">
+<ul class="no-bullet">
+<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+</ul>
+</div>
- <p>This document applies to version 4.2.8p11 of <code>ntpd</code>.
-<ul class="menu">
-<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
-<li><a accesskey="2" href="#ntpd-Invocation">ntpd Invocation</a>: Invoking ntpd
-<li><a accesskey="3" href="#Usage">Usage</a>: Usage
-</ul>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Description" accesskey="1">ntpd Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="2">ntpd Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpd
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+</td></tr>
+</table>
-<div class="node">
-<p><hr>
+<hr>
<a name="ntpd-Description"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#ntpd-Invocation" accesskey="n" rel="next">ntpd Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-
-<!-- node-name, next, previous, up -->
-<h3 class="section">Description</h3>
+<a name="Description"></a>
+<h2 class="chapter">1 Description</h2>
<p>The <code>ntpd</code> program ordinarily requires
-a configuration file described at <a href="#ntp_002econf">ntp.conf</a>.
+a configuration file described at &lsquo;ntp.conf&rsquo;.
This configuration file contains configuration commands described on
-the pages listed above.
+the pages listed above.
However a client can discover remote servers and configure them
-automatically.
+automatically.
This makes it possible to deploy a fleet of workstations without
specifying configuration details specific to the local environment.
-
- <p>The <code>ntpd</code> program normally operates continuously while adjusting the
+</p>
+<p>The <code>ntpd</code> program normally operates continuously while adjusting the
system time and frequency, but in some cases this might not be
-practical.
+practical.
With the <code>-q</code> option <code>ntpd</code> operates as in continuous mode, but
-exits just after setting the clock for the first time.
+exits just after setting the clock for the first time.
Most applications will probably want to specify the <code>iburst</code>
-option with the <code>server</code> command.
+option with the <code>server</code> command.
With this option an initial volley of messages is exchanged to
-groom the data and set the clock in about ten seconds' time.
-If nothing is heard after a few minutes' time,
+groom the data and set the clock in about ten seconds&rsquo; time.
+If nothing is heard after a few minutes&rsquo; time,
the daemon times out and exits without setting the clock.
-
-<div class="node">
-<p><hr>
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="1">ntpd Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+</table>
+
+<hr>
<a name="ntpd-Invocation"></a>
-<br>
+<div class="header">
+<p>
+Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpd-Description" accesskey="p" rel="prev">ntpd Description</a>, Up: <a href="#ntpd-Description" accesskey="u" rel="up">ntpd Description</a> &nbsp; </p>
</div>
+<a name="Invoking-ntpd"></a>
+<h3 class="section">1.1 Invoking ntpd</h3>
+<a name="index-ntpd"></a>
+<a name="index-NTP-daemon-program"></a>
-<h3 class="section">Invoking ntpd</h3>
-<p><a name="index-ntpd-1"></a><a name="index-NTP-daemon-program-2"></a>
- <p>The
+<p>The
<code>ntpd</code>
utility is an operating system daemon which sets
and maintains the system time of day in synchronism with Internet
-standard time servers.
+standard time servers.
It is a complete implementation of the
Network Time Protocol (NTP) version 4, as defined by RFC-5905,
but also retains compatibility with
version 3, as defined by RFC-1305, and versions 1
and 2, as defined by RFC-1059 and RFC-1119, respectively.
-
- <p>The
+</p>
+<p>The
<code>ntpd</code>
utility does most computations in 64-bit floating point
arithmetic and does relatively clumsy 64-bit fixed point operations
only when necessary to preserve the ultimate precision, about 232
-picoseconds.
+picoseconds.
While the ultimate precision is not achievable with
ordinary workstations and networks of today, it may be required
with future gigahertz CPU clocks and gigabit LANs.
-
- <p>Ordinarily,
+</p>
+<p>Ordinarily,
<code>ntpd</code>
reads the
<code>ntp.conf(5)</code>
configuration file at startup time in order to determine the
-synchronization sources and operating modes.
+synchronization sources and operating modes.
It is also possible to
specify a working, although limited, configuration entirely on the
-command line, obviating the need for a configuration file.
+command line, obviating the need for a configuration file.
This may
be particularly useful when the local host is to be configured as a
broadcast/multicast client, with all peers being determined by
listening to broadcasts at run time.
-
- <p>If NetInfo support is built into
+</p>
+<p>If NetInfo support is built into
<code>ntpd</code>
then
<code>ntpd</code>
@@ -133,8 +184,8 @@ file cannot be read and no file is
specified by the
<code>-c</code>
option.
-
- <p>Various internal
+</p>
+<p>Various internal
<code>ntpd</code>
variables can be displayed and
configuration options altered while the
@@ -145,8 +196,8 @@ using the
and
<code>ntpdc(1ntpdcmdoc)</code>
utility programs.
-
- <p>When
+</p>
+<p>When
<code>ntpd</code>
starts it looks at the value of
<code>umask(2)</code>,
@@ -155,72 +206,110 @@ and if zero
will set the
<code>umask(2)</code>
to 022.
-
- <p>This section was generated by <strong>AutoGen</strong>,
-using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpd</code> program.
+</p>
+<p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpd</code> program.
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
-
-<ul class="menu">
-<li><a accesskey="1" href="#ntpd-usage">ntpd usage</a>: ntpd help/usage (<span class="option">--help</span>)
-<li><a accesskey="2" href="#ntpd-ipv4">ntpd ipv4</a>: ipv4 option (-4)
-<li><a accesskey="3" href="#ntpd-ipv6">ntpd ipv6</a>: ipv6 option (-6)
-<li><a accesskey="4" href="#ntpd-authreq">ntpd authreq</a>: authreq option (-a)
-<li><a accesskey="5" href="#ntpd-authnoreq">ntpd authnoreq</a>: authnoreq option (-A)
-<li><a accesskey="6" href="#ntpd-configfile">ntpd configfile</a>: configfile option (-c)
-<li><a accesskey="7" href="#ntpd-driftfile">ntpd driftfile</a>: driftfile option (-f)
-<li><a accesskey="8" href="#ntpd-panicgate">ntpd panicgate</a>: panicgate option (-g)
-<li><a accesskey="9" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>: force-step-once option (-G)
-<li><a href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
-<li><a href="#ntpd-interface">ntpd interface</a>: interface option (-I)
-<li><a href="#ntpd-keyfile">ntpd keyfile</a>: keyfile option (-k)
-<li><a href="#ntpd-logfile">ntpd logfile</a>: logfile option (-l)
-<li><a href="#ntpd-novirtualips">ntpd novirtualips</a>: novirtualips option (-L)
-<li><a href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>: modifymmtimer option (-M)
-<li><a href="#ntpd-nice">ntpd nice</a>: nice option (-N)
-<li><a href="#ntpd-pidfile">ntpd pidfile</a>: pidfile option (-p)
-<li><a href="#ntpd-priority">ntpd priority</a>: priority option (-P)
-<li><a href="#ntpd-quit">ntpd quit</a>: quit option (-q)
-<li><a href="#ntpd-propagationdelay">ntpd propagationdelay</a>: propagationdelay option (-r)
-<li><a href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>: saveconfigquit option
-<li><a href="#ntpd-statsdir">ntpd statsdir</a>: statsdir option (-s)
-<li><a href="#ntpd-trustedkey">ntpd trustedkey</a>: trustedkey option (-t)
-<li><a href="#ntpd-user">ntpd user</a>: user option (-u)
-<li><a href="#ntpd-updateinterval">ntpd updateinterval</a>: updateinterval option (-U)
-<li><a href="#ntpd-wait_002dsync">ntpd wait-sync</a>: wait-sync option (-w)
-<li><a href="#ntpd-slew">ntpd slew</a>: slew option (-x)
-<li><a href="#ntpd-usepcc">ntpd usepcc</a>: usepcc option
-<li><a href="#ntpd-pccfreq">ntpd pccfreq</a>: pccfreq option
-<li><a href="#ntpd-mdns">ntpd mdns</a>: mdns option (-m)
-<li><a href="#ntpd-config">ntpd config</a>: presetting/configuring ntpd
-<li><a href="#ntpd-exit-status">ntpd exit status</a>: exit status
-<li><a href="#ntpd-Usage">ntpd Usage</a>: Usage
-<li><a href="#ntpd-Files">ntpd Files</a>: Files
-<li><a href="#ntpd-See-Also">ntpd See Also</a>: See Also
-<li><a href="#ntpd-Bugs">ntpd Bugs</a>: Bugs
-<li><a href="#ntpd-Notes">ntpd Notes</a>: Notes
-</ul>
-
-<div class="node">
-<p><hr>
-<a name="ntpd-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-ipv4">ntpd ipv4</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-usage" accesskey="1">ntpd usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpd help/usage (<samp>--help</samp>)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv4" accesskey="2">ntpd ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv6" accesskey="3">ntpd ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-authreq" accesskey="4">ntpd authreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authreq option (-a)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-authnoreq" accesskey="5">ntpd authnoreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authnoreq option (-A)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-configfile" accesskey="6">ntpd configfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">configfile option (-c)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-driftfile" accesskey="7">ntpd driftfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">driftfile option (-f)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-panicgate" accesskey="8">ntpd panicgate</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">panicgate option (-g)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-force_002dstep_002donce" accesskey="9">ntpd force-step-once</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">force-step-once option (-G)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-jaildir">ntpd jaildir</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">jaildir option (-i)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-interface">ntpd interface</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interface option (-I)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-keyfile">ntpd keyfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">keyfile option (-k)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-logfile">ntpd logfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">logfile option (-l)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-novirtualips">ntpd novirtualips</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">novirtualips option (-L)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">modifymmtimer option (-M)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-nice">ntpd nice</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">nice option (-N)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-pidfile">ntpd pidfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pidfile option (-p)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-priority">ntpd priority</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">priority option (-P)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-quit">ntpd quit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">quit option (-q)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-propagationdelay">ntpd propagationdelay</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">propagationdelay option (-r)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">saveconfigquit option
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-statsdir">ntpd statsdir</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">statsdir option (-s)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-trustedkey">ntpd trustedkey</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">trustedkey option (-t)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-user">ntpd user</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">user option (-u)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-updateinterval">ntpd updateinterval</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">updateinterval option (-U)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-wait_002dsync">ntpd wait-sync</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wait-sync option (-w)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-slew">ntpd slew</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">slew option (-x)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-usepcc">ntpd usepcc</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">usepcc option
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-pccfreq">ntpd pccfreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pccfreq option
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-mdns">ntpd mdns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mdns option (-m)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-config">ntpd config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpd
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-exit-status">ntpd exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Usage">ntpd Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Files">ntpd Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-See-Also">ntpd See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Bugs">ntpd Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Notes">ntpd Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+</td></tr>
+</table>
+
+<hr>
+<a name="ntpd-usage"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-ipv4" accesskey="n" rel="next">ntpd ipv4</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntpd help/usage (<span class="option">--help</span>)</h4>
-
-<p><a name="index-ntpd-help-3"></a>
-This is the automatically generated usage text for ntpd.
-
- <p>The text printed is the same whether selected with the <code>help</code> option
-(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
-the usage text by passing it through a pager program.
+<a name="ntpd-help_002fusage-_0028_002d_002dhelp_0029"></a>
+<h4 class="subsection">1.1.1 ntpd help/usage (<samp>--help</samp>)</h4>
+<a name="index-ntpd-help"></a>
+
+<p>This is the automatically generated usage text for ntpd.
+</p>
+<p>The text printed is the same whether selected with the <code>help</code> option
+(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
<code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
-used to select the program, defaulting to <span class="file">more</span>. Both will exit
+used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
-
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p10
+</p>
+<div class="example">
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p12
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
@@ -289,149 +378,143 @@ The following option preset mechanisms are supported:
- examining environment variables named NTPD_*
Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
-</pre>
- <div class="node">
-<p><hr>
-<a name="ntpd-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-ipv6">ntpd ipv6</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-usage">ntpd usage</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
-</div>
-
-<h4 class="subsection">ipv4 option (-4)</h4>
+</pre></div>
-<p><a name="index-ntpd_002dipv4-4"></a>
-This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must not appear in combination with any of the following options:
-ipv6.
-</ul>
-
- <p>Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-<div class="node">
-<p><hr>
-<a name="ntpd-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-authreq">ntpd authreq</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-ipv4">ntpd ipv4</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<hr>
+<a name="ntpd-ipv4"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-ipv6" accesskey="n" rel="next">ntpd ipv6</a>, Previous: <a href="#ntpd-usage" accesskey="p" rel="prev">ntpd usage</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ipv6 option (-6)</h4>
-
-<p><a name="index-ntpd_002dipv6-5"></a>
-This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must not appear in combination with any of the following options:
-ipv4.
-</ul>
-
- <p>Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-<div class="node">
-<p><hr>
-<a name="ntpd-authreq"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-authnoreq">ntpd authnoreq</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-ipv6">ntpd ipv6</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="ipv4-option-_0028_002d4_0029"></a>
+<h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
+<a name="index-ntpd_002dipv4"></a>
+
+<p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must not appear in combination with any of the following options:
+ipv6.
+</li></ul>
+
+<p>Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+</p><hr>
+<a name="ntpd-ipv6"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-authreq" accesskey="n" rel="next">ntpd authreq</a>, Previous: <a href="#ntpd-ipv4" accesskey="p" rel="prev">ntpd ipv4</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">authreq option (-a)</h4>
-
-<p><a name="index-ntpd_002dauthreq-6"></a>
-This is the &ldquo;require crypto authentication&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must not appear in combination with any of the following options:
-authnoreq.
-</ul>
-
- <p>Require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is the default.
-<div class="node">
-<p><hr>
-<a name="ntpd-authnoreq"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-configfile">ntpd configfile</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-authreq">ntpd authreq</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="ipv6-option-_0028_002d6_0029"></a>
+<h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
+<a name="index-ntpd_002dipv6"></a>
+
+<p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must not appear in combination with any of the following options:
+ipv4.
+</li></ul>
+
+<p>Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+</p><hr>
+<a name="ntpd-authreq"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-authnoreq" accesskey="n" rel="next">ntpd authnoreq</a>, Previous: <a href="#ntpd-ipv6" accesskey="p" rel="prev">ntpd ipv6</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">authnoreq option (-A)</h4>
-
-<p><a name="index-ntpd_002dauthnoreq-7"></a>
-This is the &ldquo;do not require crypto authentication&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must not appear in combination with any of the following options:
-authreq.
-</ul>
-
- <p>Do not require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is almost never a good idea.
-<div class="node">
-<p><hr>
-<a name="ntpd-configfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-driftfile">ntpd driftfile</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-authnoreq">ntpd authnoreq</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="authreq-option-_0028_002da_0029"></a>
+<h4 class="subsection">1.1.4 authreq option (-a)</h4>
+<a name="index-ntpd_002dauthreq"></a>
+
+<p>This is the &ldquo;require crypto authentication&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must not appear in combination with any of the following options:
+authnoreq.
+</li></ul>
+
+<p>Require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is the default.
+</p><hr>
+<a name="ntpd-authnoreq"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-configfile" accesskey="n" rel="next">ntpd configfile</a>, Previous: <a href="#ntpd-authreq" accesskey="p" rel="prev">ntpd authreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="authnoreq-option-_0028_002dA_0029"></a>
+<h4 class="subsection">1.1.5 authnoreq option (-A)</h4>
+<a name="index-ntpd_002dauthnoreq"></a>
+
+<p>This is the &ldquo;do not require crypto authentication&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must not appear in combination with any of the following options:
+authreq.
+</li></ul>
+
+<p>Do not require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is almost never a good idea.
+</p><hr>
+<a name="ntpd-configfile"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-driftfile" accesskey="n" rel="next">ntpd driftfile</a>, Previous: <a href="#ntpd-authnoreq" accesskey="p" rel="prev">ntpd authnoreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
+</div>
+<a name="configfile-option-_0028_002dc_0029"></a>
+<h4 class="subsection">1.1.6 configfile option (-c)</h4>
+<a name="index-ntpd_002dconfigfile"></a>
-<h4 class="subsection">configfile option (-c)</h4>
-
-<p><a name="index-ntpd_002dconfigfile-8"></a>
-This is the &ldquo;configuration file name&rdquo; option.
-This option takes a string argument.
+<p>This is the &ldquo;configuration file name&rdquo; option.
+This option takes a string argument.
The name and path of the configuration file,
-<span class="file">/etc/ntp.conf</span>
-by default.
-<div class="node">
-<p><hr>
-<a name="ntpd-driftfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-panicgate">ntpd panicgate</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-configfile">ntpd configfile</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<samp>/etc/ntp.conf</samp>
+by default.
+</p><hr>
+<a name="ntpd-driftfile"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-panicgate" accesskey="n" rel="next">ntpd panicgate</a>, Previous: <a href="#ntpd-configfile" accesskey="p" rel="prev">ntpd configfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="driftfile-option-_0028_002df_0029"></a>
+<h4 class="subsection">1.1.7 driftfile option (-f)</h4>
+<a name="index-ntpd_002ddriftfile"></a>
-<h4 class="subsection">driftfile option (-f)</h4>
-
-<p><a name="index-ntpd_002ddriftfile-9"></a>
-This is the &ldquo;frequency drift file name&rdquo; option.
-This option takes a string argument.
+<p>This is the &ldquo;frequency drift file name&rdquo; option.
+This option takes a string argument.
The name and path of the frequency file,
-<span class="file">/etc/ntp.drift</span>
-by default.
+<samp>/etc/ntp.drift</samp>
+by default.
This is the same operation as the
<code>driftfile</code> <kbd>driftfile</kbd>
configuration specification in the
-<span class="file">/etc/ntp.conf</span>
-file.
-<div class="node">
-<p><hr>
-<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-driftfile">ntpd driftfile</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<samp>/etc/ntp.conf</samp>
+file.
+</p><hr>
+<a name="ntpd-panicgate"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-force_002dstep_002donce" accesskey="n" rel="next">ntpd force-step-once</a>, Previous: <a href="#ntpd-driftfile" accesskey="p" rel="prev">ntpd driftfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">panicgate option (-g)</h4>
-
-<p><a name="index-ntpd_002dpanicgate-10"></a>
-This is the &ldquo;allow the first adjustment to be big&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>may appear an unlimited number of times.
-</ul>
-
- <p>Normally,
+<a name="panicgate-option-_0028_002dg_0029"></a>
+<h4 class="subsection">1.1.8 panicgate option (-g)</h4>
+<a name="index-ntpd_002dpanicgate"></a>
+
+<p>This is the &ldquo;allow the first adjustment to be big&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> may appear an unlimited number of times.
+</li></ul>
+
+<p>Normally,
<code>ntpd</code>
exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
<code>ntpd</code>
@@ -439,581 +522,579 @@ will exit with a message to the system log. This option can be used with the
<code>-q</code>
and
<code>-x</code>
-options.
+options.
See the
<code>tinker</code>
-configuration file directive for other options.
-<div class="node">
-<p><hr>
-<a name="ntpd-force_002dstep_002donce"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-panicgate">ntpd panicgate</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+configuration file directive for other options.
+</p><hr>
+<a name="ntpd-force_002dstep_002donce"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-jaildir" accesskey="n" rel="next">ntpd jaildir</a>, Previous: <a href="#ntpd-panicgate" accesskey="p" rel="prev">ntpd panicgate</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="force_002dstep_002donce-option-_0028_002dG_0029"></a>
+<h4 class="subsection">1.1.9 force-step-once option (-G)</h4>
+<a name="index-ntpd_002dforce_002dstep_002donce"></a>
-<h4 class="subsection">force-step-once option (-G)</h4>
-
-<p><a name="index-ntpd_002dforce_002dstep_002donce-11"></a>
-This is the &ldquo;step any initial offset correction.&rdquo; option.
+<p>This is the &ldquo;step any initial offset correction.&rdquo; option.
Normally,
<code>ntpd</code>
steps the time if the time offset exceeds the step threshold,
-which is 128 ms by default, and otherwise slews the time.
+which is 128 ms by default, and otherwise slews the time.
This option forces the initial offset correction to be stepped,
-so the highest time accuracy can be achieved quickly.
+so the highest time accuracy can be achieved quickly.
However, this may also cause the time to be stepped back
so this option must not be used if
-applications requiring monotonic time are running.
-See the <code>tinker</code> configuration file directive for other options.
-<div class="node">
-<p><hr>
-<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+applications requiring monotonic time are running.
+See the <code>tinker</code> configuration file directive for other options.
+</p><hr>
+<a name="ntpd-jaildir"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-interface" accesskey="n" rel="next">ntpd interface</a>, Previous: <a href="#ntpd-force_002dstep_002donce" accesskey="p" rel="prev">ntpd force-step-once</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="jaildir-option-_0028_002di_0029"></a>
+<h4 class="subsection">1.1.10 jaildir option (-i)</h4>
+<a name="index-ntpd_002djaildir"></a>
-<h4 class="subsection">jaildir option (-i)</h4>
-
-<p><a name="index-ntpd_002djaildir-12"></a>
-This is the &ldquo;jail directory&rdquo; option.
+<p>This is the &ldquo;jail directory&rdquo; option.
This option takes a string argument.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
+</li></ul>
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
-</ul>
-
- <p>Chroot the server to the directory
+<p>Chroot the server to the directory
<kbd>jaildir</kbd>
-.
-This option also implies that the server attempts to drop root privileges at startup.
+.
+This option also implies that the server attempts to drop root privileges at startup.
You may need to also specify a
<code>-u</code>
-option.
+option.
This option is only available if the OS supports adjusting the clock
-without full root privileges.
+without full root privileges.
This option is supported under NetBSD (configure with
<code>--enable-clockctl</code>) or Linux (configure with
-<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
-<div class="node">
-<p><hr>
-<a name="ntpd-interface"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-keyfile">ntpd keyfile</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-jaildir">ntpd jaildir</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
+</p><hr>
+<a name="ntpd-interface"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-keyfile" accesskey="n" rel="next">ntpd keyfile</a>, Previous: <a href="#ntpd-jaildir" accesskey="p" rel="prev">ntpd jaildir</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">interface option (-I)</h4>
-
-<p><a name="index-ntpd_002dinterface-13"></a>
-This is the &ldquo;listen on an interface name or address&rdquo; option.
-This option takes a string argument <span class="file">iface</span>.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>may appear an unlimited number of times.
-</ul>
-
- <p>Open the network address given, or all the addresses associated with the
+<a name="interface-option-_0028_002dI_0029"></a>
+<h4 class="subsection">1.1.11 interface option (-I)</h4>
+<a name="index-ntpd_002dinterface"></a>
+
+<p>This is the &ldquo;listen on an interface name or address&rdquo; option.
+This option takes a string argument <samp>iface</samp>.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> may appear an unlimited number of times.
+</li></ul>
+
+<p>Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
-also implies not opening other addresses, except wildcard and localhost.
+also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-<code>interface</code> command, which is more versatile.
-<div class="node">
-<p><hr>
-<a name="ntpd-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-logfile">ntpd logfile</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-interface">ntpd interface</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
-</div>
-
-<h4 class="subsection">keyfile option (-k)</h4>
-
-<p><a name="index-ntpd_002dkeyfile-14"></a>
-This is the &ldquo;path to symmetric keys&rdquo; option.
-This option takes a string argument.
-Specify the name and path of the symmetric key file.
-<span class="file">/etc/ntp.keys</span>
-is the default.
+<code>interface</code> command, which is more versatile.
+</p><hr>
+<a name="ntpd-keyfile"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-logfile" accesskey="n" rel="next">ntpd logfile</a>, Previous: <a href="#ntpd-interface" accesskey="p" rel="prev">ntpd interface</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
+</div>
+<a name="keyfile-option-_0028_002dk_0029"></a>
+<h4 class="subsection">1.1.12 keyfile option (-k)</h4>
+<a name="index-ntpd_002dkeyfile"></a>
+
+<p>This is the &ldquo;path to symmetric keys&rdquo; option.
+This option takes a string argument.
+Specify the name and path of the symmetric key file.
+<samp>/etc/ntp.keys</samp>
+is the default.
This is the same operation as the
<code>keys</code> <kbd>keyfile</kbd>
-configuration file directive.
-<div class="node">
-<p><hr>
-<a name="ntpd-logfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-novirtualips">ntpd novirtualips</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-keyfile">ntpd keyfile</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
-</div>
-
-<h4 class="subsection">logfile option (-l)</h4>
-
-<p><a name="index-ntpd_002dlogfile-15"></a>
-This is the &ldquo;path to the log file&rdquo; option.
-This option takes a string argument.
-Specify the name and path of the log file.
-The default is the system log file.
+configuration file directive.
+</p><hr>
+<a name="ntpd-logfile"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-novirtualips" accesskey="n" rel="next">ntpd novirtualips</a>, Previous: <a href="#ntpd-keyfile" accesskey="p" rel="prev">ntpd keyfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
+</div>
+<a name="logfile-option-_0028_002dl_0029"></a>
+<h4 class="subsection">1.1.13 logfile option (-l)</h4>
+<a name="index-ntpd_002dlogfile"></a>
+
+<p>This is the &ldquo;path to the log file&rdquo; option.
+This option takes a string argument.
+Specify the name and path of the log file.
+The default is the system log file.
This is the same operation as the
<code>logfile</code> <kbd>logfile</kbd>
-configuration file directive.
-<div class="node">
-<p><hr>
-<a name="ntpd-novirtualips"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-logfile">ntpd logfile</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+configuration file directive.
+</p><hr>
+<a name="ntpd-novirtualips"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-modifymmtimer" accesskey="n" rel="next">ntpd modifymmtimer</a>, Previous: <a href="#ntpd-logfile" accesskey="p" rel="prev">ntpd logfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="novirtualips-option-_0028_002dL_0029"></a>
+<h4 class="subsection">1.1.14 novirtualips option (-L)</h4>
+<a name="index-ntpd_002dnovirtualips"></a>
-<h4 class="subsection">novirtualips option (-L)</h4>
-
-<p><a name="index-ntpd_002dnovirtualips-16"></a>
-This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
+<p>This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
Do not listen to virtual interfaces, defined as those with
names containing a colon. This option is deprecated. Please
consider using the configuration file <code>interface</code> command, which
-is more versatile.
-<div class="node">
-<p><hr>
-<a name="ntpd-modifymmtimer"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-nice">ntpd nice</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-novirtualips">ntpd novirtualips</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+is more versatile.
+</p><hr>
+<a name="ntpd-modifymmtimer"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-nice" accesskey="n" rel="next">ntpd nice</a>, Previous: <a href="#ntpd-novirtualips" accesskey="p" rel="prev">ntpd novirtualips</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">modifymmtimer option (-M)</h4>
-
-<p><a name="index-ntpd_002dmodifymmtimer-17"></a>
-This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
-</ul>
-
- <p>Set the Windows Multimedia Timer to highest resolution. This
+<a name="modifymmtimer-option-_0028_002dM_0029"></a>
+<h4 class="subsection">1.1.15 modifymmtimer option (-M)</h4>
+<a name="index-ntpd_002dmodifymmtimer"></a>
+
+<p>This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
+</li></ul>
+
+<p>Set the Windows Multimedia Timer to highest resolution. This
ensures the resolution does not change while ntpd is running,
-avoiding timekeeping glitches associated with changes.
-<div class="node">
-<p><hr>
-<a name="ntpd-nice"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-pidfile">ntpd pidfile</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+avoiding timekeeping glitches associated with changes.
+</p><hr>
+<a name="ntpd-nice"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-pidfile" accesskey="n" rel="next">ntpd pidfile</a>, Previous: <a href="#ntpd-modifymmtimer" accesskey="p" rel="prev">ntpd modifymmtimer</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="nice-option-_0028_002dN_0029"></a>
+<h4 class="subsection">1.1.16 nice option (-N)</h4>
+<a name="index-ntpd_002dnice"></a>
-<h4 class="subsection">nice option (-N)</h4>
-
-<p><a name="index-ntpd_002dnice-18"></a>
-This is the &ldquo;run at high priority&rdquo; option.
+<p>This is the &ldquo;run at high priority&rdquo; option.
To the extent permitted by the operating system, run
<code>ntpd</code>
-at the highest priority.
-<div class="node">
-<p><hr>
-<a name="ntpd-pidfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-priority">ntpd priority</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-nice">ntpd nice</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+at the highest priority.
+</p><hr>
+<a name="ntpd-pidfile"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-priority" accesskey="n" rel="next">ntpd priority</a>, Previous: <a href="#ntpd-nice" accesskey="p" rel="prev">ntpd nice</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="pidfile-option-_0028_002dp_0029"></a>
+<h4 class="subsection">1.1.17 pidfile option (-p)</h4>
+<a name="index-ntpd_002dpidfile"></a>
-<h4 class="subsection">pidfile option (-p)</h4>
-
-<p><a name="index-ntpd_002dpidfile-19"></a>
-This is the &ldquo;path to the pid file&rdquo; option.
-This option takes a string argument.
+<p>This is the &ldquo;path to the pid file&rdquo; option.
+This option takes a string argument.
Specify the name and path of the file used to record
-<code>ntpd</code>'s
-process ID.
+<code>ntpd</code>&rsquo;s
+process ID.
This is the same operation as the
<code>pidfile</code> <kbd>pidfile</kbd>
-configuration file directive.
-<div class="node">
-<p><hr>
-<a name="ntpd-priority"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-quit">ntpd quit</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-pidfile">ntpd pidfile</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+configuration file directive.
+</p><hr>
+<a name="ntpd-priority"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-quit" accesskey="n" rel="next">ntpd quit</a>, Previous: <a href="#ntpd-pidfile" accesskey="p" rel="prev">ntpd pidfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="priority-option-_0028_002dP_0029"></a>
+<h4 class="subsection">1.1.18 priority option (-P)</h4>
+<a name="index-ntpd_002dpriority"></a>
-<h4 class="subsection">priority option (-P)</h4>
-
-<p><a name="index-ntpd_002dpriority-20"></a>
-This is the &ldquo;process priority&rdquo; option.
-This option takes a number argument.
+<p>This is the &ldquo;process priority&rdquo; option.
+This option takes a number argument.
To the extent permitted by the operating system, run
<code>ntpd</code>
at the specified
<code>sched_setscheduler(SCHED_FIFO)</code>
-priority.
-<div class="node">
-<p><hr>
-<a name="ntpd-quit"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-propagationdelay">ntpd propagationdelay</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-priority">ntpd priority</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+priority.
+</p><hr>
+<a name="ntpd-quit"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-propagationdelay" accesskey="n" rel="next">ntpd propagationdelay</a>, Previous: <a href="#ntpd-priority" accesskey="p" rel="prev">ntpd priority</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">quit option (-q)</h4>
-
-<p><a name="index-ntpd_002dquit-21"></a>
-This is the &ldquo;set the time and quit&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must not appear in combination with any of the following options:
-saveconfigquit, wait-sync.
-</ul>
-
- <p><code>ntpd</code>
+<a name="quit-option-_0028_002dq_0029"></a>
+<h4 class="subsection">1.1.19 quit option (-q)</h4>
+<a name="index-ntpd_002dquit"></a>
+
+<p>This is the &ldquo;set the time and quit&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must not appear in combination with any of the following options:
+saveconfigquit, wait-sync.
+</li></ul>
+
+<p><code>ntpd</code>
will not daemonize and will exit after the clock is first
synchronized. This behavior mimics that of the
<code>ntpdate</code>
-program, which will soon be replaced with a shell script.
+program, which will soon be replaced with a shell script.
The
<code>-g</code>
and
<code>-x</code>
-options can be used with this option.
-Note: The kernel time discipline is disabled with this option.
-<div class="node">
-<p><hr>
-<a name="ntpd-propagationdelay"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-quit">ntpd quit</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
-</div>
-
-<h4 class="subsection">propagationdelay option (-r)</h4>
-
-<p><a name="index-ntpd_002dpropagationdelay-22"></a>
-This is the &ldquo;broadcast/propagation delay&rdquo; option.
-This option takes a string argument.
-Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
-<div class="node">
-<p><hr>
-<a name="ntpd-saveconfigquit"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-statsdir">ntpd statsdir</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-propagationdelay">ntpd propagationdelay</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
-</div>
-
-<h4 class="subsection">saveconfigquit option</h4>
-
-<p><a name="index-ntpd_002dsaveconfigquit-23"></a>
-This is the &ldquo;save parsed configuration and quit&rdquo; option.
-This option takes a string argument.
+options can be used with this option.
+Note: The kernel time discipline is disabled with this option.
+</p><hr>
+<a name="ntpd-propagationdelay"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-saveconfigquit" accesskey="n" rel="next">ntpd saveconfigquit</a>, Previous: <a href="#ntpd-quit" accesskey="p" rel="prev">ntpd quit</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
+</div>
+<a name="propagationdelay-option-_0028_002dr_0029"></a>
+<h4 class="subsection">1.1.20 propagationdelay option (-r)</h4>
+<a name="index-ntpd_002dpropagationdelay"></a>
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>SAVECONFIG</code> during the compilation.
-<li>must not appear in combination with any of the following options:
-quit, wait-sync.
-</ul>
+<p>This is the &ldquo;broadcast/propagation delay&rdquo; option.
+This option takes a string argument.
+Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
+</p><hr>
+<a name="ntpd-saveconfigquit"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-statsdir" accesskey="n" rel="next">ntpd statsdir</a>, Previous: <a href="#ntpd-propagationdelay" accesskey="p" rel="prev">ntpd propagationdelay</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
+</div>
+<a name="saveconfigquit-option"></a>
+<h4 class="subsection">1.1.21 saveconfigquit option</h4>
+<a name="index-ntpd_002dsaveconfigquit"></a>
- <p>Cause <code>ntpd</code> to parse its startup configuration file and save an
+<p>This is the &ldquo;save parsed configuration and quit&rdquo; option.
+This option takes a string argument.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>SAVECONFIG</code> during the compilation.
+</li><li> must not appear in combination with any of the following options:
+quit, wait-sync.
+</li></ul>
+
+<p>Cause <code>ntpd</code> to parse its startup configuration file and save an
equivalent to the given filename and exit. This option was
-designed for automated testing.
-<div class="node">
-<p><hr>
-<a name="ntpd-statsdir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-trustedkey">ntpd trustedkey</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+designed for automated testing.
+</p><hr>
+<a name="ntpd-statsdir"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-trustedkey" accesskey="n" rel="next">ntpd trustedkey</a>, Previous: <a href="#ntpd-saveconfigquit" accesskey="p" rel="prev">ntpd saveconfigquit</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="statsdir-option-_0028_002ds_0029"></a>
+<h4 class="subsection">1.1.22 statsdir option (-s)</h4>
+<a name="index-ntpd_002dstatsdir"></a>
-<h4 class="subsection">statsdir option (-s)</h4>
-
-<p><a name="index-ntpd_002dstatsdir-24"></a>
-This is the &ldquo;statistics file location&rdquo; option.
-This option takes a string argument.
-Specify the directory path for files created by the statistics facility.
+<p>This is the &ldquo;statistics file location&rdquo; option.
+This option takes a string argument.
+Specify the directory path for files created by the statistics facility.
This is the same operation as the
<code>statsdir</code> <kbd>statsdir</kbd>
-configuration file directive.
-<div class="node">
-<p><hr>
-<a name="ntpd-trustedkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-user">ntpd user</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-statsdir">ntpd statsdir</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+configuration file directive.
+</p><hr>
+<a name="ntpd-trustedkey"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-user" accesskey="n" rel="next">ntpd user</a>, Previous: <a href="#ntpd-statsdir" accesskey="p" rel="prev">ntpd statsdir</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">trustedkey option (-t)</h4>
-
-<p><a name="index-ntpd_002dtrustedkey-25"></a>
-This is the &ldquo;trusted key number&rdquo; option.
-This option takes a string argument <span class="file">tkey</span>.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>may appear an unlimited number of times.
-</ul>
-
- <p>Add the specified key number to the trusted key list.
-<div class="node">
-<p><hr>
-<a name="ntpd-user"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-updateinterval">ntpd updateinterval</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-trustedkey">ntpd trustedkey</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="trustedkey-option-_0028_002dt_0029"></a>
+<h4 class="subsection">1.1.23 trustedkey option (-t)</h4>
+<a name="index-ntpd_002dtrustedkey"></a>
+
+<p>This is the &ldquo;trusted key number&rdquo; option.
+This option takes a string argument <samp>tkey</samp>.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> may appear an unlimited number of times.
+</li></ul>
+
+<p>Add the specified key number to the trusted key list.
+</p><hr>
+<a name="ntpd-user"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-updateinterval" accesskey="n" rel="next">ntpd updateinterval</a>, Previous: <a href="#ntpd-trustedkey" accesskey="p" rel="prev">ntpd trustedkey</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="user-option-_0028_002du_0029"></a>
+<h4 class="subsection">1.1.24 user option (-u)</h4>
+<a name="index-ntpd_002duser"></a>
-<h4 class="subsection">user option (-u)</h4>
-
-<p><a name="index-ntpd_002duser-26"></a>
-This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
+<p>This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
This option takes a string argument.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
+</li></ul>
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
-</ul>
-
- <p>Specify a user, and optionally a group, to switch to.
+<p>Specify a user, and optionally a group, to switch to.
This option is only available if the OS supports adjusting the clock
-without full root privileges.
+without full root privileges.
This option is supported under NetBSD (configure with
<code>--enable-clockctl</code>) or Linux (configure with
-<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
-<div class="node">
-<p><hr>
-<a name="ntpd-updateinterval"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-wait_002dsync">ntpd wait-sync</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-user">ntpd user</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
+</p><hr>
+<a name="ntpd-updateinterval"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-wait_002dsync" accesskey="n" rel="next">ntpd wait-sync</a>, Previous: <a href="#ntpd-user" accesskey="p" rel="prev">ntpd user</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="updateinterval-option-_0028_002dU_0029"></a>
+<h4 class="subsection">1.1.25 updateinterval option (-U)</h4>
+<a name="index-ntpd_002dupdateinterval"></a>
-<h4 class="subsection">updateinterval option (-U)</h4>
-
-<p><a name="index-ntpd_002dupdateinterval-27"></a>
-This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
-This option takes a number argument.
-Give the time in seconds between two scans for new or dropped interfaces.
+<p>This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
+This option takes a number argument.
+Give the time in seconds between two scans for new or dropped interfaces.
For systems with routing socket support the scans will be performed shortly after the interface change
-has been detected by the system.
-Use 0 to disable scanning. 60 seconds is the minimum time between scans.
-<div class="node">
-<p><hr>
-<a name="ntpd-wait_002dsync"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-slew">ntpd slew</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-updateinterval">ntpd updateinterval</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+has been detected by the system.
+Use 0 to disable scanning. 60 seconds is the minimum time between scans.
+</p><hr>
+<a name="ntpd-wait_002dsync"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-slew" accesskey="n" rel="next">ntpd slew</a>, Previous: <a href="#ntpd-updateinterval" accesskey="p" rel="prev">ntpd updateinterval</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="wait_002dsync-option-_0028_002dw_0029"></a>
+<h4 class="subsection">1.1.26 wait-sync option (-w)</h4>
+<a name="index-ntpd_002dwait_002dsync"></a>
-<h4 class="subsection">wait-sync option (-w)</h4>
-
-<p><a name="index-ntpd_002dwait_002dsync-28"></a>
-This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
+<p>This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
This option takes a number argument.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>HAVE_WORKING_FORK</code> during the compilation.
-<li>must not appear in combination with any of the following options:
-nofork, quit, saveconfigquit.
-</ul>
-
- <p>If greater than zero, alters <code>ntpd</code>'s behavior when forking to
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>HAVE_WORKING_FORK</code> during the compilation.
+</li><li> must not appear in combination with any of the following options:
+nofork, quit, saveconfigquit.
+</li></ul>
+
+<p>If greater than zero, alters <code>ntpd</code>&rsquo;s behavior when forking to
daemonize. Instead of exiting with status 0 immediately after
the fork, the parent waits up to the specified number of
seconds for the child to first synchronize the clock. The exit
status is zero (success) if the clock was synchronized,
-otherwise it is <code>ETIMEDOUT</code>.
+otherwise it is <code>ETIMEDOUT</code>.
This provides the option for a script starting <code>ntpd</code> to easily
-wait for the first set of the clock before proceeding.
-<div class="node">
-<p><hr>
-<a name="ntpd-slew"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-usepcc">ntpd usepcc</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-wait_002dsync">ntpd wait-sync</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
-</div>
-
-<h4 class="subsection">slew option (-x)</h4>
-
-<p><a name="index-ntpd_002dslew-29"></a>
-This is the &ldquo;slew up to 600 seconds&rdquo; option.
-Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
-This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
-Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
-Thus, an adjustment as much as 600 s will take almost 14 days to complete.
+wait for the first set of the clock before proceeding.
+</p><hr>
+<a name="ntpd-slew"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-usepcc" accesskey="n" rel="next">ntpd usepcc</a>, Previous: <a href="#ntpd-wait_002dsync" accesskey="p" rel="prev">ntpd wait-sync</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
+</div>
+<a name="slew-option-_0028_002dx_0029"></a>
+<h4 class="subsection">1.1.27 slew option (-x)</h4>
+<a name="index-ntpd_002dslew"></a>
+
+<p>This is the &ldquo;slew up to 600 seconds&rdquo; option.
+Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
+This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
+Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
+Thus, an adjustment as much as 600 s will take almost 14 days to complete.
This option can be used with the
<code>-g</code>
and
<code>-q</code>
-options.
+options.
See the
<code>tinker</code>
-configuration file directive for other options.
-Note: The kernel time discipline is disabled with this option.
-<div class="node">
-<p><hr>
-<a name="ntpd-usepcc"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-pccfreq">ntpd pccfreq</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-slew">ntpd slew</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+configuration file directive for other options.
+Note: The kernel time discipline is disabled with this option.
+</p><hr>
+<a name="ntpd-usepcc"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-pccfreq" accesskey="n" rel="next">ntpd pccfreq</a>, Previous: <a href="#ntpd-slew" accesskey="p" rel="prev">ntpd slew</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">usepcc option</h4>
-
-<p><a name="index-ntpd_002dusepcc-30"></a>
-This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
-</ul>
-
- <p>Attempt to substitute the CPU counter for <code>QueryPerformanceCounter</code>.
+<a name="usepcc-option"></a>
+<h4 class="subsection">1.1.28 usepcc option</h4>
+<a name="index-ntpd_002dusepcc"></a>
+
+<p>This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
+</li></ul>
+
+<p>Attempt to substitute the CPU counter for <code>QueryPerformanceCounter</code>.
The CPU counter and <code>QueryPerformanceCounter</code> are compared, and if
they have the same frequency, the CPU counter (RDTSC on x86) is
-used directly, saving the overhead of a system call.
-<div class="node">
-<p><hr>
-<a name="ntpd-pccfreq"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-mdns">ntpd mdns</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-usepcc">ntpd usepcc</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+used directly, saving the overhead of a system call.
+</p><hr>
+<a name="ntpd-pccfreq"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-mdns" accesskey="n" rel="next">ntpd mdns</a>, Previous: <a href="#ntpd-usepcc" accesskey="p" rel="prev">ntpd usepcc</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="pccfreq-option"></a>
+<h4 class="subsection">1.1.29 pccfreq option</h4>
+<a name="index-ntpd_002dpccfreq"></a>
-<h4 class="subsection">pccfreq option</h4>
-
-<p><a name="index-ntpd_002dpccfreq-31"></a>
-This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
+<p>This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
This option takes a string argument.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
+</li></ul>
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
-</ul>
-
- <p>Force substitution the CPU counter for <code>QueryPerformanceCounter</code>.
+<p>Force substitution the CPU counter for <code>QueryPerformanceCounter</code>.
The CPU counter (RDTSC on x86) is used unconditionally with the
-given frequency (in Hz).
-<div class="node">
-<p><hr>
-<a name="ntpd-mdns"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-config">ntpd config</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-pccfreq">ntpd pccfreq</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+given frequency (in Hz).
+</p><hr>
+<a name="ntpd-mdns"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-config" accesskey="n" rel="next">ntpd config</a>, Previous: <a href="#ntpd-pccfreq" accesskey="p" rel="prev">ntpd pccfreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">mdns option (-m)</h4>
-
-<p><a name="index-ntpd_002dmdns-32"></a>
-This is the &ldquo;register with mdns as a ntp server&rdquo; option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must be compiled in by defining <code>HAVE_DNSREGISTRATION</code> during the compilation.
-</ul>
-
- <p>Registers as an NTP server with the local mDNS server which allows
+<a name="mdns-option-_0028_002dm_0029"></a>
+<h4 class="subsection">1.1.30 mdns option (-m)</h4>
+<a name="index-ntpd_002dmdns"></a>
+
+<p>This is the &ldquo;register with mdns as a ntp server&rdquo; option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must be compiled in by defining <code>HAVE_DNSREGISTRATION</code> during the compilation.
+</li></ul>
+
+<p>Registers as an NTP server with the local mDNS server which allows
the server to be discovered via mDNS client lookup.
+</p>
-<div class="node">
-<p><hr>
-<a name="ntpd-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-exit-status">ntpd exit status</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-mdns">ntpd mdns</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<hr>
+<a name="ntpd-config"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-exit-status" accesskey="n" rel="next">ntpd exit status</a>, Previous: <a href="#ntpd-mdns" accesskey="p" rel="prev">ntpd mdns</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">presetting/configuring ntpd</h4>
+<a name="presetting_002fconfiguring-ntpd"></a>
+<h4 class="subsection">1.1.31 presetting/configuring ntpd</h4>
<p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from environment variables named <code>NTPD</code> and <code>NTPD_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
-the options listed above in upper case and segmented with underscores.
+the options listed above in upper case and segmented with underscores.
The <code>NTPD</code> variable will be tokenized and parsed like
the command line. The remaining variables are tested for existence and their
values are treated like option arguments.
+</p>
- <p>The command line options relating to configuration and/or usage help are:
-
-<h5 class="subsubheading">version (-)</h5>
+<p>The command line options relating to configuration and/or usage help are:
+</p>
+<a name="version-_0028_002d_0029"></a>
+<h4 class="subsubheading">version (-)</h4>
<p>Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
Only the first letter of the argument is examined:
-
- <dl>
-<dt><span class="samp">version</span><dd>Only print the version. This is the default.
-<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
-<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+</p>
+<dl compact="compact">
+<dt>&lsquo;<samp>version</samp>&rsquo;</dt>
+<dd><p>Only print the version. This is the default.
+</p></dd>
+<dt>&lsquo;<samp>copyright</samp>&rsquo;</dt>
+<dd><p>Name the copyright usage licensing terms.
+</p></dd>
+<dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
+<dd><p>Print the full copyright usage licensing terms.
+</p></dd>
</dl>
-<div class="node">
-<p><hr>
-<a name="ntpd-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Usage">ntpd Usage</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-config">ntpd config</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<hr>
+<a name="ntpd-exit-status"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-Usage" accesskey="n" rel="next">ntpd Usage</a>, Previous: <a href="#ntpd-config" accesskey="p" rel="prev">ntpd config</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntpd exit status</h4>
+<a name="ntpd-exit-status-1"></a>
+<h4 class="subsection">1.1.32 ntpd exit status</h4>
<p>One of the following exit values will be returned:
- <dl>
-<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
-<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</p><dl compact="compact">
+<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
+<dd><p>Successful program execution.
+</p></dd>
+<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
+<dd><p>The operation failed or the command syntax was not valid.
+</p></dd>
</dl>
- <div class="node">
-<p><hr>
-<a name="ntpd-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Files">ntpd Files</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-exit-status">ntpd exit status</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<hr>
+<a name="ntpd-Usage"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-Files" accesskey="n" rel="next">ntpd Files</a>, Previous: <a href="#ntpd-exit-status" accesskey="p" rel="prev">ntpd exit status</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntpd Usage</h4>
-
-<div class="node">
-<p><hr>
-<a name="ntpd-Files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-See-Also">ntpd See Also</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-Usage">ntpd Usage</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="ntpd-Usage-1"></a>
+<h4 class="subsection">1.1.33 ntpd Usage</h4>
+<hr>
+<a name="ntpd-Files"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-See-Also" accesskey="n" rel="next">ntpd See Also</a>, Previous: <a href="#ntpd-Usage" accesskey="p" rel="prev">ntpd Usage</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntpd Files</h4>
-
-<div class="node">
-<p><hr>
-<a name="ntpd-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Bugs">ntpd Bugs</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-Files">ntpd Files</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="ntpd-Files-1"></a>
+<h4 class="subsection">1.1.34 ntpd Files</h4>
+<hr>
+<a name="ntpd-See-Also"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-Bugs" accesskey="n" rel="next">ntpd Bugs</a>, Previous: <a href="#ntpd-Files" accesskey="p" rel="prev">ntpd Files</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntpd See Also</h4>
-
-<div class="node">
-<p><hr>
-<a name="ntpd-Bugs"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Notes">ntpd Notes</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-See-Also">ntpd See Also</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="ntpd-See-Also-1"></a>
+<h4 class="subsection">1.1.35 ntpd See Also</h4>
+<hr>
+<a name="ntpd-Bugs"></a>
+<div class="header">
+<p>
+Next: <a href="#ntpd-Notes" accesskey="n" rel="next">ntpd Notes</a>, Previous: <a href="#ntpd-See-Also" accesskey="p" rel="prev">ntpd See Also</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-
-<h4 class="subsection">ntpd Bugs</h4>
-
-<div class="node">
-<p><hr>
-<a name="ntpd-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-Bugs">ntpd Bugs</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
-<br>
+<a name="ntpd-Bugs-1"></a>
+<h4 class="subsection">1.1.36 ntpd Bugs</h4>
+<hr>
+<a name="ntpd-Notes"></a>
+<div class="header">
+<p>
+Previous: <a href="#ntpd-Bugs" accesskey="p" rel="prev">ntpd Bugs</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
+<a name="ntpd-Notes-1"></a>
+<h4 class="subsection">1.1.37 ntpd Notes</h4>
-<h4 class="subsection">ntpd Notes</h4>
-
-<div class="node">
-<p><hr>
+<hr>
<a name="Usage"></a>
-<br>
+<div class="header">
+<p>
+Previous: <a href="#ntpd-Invocation" accesskey="p" rel="prev">ntpd Invocation</a>, Up: <a href="#ntpd-Description" accesskey="u" rel="up">ntpd Description</a> &nbsp; </p>
</div>
-
-<!-- node-name, next, previous, up -->
-<h3 class="section">Usage</h3>
-
+<a name="Usage-1"></a>
+<h3 class="section">1.2 Usage</h3>
+
+<table>
+<thead><tr><th width="23%">What</th><th width="23%">Default</th><th width="5%">Flag</th><th width="15%">Option</th></tr></thead>
+<tr><td width="23%">configuration file</td><td width="23%"><code>/etc/ntp.conf</code></td><td width="5%"><code>-c</code></td><td width="15%"><code>conffile</code></td></tr>
+<tr><td width="23%">frequency file</td><td width="23%">none</td><td width="5%"><code>-f</code></td><td width="15%"><code>driftfile</code></td></tr>
+<tr><td width="23%">leapseconds file</td><td width="23%">none</td><td width="5%"></td><td width="15%"><code>leapfile</code></td></tr>
+<tr><td width="23%">process ID file</td><td width="23%">none</td><td width="5%"><code>-p</code></td><td width="15%"><code>pidfile</code></td></tr>
+<tr><td width="23%">log file</td><td width="23%">system log</td><td width="5%"><code>-l</code></td><td width="15%"><code>logfile</code></td></tr>
+<tr><td width="23%">include file</td><td width="23%">none</td><td width="5%">none</td><td width="15%"><code>includefile</code></td></tr>
+<tr><td width="23%">statistics path</td><td width="23%"><code>/var/NTP</code></td><td width="5%"><code>-s</code></td><td width="15%"><code>statsdir</code></td></tr>
+<tr><td width="23%">keys path</td><td width="23%"><code>/usr/local/etc</code></td><td width="5%"><code>-k</code></td><td width="15%"><code>keysdir</code></td></tr>
+</table>
+<hr>
+
+
+
+</body>
+</html>
diff --git a/contrib/ntp/ntpd/ntpd.man.in b/contrib/ntp/ntpd/ntpd.man.in
index d3f94c6..ed5a2f0 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@ "27 Feb 2018" "4.2.8p11" "User Commands"
+.TH ntpd @NTPD_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Ffa4WQ/ag-RfaWVQ)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:30 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:46 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/ntpd/ntpd.mdoc.in b/contrib/ntp/ntpd/ntpd.mdoc.in
index 53b1f41..8e3d427 100644
--- a/contrib/ntp/ntpd/ntpd.mdoc.in
+++ b/contrib/ntp/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd February 27 2018
+.Dd February 20 2019
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 05:14:47 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 20, 2019 at 09:56:37 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/ntpd/rc_cmdlength.c b/contrib/ntp/ntpd/rc_cmdlength.c
index 922312e..240fa0a 100644
--- a/contrib/ntp/ntpd/rc_cmdlength.c
+++ b/contrib/ntp/ntpd/rc_cmdlength.c
@@ -5,6 +5,8 @@
# include <unistd.h>
#endif
+// XXX: Move to header.
+size_t remoteconfig_cmdlength( const char *, const char *);
/* Bug 2853 */
/* evaluate the length of the command sequence. This breaks at the first
diff --git a/contrib/ntp/ntpd/refclock_bancomm.c b/contrib/ntp/ntpd/refclock_bancomm.c
index 49922e3..577ad27 100644
--- a/contrib/ntp/ntpd/refclock_bancomm.c
+++ b/contrib/ntp/ntpd/refclock_bancomm.c
@@ -60,6 +60,9 @@
#include <stdio.h>
#include <syslog.h>
#include <ctype.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
struct btfp_time /* Structure for reading 5 time words */
/* in one ioctl(2) operation. */
@@ -74,17 +77,16 @@ struct btfp_time /* Structure for reading 5 time words */
#define IOCIOWN( l, n, s ) ( BTFPIOC | n )
/***** Simple ioctl commands *****/
-#define RUNLOCK IOCIOR(b, 19, int ) /* Release Capture Lockout */
-#define RCR0 IOCIOR(b, 22, int ) /* Read control register zero.*/
-#define WCR0 IOCIOWN(b, 23, int) /* Write control register zero*/
+#define RUNLOCK IOCIOR(b, 19, int ) /* Release Capture Lockout */
+#define RCR0 IOCIOR(b, 22, int ) /* Read control register zero.*/
+#define WCR0 IOCIOWN(b, 23, int) /* Write control register zero*/
/***** Compound ioctl commands *****/
/* Read all 5 time words in one call. */
-#define READTIME IOCIORN(b, 32, sizeof( struct btfp_time ))
-
#if defined(__FreeBSD__)
-#undef READTIME
-#define READTIME _IOR('u', 5, struct btfp_time )
+# define READTIME _IOR('u', 5, struct btfp_time )
+#else
+# define READTIME IOCIORN(b, 32, sizeof( struct btfp_time ))
#endif
/* Solaris specific section */
@@ -165,18 +167,76 @@ static void vme_poll (int unit, struct peer *);
struct vmedate *get_datumtime(struct vmedate *);
void tvme_fill(struct vmedate *, uint32_t btm[2]);
void stfp_time2tvme(struct vmedate *time_vme, struct stfp_time *stfp);
-inline const char *DEVICE_NAME(int n);
+static const char *get_devicename(int n);
+/* [Bug 3558] and [Bug 1674] perlinger@ntp.org says:
+ *
+ * bcReadBinTime() is defined to use two DWORD pointers on Windows and
+ * Linux in the BANCOMM SDK. DWORD is of course Windows-specific
+ * (*shudder*), and it is defined as 'unsigned long' under
+ * Linux/Unix. (*sigh*)
+ *
+ * This creates quite some headache. The size of 'unsigned long' is
+ * platform/compiler/memory-model dependent (LP32 vs LP64 vs LLP64),
+ * while the card itself always creates 32bit time stamps. What a
+ * bummer. And DWORD has tendency to contain 64bit on Win64 (which is
+ * why we have a DWORD32 defined on Win64) so it can be used as
+ * substitute for 'UINT_PTR' in Windows API headers. I won't even try
+ * to comment on that, because anything I have to say will not be civil.
+ *
+ * We work around this by possibly using a wrapper function that makes
+ * the necessary conversions/casts. It might be a bit tricky to
+ * maintain the conditional logic below, but any lingering disease needs
+ * constant care to avoid a breakout.
+ */
+#if defined(__linux__)
+ typedef unsigned long bcBinTimeT;
+# if SIZEOF_LONG == 4
+# define safeReadBinTime bcReadBinTime
+# endif
+#elif defined(SYS_WINNT)
+ typedef DWORD bcBinTimeT;
+# if !defined(_WIN64) || _WIN64 == 0
+# define safeReadBinTime bcReadBinTime
+# endif
+#else
+ typedef uint32_t bcBinTimeT;
+# define safeReadBinTime bcReadBinTime
+#endif
/*
* Define the bc*() functions as weak so we can compile/link without them.
* Only clients with the card will have the proprietary vendor device driver
* and interface library needed for use on Linux/Windows platforms.
*/
-extern uint32_t __attribute__ ((weak)) bcReadBinTime(SYMMT_PCI_HANDLE, uint32_t *, uint32_t*, uint8_t*);
+extern uint32_t __attribute__ ((weak)) bcReadBinTime(SYMMT_PCI_HANDLE, bcBinTimeT*, bcBinTimeT*, uint8_t*);
extern SYMMT_PCI_HANDLE __attribute__ ((weak)) bcStartPci(void);
extern void __attribute__ ((weak)) bcStopPci(SYMMT_PCI_HANDLE);
+/* This is the conversion wrapper for the long/DWORD/uint32_t clash in
+ * reading binary times.
+ */
+#ifndef safeReadBinTime
+static uint32_t
+safeReadBinTime(
+ SYMMT_PCI_HANDLE hnd,
+ uint32_t *pt1,
+ uint32_t *pt2,
+ uint8_t *p3
+ )
+{
+ bcBinTimeT t1, t2;
+ uint32_t rc;
+
+ rc = bcReadBinTime(hnd, &t1, &t2, p3);
+ if (rc != 0) {
+ *pt1 = (uint32_t)t1;
+ *pt2 = (uint32_t)t2;
+ }
+ return rc;
+}
+#endif /* !defined(safeReadBinTime) */
+
/*
* Transfer vector
*/
@@ -195,15 +255,27 @@ int regvalue;
int tfp_type; /* mode selector, indicate platform and driver interface */
SYMMT_PCI_HANDLE stfp_handle;
-/**
- * this macro returns the device name based on
- * the platform we are running on and the device number
+/* This helper function returns the device name based on the platform we
+ * are running on and the device number.
+ *
+ * Uses a static buffer, so the result is valid only to the next call of
+ * this function!
*/
-#if defined(__sun__)
-inline const char *DEVICE_NAME(int n) {static char s[20]={0}; snprintf(s,19,"/dev/stfp%d",n);return s;}
-#else
-inline const char* DEVICE_NAME(int n) {static char s[20]={0}; snprintf(s,19,"/dev/btfp%d",n);return s;}
-#endif /**__sun__**/
+static const char*
+get_devicename(int n)
+{
+
+# if defined(__sun__)
+ static const char * const template ="/dev/stfp%d";
+# else
+ static const char * const template ="/dev/btfp%d";
+# endif
+ static char namebuf[20];
+
+ snprintf(namebuf, sizeof(namebuf), template, n);
+ namebuf[sizeof(namebuf)-1] = '\0'; /* paranoia rulez! */
+ return namebuf;
+}
/*
* vme_start - open the VME device and initialize data for processing
@@ -235,9 +307,9 @@ vme_start(
*/
#ifdef DEBUG
- printf("Opening DATUM DEVICE %s\n",DEVICE_NAME(peer->refclkunit));
+ printf("Opening DATUM DEVICE %s\n",get_devicename(peer->refclkunit));
#endif
- if ( (fd_vme = open(DEVICE_NAME(peer->refclkunit), O_RDWR)) < 0) {
+ if ( (fd_vme = open(get_devicename(peer->refclkunit), O_RDWR)) < 0) {
msyslog(LOG_ERR, "vme_start: failed open of %s: %m", vmedev);
return (0);
}
@@ -433,7 +505,7 @@ get_datumtime(struct vmedate *time_vme)
break;
case 2: /* Linux/Windows, PCI, 2 32bit time words */
- if (bcReadBinTime(stfp_handle, &btm[1], &btm[0], &dmy) == 0) {
+ if (safeReadBinTime(stfp_handle, &btm[1], &btm[0], &dmy) == 0) {
msyslog(LOG_ERR, "get_datumtime error: %m");
return(NULL);
}
@@ -512,10 +584,11 @@ void
tvme_fill(struct vmedate *time_vme, uint32_t btm[2])
{
struct tm maj;
- uint32_t dmaj, dmin;
+ time_t dmaj;
+ uint32_t dmin;
- dmaj = btm[1]; /* syntax sugar */
- dmin = btm[0];
+ dmaj = btm[1]; /* syntax sugar & expansion */
+ dmin = btm[0]; /* just syntax sugar */
gmtime_r(&dmaj, &maj);
time_vme->day = maj.tm_yday+1;
diff --git a/contrib/ntp/ntpd/refclock_datum.c b/contrib/ntp/ntpd/refclock_datum.c
index 9795cfa..09d72c6 100644
--- a/contrib/ntp/ntpd/refclock_datum.c
+++ b/contrib/ntp/ntpd/refclock_datum.c
@@ -485,7 +485,8 @@ datum_pts_receive(
struct recvbuf *rbufp
)
{
- int i, nb;
+ int i;
+ size_t nb;
l_fp tstmp;
struct peer *p;
struct datum_pts_unit *datum_pts;
diff --git a/contrib/ntp/ntpd/refclock_gpsdjson.c b/contrib/ntp/ntpd/refclock_gpsdjson.c
index c2d41ff..78a4fc8 100644
--- a/contrib/ntp/ntpd/refclock_gpsdjson.c
+++ b/contrib/ntp/ntpd/refclock_gpsdjson.c
@@ -1136,7 +1136,7 @@ json_token_skip(
const json_ctx * ctx,
tok_ref tid)
{
- if (tid >= 0 && (u_int)tid < ctx->ntok) {
+ if (tid >= 0 && tid < ctx->ntok) {
int len = ctx->tok[tid].size;
/* For arrays and objects, the size is the number of
* ITEMS in the compound. Thats the number of objects in
@@ -1164,7 +1164,7 @@ json_token_skip(
/* The next condition should never be true, but paranoia
* prevails...
*/
- if (tid < 0 || (u_int)tid > ctx->ntok)
+ if (tid < 0 || tid > ctx->ntok)
tid = ctx->ntok;
}
return tid;
diff --git a/contrib/ntp/ntpd/refclock_jupiter.c b/contrib/ntp/ntpd/refclock_jupiter.c
index 84d089d..8d6cde2 100644
--- a/contrib/ntp/ntpd/refclock_jupiter.c
+++ b/contrib/ntp/ntpd/refclock_jupiter.c
@@ -139,8 +139,7 @@ static void jupiter_canmsg (struct instance *, u_int);
static u_short jupiter_cksum (u_short *, u_int);
static int jupiter_config (struct instance *);
static void jupiter_debug (struct peer *, const char *,
- const char *, ...)
- __attribute__ ((format (printf, 3, 4)));
+ const char *, ...) NTP_PRINTF(3, 4);
static const char * jupiter_parse_t (struct instance *, u_short *);
static const char * jupiter_parse_gpos (struct instance *, u_short *);
static void jupiter_platform (struct instance *, u_int);
@@ -159,10 +158,6 @@ static char * jupiter_send (struct instance *, struct jheader *);
static void jupiter_shutdown(int, struct peer *);
static int jupiter_start (int, struct peer *);
-static u_int get_full_week(u_int base_week, u_int gpos_week);
-static u_int get_base_week(void);
-
-
/*
* Transfer vector
*/
@@ -856,8 +851,7 @@ jupiter_parse_gpos(struct instance *instance, u_short *sp)
}
instance->gpos_sweek = DS2UI(jg->sweek);
- instance->gpos_gweek = get_full_week(get_base_week(),
- getshort(jg->gweek));
+ instance->gpos_gweek = basedate_expand_gpsweek(getshort(jg->gweek));
/* according to the protocol spec, the seconds-in-week cannot
* exceed the nominal value: Is it really necessary to normalise
@@ -1130,56 +1124,6 @@ jupiter_recv(struct instance *instance)
return (cc);
}
-static u_int
-get_base_week(void)
-{
- static int init_done /* = 0 */;
- static u_int base_week;
-
- /* Get the build date, convert to days since GPS epoch and
- * finally weeks since GPS epoch. Note that the build stamp is
- * trusted once it is fetched -- only dates before the GPS epoch
- * are not permitted. This will permit proper synchronisation
- * for a time range of 1024 weeks starting with 00:00:00 of the
- * last Sunday on or before the build time.
- *
- * If the impossible happens and fetching the build date fails,
- * a 1024-week cycle starting with 2016-01-03 is assumed to
- * avoid catastropic errors. This will work until 2035-08-19.
- */
- if (!init_done) {
- struct calendar bd;
- if (ntpcal_get_build_date(&bd)) {
- int32_t days = ntpcal_date_to_rd(&bd);
- if (days > RDN_GPS_EPOCH)
- days -= RDN_GPS_EPOCH;
- else
- days = 0;
- base_week = days / 7;
- } else {
- base_week = 1878; /* 2016-01-03, Sunday */
- msyslog(LOG_ERR,
- "refclock_jupiter: ntpcal_get_build_date() failed: %s",
- "using 2016-01-03 as GPS base!");
- }
- init_done = 1;
- }
- return base_week;
-}
-
-static u_int
-get_full_week(
- u_int base_week,
- u_int gpos_week
- )
-{
- /* Periodic extension on base week. Since the period is 1024
- * weeks and we do unsigned arithmetic here, we can do wonderful
- * things with masks and the well-defined overflow behaviour.
- */
- return base_week + ((gpos_week - base_week) & 1023);
-}
-
#else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
int refclock_jupiter_bs;
#endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
diff --git a/contrib/ntp/ntpd/refclock_parse.c b/contrib/ntp/ntpd/refclock_parse.c
index cfe2a89..9f5b0d7 100644
--- a/contrib/ntp/ntpd/refclock_parse.c
+++ b/contrib/ntp/ntpd/refclock_parse.c
@@ -4256,8 +4256,7 @@ mk_utcinfo(
struct tm *tm;
int nc;
- if (wnlsf < GPSWRAP)
- wnlsf += GPSWEEKS;
+ wnlsf = basedate_expand_gpsweek(wnlsf);
/* 'wnt' not used here: would need the same treatment as 'wnlsf */
t_ls = (time_t) wnlsf * SECSPERWEEK
diff --git a/contrib/ntp/ntpd/refclock_shm.c b/contrib/ntp/ntpd/refclock_shm.c
index f031a39..da38355 100644
--- a/contrib/ntp/ntpd/refclock_shm.c
+++ b/contrib/ntp/ntpd/refclock_shm.c
@@ -340,6 +340,7 @@ shm_poll(
if (pp->coderecv != pp->codeproc) {
/* have some samples, everything OK */
pp->lastref = pp->lastrec;
+ refclock_report(peer, CEVNT_NOMINAL);
refclock_receive(peer);
} else if (NULL == up->shm) { /* is this possible at all? */
/* we're out of business without SHM access */
diff --git a/contrib/ntp/ntpd/refclock_true.c b/contrib/ntp/ntpd/refclock_true.c
index 2799f3e..3590139 100644
--- a/contrib/ntp/ntpd/refclock_true.c
+++ b/contrib/ntp/ntpd/refclock_true.c
@@ -640,7 +640,7 @@ true_send(
size_t len = strlen(cmd);
true_debug(peer, "Send '%s'\n", cmd);
- if (write(pp->io.fd, cmd, (unsigned)len) != len)
+ if (write(pp->io.fd, cmd, len) != (ssize_t)len)
refclock_report(peer, CEVNT_FAULT);
else
pp->polls++;
OpenPOWER on IntegriCloud