aboutsummaryrefslogtreecommitdiff
path: root/ntpd
diff options
context:
space:
mode:
Diffstat (limited to 'ntpd')
-rw-r--r--ntpd/Makefile.in2
-rw-r--r--ntpd/complete.conf.in16
-rw-r--r--ntpd/invoke-ntp.conf.texi290
-rw-r--r--ntpd/invoke-ntp.keys.texi14
-rw-r--r--ntpd/invoke-ntpd.texi4
-rw-r--r--ntpd/keyword-gen-utd2
-rw-r--r--ntpd/keyword-gen.c4
-rw-r--r--ntpd/ntp.conf.5man340
-rw-r--r--ntpd/ntp.conf.5mdoc342
-rw-r--r--ntpd/ntp.conf.def338
-rw-r--r--ntpd/ntp.conf.html356
-rw-r--r--ntpd/ntp.conf.man.in340
-rw-r--r--ntpd/ntp.conf.mdoc.in342
-rw-r--r--ntpd/ntp.keys.5man16
-rw-r--r--ntpd/ntp.keys.5mdoc16
-rw-r--r--ntpd/ntp.keys.def12
-rw-r--r--ntpd/ntp.keys.html14
-rw-r--r--ntpd/ntp.keys.man.in16
-rw-r--r--ntpd/ntp.keys.mdoc.in16
-rw-r--r--ntpd/ntp_config.c493
-rw-r--r--ntpd/ntp_control.c466
-rw-r--r--ntpd/ntp_crypto.c12
-rw-r--r--ntpd/ntp_io.c70
-rw-r--r--ntpd/ntp_keyword.h2177
-rw-r--r--ntpd/ntp_leapsec.c22
-rw-r--r--ntpd/ntp_parser.c2492
-rw-r--r--ntpd/ntp_parser.h766
-rw-r--r--ntpd/ntp_parser.y79
-rw-r--r--ntpd/ntp_peer.c61
-rw-r--r--ntpd/ntp_proto.c423
-rw-r--r--ntpd/ntp_refclock.c22
-rw-r--r--ntpd/ntp_request.c51
-rw-r--r--ntpd/ntp_restrict.c197
-rw-r--r--ntpd/ntp_scanner.c1
-rw-r--r--ntpd/ntp_util.c20
-rw-r--r--ntpd/ntpd-opts.c14
-rw-r--r--ntpd/ntpd-opts.h6
-rw-r--r--ntpd/ntpd.1ntpdman6
-rw-r--r--ntpd/ntpd.1ntpdmdoc4
-rw-r--r--ntpd/ntpd.c15
-rw-r--r--ntpd/ntpd.html4
-rw-r--r--ntpd/ntpd.man.in6
-rw-r--r--ntpd/ntpd.mdoc.in4
-rw-r--r--ntpd/ntpsim.c1
-rw-r--r--ntpd/refclock_gpsdjson.c4
-rw-r--r--ntpd/refclock_jjy.c28
-rw-r--r--ntpd/refclock_palisade.c126
-rw-r--r--ntpd/refclock_parse.c13
48 files changed, 6489 insertions, 3574 deletions
diff --git a/ntpd/Makefile.in b/ntpd/Makefile.in
index ef7bcbb418ca..2d6ca42eff65 100644
--- a/ntpd/Makefile.in
+++ b/ntpd/Makefile.in
@@ -109,6 +109,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ltsugar.m4 \
$(top_srcdir)/sntp/m4/ltversion.m4 \
$(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_af_unspec.m4 \
$(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
$(top_srcdir)/sntp/m4/ntp_compiler.m4 \
$(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
@@ -1856,7 +1857,6 @@ check-libopts: ../sntp/libopts/libopts.la
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
check-libntp: ../libntp/libntp.a
- @echo stamp > $@
../libntp/libntp.a:
cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
diff --git a/ntpd/complete.conf.in b/ntpd/complete.conf.in
index 4c6c0459b5f5..2747098d7fcc 100644
--- a/ntpd/complete.conf.in
+++ b/ntpd/complete.conf.in
@@ -46,14 +46,14 @@ manycastserver 224.0.1.1 ff05::101
multicastclient 224.0.1.1 ff05::101
mru maxage 64 mindepth 600 initalloc 600 initmem 16 incalloc 99 incmem 4 maxdepth 1024 maxmem 4096
discard minimum 1 average 3 monitor 3000
-restrict default
-restrict default nomodify limited kod noserve nomrulist
-restrict source
-restrict source nomodify limited kod
-restrict trusted.host.name.example.com. nomodify
-restrict [fe80::1] mask [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]
-restrict 127.0.0.1 mask 255.255.255.255
-restrict ::1
+restrict default ippeerlimit -1
+restrict default ippeerlimit 0 nomodify limited kod noserve nomrulist
+restrict source ippeerlimit 1
+restrict source ippeerlimit 2 nomodify limited kod
+restrict trusted.host.name.example.com. ippeerlimit -1 nomodify
+restrict [fe80::1] mask [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff] ippeerlimit -1
+restrict 127.0.0.1 mask 255.255.255.255 ippeerlimit -1
+restrict ::1 ippeerlimit -1
interface drop ipv6
interface ignore ipv4
interface drop wildcard
diff --git a/ntpd/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi
index ff8dbdfd753e..7e8a4dc54031 100644
--- a/ntpd/invoke-ntp.conf.texi
+++ b/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed March 21, 2017 at 10:44:16 AM by AutoGen 5.18.5
+# It has been AutoGen-ed February 27, 2018 at 05:14:34 PM by AutoGen 5.18.5
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -1462,7 +1462,7 @@ The
@code{monitor}
subcommand specifies the probability of discard
for packets that overflow the rate-control window.
-@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@kbd{flag} @kbd{...}]}
+@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]}
The
@kbd{address}
argument expressed in
@@ -1486,6 +1486,15 @@ Note that text string
@code{default},
with no mask option, may
be used to indicate the default entry.
+The
+@code{ippeerlimit}
+directive limits the number of peer requests for each IP to
+@kbd{int},
+where a value of -1 means "unlimited", the current default.
+A value of 0 means "none".
+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.
In the current implementation,
@code{flag}
always
@@ -1536,6 +1545,18 @@ 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.
+@item @code{noepeer}
+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
+@file{ntp.keys}
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+@code{noepeer}
+to become the default in ntp-4.4.
@item @code{nomodify}
Deny
@code{ntpq(1ntpqmdoc)}
@@ -1553,10 +1574,10 @@ and
queries.
Time service is not affected.
@item @code{nopeer}
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+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.
It also includes
@code{pool}
associations, so if you want to use servers from a
@@ -1564,8 +1585,9 @@ associations, so if you want to use servers from a
directive and also want to use
@code{nopeer}
by default, you'll want a
-@code{restrict source ...} @code{line} @code{as} @code{well} @code{that} @code{does}
-@item not
+@code{restrict source ...}
+line as well that does
+@emph{not}
include the
@code{nopeer}
directive.
@@ -1937,9 +1959,10 @@ there is clear benefit to having the clients notice this change
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.
+@end table
@subsubsection Manycast Options
@table @asis
@item @code{tos} @code{[@code{ceiling} @kbd{ceiling} | @code{cohort} @code{@{} @code{0} | @code{1} @code{@}} | @code{floor} @kbd{floor} | @code{minclock} @kbd{minclock} | @code{minsane} @kbd{minsane}]}
@@ -2255,7 +2278,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-@file{/usr/share/doc/ntp}).
+@file{/usr/share/doc/ntp} @file{).}
@item @code{stratum} @kbd{int}
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
@@ -2516,6 +2539,69 @@ This option is useful for sites that run
@code{ntpd(1ntpdmdoc)}
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+@item @code{interface} @code{[@code{listen} | @code{ignore} | @code{drop}]} @code{[@code{all} | @code{ipv4} | @code{ipv6} | @code{wildcard} @kbd{name} | @kbd{address} @code{[@code{/} @kbd{prefixlen}]}]}
+The
+@code{interface}
+directive controls which network addresses
+@code{ntpd(1ntpdmdoc)}
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+@kbd{prefixlen}
+determines how many bits must match for this rule to apply.
+@code{ignore}
+prevents opening matching addresses,
+@code{drop}
+causes
+@code{ntpd(1ntpdmdoc)}
+to open the address and drop all received packets without examination.
+Multiple
+@code{interface}
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+@code{interface}
+directives are disabled if any
+@code{-I},
+@code{--interface},
+@code{-L},
+or
+@code{--novirtualips}
+command-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+@code{nic}
+directive is an alias for
+@code{interface}.
+@item @code{leapfile} @kbd{leapfile}
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+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}
+or
+@code{ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list}.
+The
+@code{leapfile}
+is scanned when
+@code{ntpd(1ntpdmdoc)}
+processes the
+@code{leapfile} @code{directive} @code{or} @code{when}
+@code{ntpd} @code{detects} @code{that} @code{the}
+@kbd{leapfile}
+has changed.
+@code{ntpd}
+checks once a day to see if the
+@kbd{leapfile}
+has changed.
+The
+@code{update-leap(1update_leapmdoc)}
+script can be run to see if the
+@kbd{leapfile}
+should be updated.
@item @code{leapsmearinterval} @kbd{seconds}
This EXPERIMENTAL option is only available if
@code{ntpd(1ntpdmdoc)}
@@ -2606,6 +2692,146 @@ facility.
This is the same operation as the
@code{-l}
command line option.
+@item @code{mru} @code{[@code{maxdepth} @kbd{count} | @code{maxmem} @kbd{kilobytes} | @code{mindepth} @kbd{count} | @code{maxage} @kbd{seconds} | @code{initialloc} @kbd{count} | @code{initmem} @kbd{kilobytes} | @code{incalloc} @kbd{count} | @code{incmem} @kbd{kilobytes}]}
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+@table @asis
+@item @code{maxdepth} @kbd{count}
+@item @code{maxmem} @kbd{kilobytes}
+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}
+entries or
+@code{incmem}
+kilobytes larger.
+As with all of the
+@code{mru}
+options offered in units of entries or kilobytes, if both
+@code{maxdepth}
+and
+@code{maxmem} @code{are} @code{used,} @code{the} @code{last} @code{one} @code{used} @code{controls.}
+The default is 1024 kilobytes.
+@item @code{mindepth} @kbd{count}
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+@code{mindepth}
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+@item @code{maxage} @kbd{seconds}
+Once the MRU list has
+@code{mindepth}
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+@code{maxage}
+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{moxmem}.
+The default is 64 seconds.
+@item @code{initalloc} @kbd{count}
+@item @code{initmem} @kbd{kilobytes}
+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.
+@item @code{incalloc} @kbd{count}
+@item @code{incmem} @kbd{kilobytes}
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+@end table
+@item @code{nonvolatile} @kbd{threshold}
+Specify the
+@kbd{threshold}
+delta in seconds before an hourly change to the
+@code{driftfile}
+(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}
+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.
+@item @code{phone} @kbd{dial} @kbd{...}
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+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.
+@item @code{reset} @code{[@code{allpeers}]} @code{[@code{auth}]} @code{[@code{ctl}]} @code{[@code{io}]} @code{[@code{mem}]} @code{[@code{sys}]} @code{[@code{timer}]}
+Reset one or more groups of counters maintained by
+@code{ntpd}
+and exposed by
+@code{ntpq}
+and
+@code{ntpdc}.
+@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
+@table @asis
+@item @code{memlock} @kbd{Nmegabytes}
+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}
+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".
+@item @code{stacksize} @kbd{N4kPages}
+Specifies the maximum size of the process stack on systems with the
+@code{mlockall()}
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+@item @code{filenum} @kbd{Nfiledescriptors}
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+@end table
+@item @code{saveconfigdir} @kbd{directory_path}
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+@code{saveconfig}
+command.
+If
+@code{saveconfigdir}
+does not appear in the configuration file,
+@code{saveconfig}
+requests are rejected by
+@code{ntpd}.
+@item @code{saveconfig} @kbd{filename}
+Write the current configuration, including any runtime
+modifications given with
+@code{:config}
+or
+@code{config-from-file}
+to the
+@code{ntpd}
+host's
+@kbd{filename}
+in the
+@code{saveconfigdir}.
+This command will be rejected unless the
+@code{saveconfigdir}
+directive appears in
+.Cm ntpd 's
+configuration file.
+@kbd{filename}
+can use
+@code{strftime(3)}
+format directives to substitute the current date and time,
+for example,
+@code{saveconfig\ ntp-%Y%m%d-%H%M%S.conf}.
+The filename used is stored in the system variable
+@code{savedconfig}.
+Authentication is required.
@item @code{setvar} @kbd{variable} @code{[@code{default}]}
This command adds an additional system variable.
These
@@ -2638,6 +2864,10 @@ holds
the names of all peer variables and the
@code{clock_var_list}
holds the names of the reference clock variables.
+@item @code{sysinfo}
+Display operational summary.
+@item @code{sysstats}
+Show statistics counters maintained in the protocol module.
@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{step} | @code{stepback} @kbd{stepback} | @code{stepfwd} @kbd{stepfwd} | @code{stepout} @kbd{stepout}]}
This command can be used to alter several system variables in
very exceptional circumstances.
@@ -2715,27 +2945,18 @@ be set to any positive number in seconds.
If set to zero, the stepout
pulses will not be suppressed.
@end table
-@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
-@table @asis
-@item @code{memlock} @kbd{Nmegabytes}
-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}
-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".
-@item @code{stacksize} @kbd{N4kPages}
-Specifies the maximum size of the process stack on systems with the
-@code{mlockall()}
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-@item @code{filenum} @kbd{Nfiledescriptors}
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-@end table
+@item @code{writevar} @kbd{assocID\ name} @kbd{=} @kbd{value} @kbd{[,...]}
+Write (create or update) the specified variables.
+If the
+@code{assocID}
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+@code{assocID}
+is required, as the same name can occur in both name spaces.
@item @code{trap} @kbd{host_address} @code{[@code{port} @kbd{port_number}]} @code{[@code{interface} @kbd{interface_address}]}
This command configures a trap receiver at the given host
address and port number for sending messages with the specified
@@ -2747,6 +2968,13 @@ message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+@item @code{ttl} @kbd{hop} @kbd{...}
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+@code{manycast}
+mode these values are used in-turn in an expanding-ring search.
+The default is eight multiples of 32 starting at 31.
The trap receiver will generally log event messages and other
information from the server in a log file.
diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi
index f1b1f32027d4..d729fc075a28 100644
--- a/ntpd/invoke-ntp.keys.texi
+++ b/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed March 21, 2017 at 10:31:04 AM by AutoGen 5.18.5
+# It has been AutoGen-ed February 27, 2018 at 05:14:37 PM by AutoGen 5.18.5
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
@@ -45,16 +45,24 @@ where
is a positive integer (between 1 and 65534),
@kbd{type}
is the message digest algorithm,
-and
@kbd{key}
is the key itself, and
@kbd{opt_IP_list}
is an optional comma-separated list of IPs
+where the
+@kbd{keyno}
+should be trusted.
that are allowed to serve time.
+Each IP in
+@kbd{opt_IP_list}
+may contain an optional
+@code{/subnetbits}
+specification which identifies the number of bits for
+the desired subnet of trust.
If
@kbd{opt_IP_list}
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
The
diff --git a/ntpd/invoke-ntpd.texi b/ntpd/invoke-ntpd.texi
index 0b881db05b63..28f132df4d5a 100644
--- a/ntpd/invoke-ntpd.texi
+++ b/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed March 21, 2017 at 10:44:20 AM by AutoGen 5.18.5
+# It has been AutoGen-ed February 27, 2018 at 05:14:39 PM 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.8p10-beta
+ntpd - NTP daemon program - Ver. 4.2.8p11
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
diff --git a/ntpd/keyword-gen-utd b/ntpd/keyword-gen-utd
index 683453dc6440..9b836ba4dc9b 100644
--- a/ntpd/keyword-gen-utd
+++ b/ntpd/keyword-gen-utd
@@ -1 +1 @@
- * Generated 2016-11-09 11:39:28 UTC diff_ignore_line
+ * Generated 2018-01-14 03:53:33 UTC diff_ignore_line
diff --git a/ntpd/keyword-gen.c b/ntpd/keyword-gen.c
index c9d30bece226..e07548a1e4c5 100644
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -153,11 +153,15 @@ struct key_tok ntp_keywords[] = {
{ "orphan", T_Orphan, FOLLBY_TOKEN },
{ "orphanwait", T_Orphanwait, FOLLBY_TOKEN },
{ "nonvolatile", T_Nonvolatile, FOLLBY_TOKEN },
+{ "basedate", T_Basedate, FOLLBY_STRING },
/* access_control_flag */
{ "default", T_Default, FOLLBY_TOKEN },
{ "source", T_Source, FOLLBY_TOKEN },
+{ "epeer", T_Epeer, FOLLBY_TOKEN },
+{ "noepeer", T_Noepeer, FOLLBY_TOKEN },
{ "flake", T_Flake, FOLLBY_TOKEN },
{ "ignore", T_Ignore, FOLLBY_TOKEN },
+{ "ippeerlimit", T_Ippeerlimit, FOLLBY_TOKEN },
{ "limited", T_Limited, FOLLBY_TOKEN },
{ "mssntp", T_Mssntp, FOLLBY_TOKEN },
{ "kod", T_Kod, FOLLBY_TOKEN },
diff --git a/ntpd/ntp.conf.5man b/ntpd/ntp.conf.5man
index 846465add654..1a506336a71d 100644
--- a/ntpd/ntp.conf.5man
+++ b/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "21 Mar 2017" "4.2.8p10-beta" "File Formats"
+.TH ntp.conf 5man "27 Feb 2018" "4.2.8p11" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-UAaqtC/ag-6AaisC)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LkaqTP/ag-XkaiSP)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:30:48 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:22 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1665,7 +1665,7 @@ The
subcommand specifies the probability of discard
for packets that overflow the rate-control window.
.TP 7
-.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
\f\*[I-Font]address\f[]
argument expressed in
@@ -1689,6 +1689,15 @@ Note that text string
\f\*[B-Font]default\f[],
with no mask option, may
be used to indicate the default entry.
+The
+\f\*[B-Font]ippeerlimit\f[]
+directive limits the number of peer requests for each IP to
+\f\*[I-Font]int\f[],
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+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.
In the current implementation,
\f\*[B-Font]flag\f[]
always
@@ -1744,6 +1753,19 @@ This flag
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
.TP 7
+.NOP \f\*[B-Font]noepeer\f[]
+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
+\fIntp.keys\f[]
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+\f\*[B-Font]noepeer\f[]
+to become the default in ntp-4.4.
+.TP 7
.NOP \f\*[B-Font]nomodify\f[]
Deny
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
@@ -1763,10 +1785,10 @@ queries.
Time service is not affected.
.TP 7
.NOP \f\*[B-Font]nopeer\f[]
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+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.
It also includes
\f\*[B-Font]pool\f[]
associations, so if you want to use servers from a
@@ -1774,9 +1796,9 @@ associations, so if you want to use servers from a
directive and also want to use
\f\*[B-Font]nopeer\f[]
by default, you'll want a
-\f\*[B-Font]restrict source ...\f[] \f\*[B-Font]line\f[] \f\*[B-Font]as\f[] \f\*[B-Font]well\f[] \f\*[B-Font]that\f[] \f\*[B-Font]does\f[]
-.TP 7
-.NOP not
+\f\*[B-Font]restrict source ...\f[]
+line as well that does
+\fInot\f[]
include the
\f\*[B-Font]nopeer\f[]
directive.
@@ -2186,11 +2208,11 @@ there is clear benefit to having the clients notice this change
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.
+.PP
.SS Manycast Options
-.RS
.TP 7
.NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[] | \f\*[B-Font]cohort\f[] { \f\*[B-Font]0\f[] | \f\*[B-Font]1\f[] } | \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[] | \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[] | \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]]
This command affects the clock selection and clustering
@@ -2260,7 +2282,7 @@ In manycast mode these values are used in turn
in an expanding-ring search.
The default is eight
multiples of 32 starting at 31.
-.RE
+.PP
.SH Reference Clock Support
The NTP Version 4 daemon supports some three dozen different radio,
satellite and modem reference clocks plus a special pseudo-clock
@@ -2427,7 +2449,6 @@ option is used for this purpose.
Except where noted,
these options apply to all clock drivers.
.SS Reference Clock Commands
-.RS
.TP 7
.NOP \f\*[B-Font]server\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]]
This command can be used to configure reference clocks in
@@ -2528,7 +2549,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-\fI/usr/share/doc/ntp\f[]).
+\fI/usr/share/doc/ntp\f[] \fI).\f[]
.TP 7
.NOP \f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]
Specifies the stratum number assigned to the driver, an integer
@@ -2576,9 +2597,8 @@ Further information on the
command can be found in
\fIMonitoring\f[] \fIOptions\f[].
.RE
-.RE
+.PP
.SH Miscellaneous Options
-.RS
.TP 7
.NOP \f\*[B-Font]broadcastdelay\f[] \f\*[I-Font]seconds\f[]
The broadcast and multicast modes require a special calibration
@@ -2817,6 +2837,71 @@ This option is useful for sites that run
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
.TP 7
+.NOP \f\*[B-Font]interface\f[] [\f\*[B-Font]listen\f[] | \f\*[B-Font]ignore\f[] | \f\*[B-Font]drop\f[]] [\f\*[B-Font]all\f[] | \f\*[B-Font]ipv4\f[] | \f\*[B-Font]ipv6\f[] | \f\*[B-Font]wildcard\f[] \f\*[I-Font]name\f[] | \f\*[I-Font]address\f[] [\f\*[B-Font]/\f[] \f\*[I-Font]prefixlen\f[]]]
+The
+\f\*[B-Font]interface\f[]
+directive controls which network addresses
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+\f\*[I-Font]prefixlen\f[]
+determines how many bits must match for this rule to apply.
+\f\*[B-Font]ignore\f[]
+prevents opening matching addresses,
+\f\*[B-Font]drop\f[]
+causes
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+to open the address and drop all received packets without examination.
+Multiple
+\f\*[B-Font]interface\f[]
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+\f\*[B-Font]interface\f[]
+directives are disabled if any
+\f\*[B-Font]\-I\f[],
+\f\*[B-Font]\-\-interface\f[],
+\f\*[B-Font]\-L\f[],
+or
+\f\*[B-Font]\-\-novirtualips\f[]
+command-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+\f\*[B-Font]nic\f[]
+directive is an alias for
+\f\*[B-Font]interface\f[].
+.TP 7
+.NOP \f\*[B-Font]leapfile\f[] \f\*[I-Font]leapfile\f[]
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+\f[C]https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[]
+or
+\f[C]ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[].
+The
+\f\*[B-Font]leapfile\f[]
+is scanned when
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+processes the
+\f\*[B-Font]leapfile\f[] \f\*[B-Font]directive\f[] \f\*[B-Font]or\f[] \f\*[B-Font]when\f[]
+\f\*[B-Font]ntpd\f[] \f\*[B-Font]detects\f[] \f\*[B-Font]that\f[] \f\*[B-Font]the\f[]
+\f\*[I-Font]leapfile\f[]
+has changed.
+\f\*[B-Font]ntpd\f[]
+checks once a day to see if the
+\f\*[I-Font]leapfile\f[]
+has changed.
+The
+\fCupdate-leap\f[]\fR(1update_leapmdoc)\f[]
+script can be run to see if the
+\f\*[I-Font]leapfile\f[]
+should be updated.
+.TP 7
.NOP \f\*[B-Font]leapsmearinterval\f[] \f\*[I-Font]seconds\f[]
This EXPERIMENTAL option is only available if
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
@@ -2922,6 +3007,164 @@ This is the same operation as the
\f\*[B-Font]\-l\f[]
command line option.
.TP 7
+.NOP \f\*[B-Font]mru\f[] [\f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[] | \f\*[B-Font]initialloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]]
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.RS
+.TP 7
+.NOP \f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[]
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+\f\*[B-Font]incalloc\f[]
+entries or
+\f\*[B-Font]incmem\f[]
+kilobytes larger.
+As with all of the
+\f\*[B-Font]mru\f[]
+options offered in units of entries or kilobytes, if both
+\f\*[B-Font]maxdepth\f[]
+and
+\f\*[B-Font]maxmem\f[] \f\*[B-Font]are\f[] \f\*[B-Font]used,\f[] \f\*[B-Font]the\f[] \f\*[B-Font]last\f[] \f\*[B-Font]one\f[] \f\*[B-Font]used\f[] \f\*[B-Font]controls.\f[]
+The default is 1024 kilobytes.
+.TP 7
+.NOP \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[]
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+\f\*[B-Font]mindepth\f[]
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.TP 7
+.NOP \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[]
+Once the MRU list has
+\f\*[B-Font]mindepth\f[]
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+\f\*[B-Font]maxage\f[]
+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
+\f\*[B-Font]maxdepth\f[] \f\*[B-Font]/\f[] \f\*[B-Font]moxmem\f[].
+The default is 64 seconds.
+.TP 7
+.NOP \f\*[B-Font]initalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.RE
+.TP 7
+.NOP \f\*[B-Font]nonvolatile\f[] \f\*[I-Font]threshold\f[]
+Specify the
+\f\*[I-Font]threshold\f[]
+delta in seconds before an hourly change to the
+\f\*[B-Font]driftfile\f[]
+(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
+\f\*[B-Font]threshold\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]phone\f[] \f\*[I-Font]dial\f[] \f\*[I-Font]...\f[]
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+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.
+.TP 7
+.NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
+Reset one or more groups of counters maintained by
+\f\*[B-Font]ntpd\f[]
+and exposed by
+\f\*[B-Font]ntpq\f[]
+and
+\f\*[B-Font]ntpdc\f[].
+.TP 7
+.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
+.RS
+.TP 7
+.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
+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
+\f\*[B-Font]\-i\f[]
+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".
+.TP 7
+.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
+Specifies the maximum size of the process stack on systems with the
+\fBmlockall\f[]\fR()\f[]
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.TP 7
+.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.RE
+.TP 7
+.NOP \f\*[B-Font]saveconfigdir\f[] \f\*[I-Font]directory_path\f[]
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+\f\*[B-Font]saveconfig\f[]
+command.
+If
+\f\*[B-Font]saveconfigdir\f[]
+does not appear in the configuration file,
+\f\*[B-Font]saveconfig\f[]
+requests are rejected by
+\f\*[B-Font]ntpd\f[].
+.TP 7
+.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
+Write the current configuration, including any runtime
+modifications given with
+\f\*[B-Font]:config\f[]
+or
+\f\*[B-Font]config-from-file\f[]
+to the
+\f\*[B-Font]ntpd\f[]
+host's
+\f\*[I-Font]filename\f[]
+in the
+\f\*[B-Font]saveconfigdir\f[].
+This command will be rejected unless the
+\f\*[B-Font]saveconfigdir\f[]
+directive appears in
+.Cm ntpd 's
+configuration file.
+\f\*[I-Font]filename\f[]
+can use
+\fCstrftime\f[]\fR(3)\f[]
+format directives to substitute the current date and time,
+for example,
+\f\*[B-Font]saveconfig\ ntp-%Y%m%d-%H%M%S.conf\f[].
+The filename used is stored in the system variable
+\f\*[B-Font]savedconfig\f[].
+Authentication is required.
+.TP 7
.NOP \f\*[B-Font]setvar\f[] \f\*[I-Font]variable\f[] [\f\*[B-Font]default\f[]]
This command adds an additional system variable.
These
@@ -2955,6 +3198,12 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
+.NOP \f\*[B-Font]sysinfo\f[]
+Display operational summary.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Show statistics counters maintained in the protocol module.
+.TP 7
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
@@ -3044,30 +3293,18 @@ If set to zero, the stepout
pulses will not be suppressed.
.RE
.TP 7
-.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
-.RS
-.TP 7
-.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
-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
-\f\*[B-Font]\-i\f[]
-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".
-.TP 7
-.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
-Specifies the maximum size of the process stack on systems with the
-\fBmlockall\f[]\fR()\f[]
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.TP 7
-.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.RE
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\ name\f[] \f\*[I-Font]=\f[] \f\*[I-Font]value\f[] \f\*[I-Font][,...]\f[]
+Write (create or update) the specified variables.
+If the
+\f\*[B-Font]assocID\f[]
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+\f\*[B-Font]assocID\f[]
+is required, as the same name can occur in both name spaces.
.TP 7
.NOP \f\*[B-Font]trap\f[] \f\*[I-Font]host_address\f[] [\f\*[B-Font]port\f[] \f\*[I-Font]port_number\f[]] [\f\*[B-Font]interface\f[] \f\*[I-Font]interface_address\f[]]
This command configures a trap receiver at the given host
@@ -3080,6 +3317,14 @@ message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+\f\*[B-Font]manycast\f[]
+mode these values are used in-turn in an expanding-ring search.
+The default is eight multiples of 32 starting at 31.
.sp \n(Ppu
.ne 2
@@ -3097,9 +3342,8 @@ In manycast mode these values are used in turn in
an expanding-ring search.
The default is eight multiples of 32 starting at
31.
-.RE
+.PP
.SH "OPTIONS"
-.RS
.TP
.NOP \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
@@ -3111,7 +3355,7 @@ Pass the extended usage information through a pager.
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
-.RE
+.PP
.SH "OPTION PRESETS"
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from environment variables named:
@@ -3122,7 +3366,6 @@ by loading values from environment variables named:
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH FILES
-.RS
.TP 15
.NOP \fI/etc/ntp.conf\f[]
the default name of the configuration file
@@ -3146,10 +3389,9 @@ RSA public key
.TP 15
.NOP \fIntp_dh\f[]
Diffie-Hellman agreement parameters
-.RE
+.PP
.SH "EXIT STATUS"
One of the following exit values will be returned:
-.RS
.TP
.NOP 0 " (EXIT_SUCCESS)"
Successful program execution.
@@ -3160,7 +3402,7 @@ The operation failed or the command syntax was not valid.
.NOP 70 " (EX_SOFTWARE)"
libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
-.RE
+.PP
.SH "SEE ALSO"
\fCntpd\f[]\fR(1ntpdmdoc)\f[],
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[],
diff --git a/ntpd/ntp.conf.5mdoc b/ntpd/ntp.conf.5mdoc
index 46e8cab331d2..7286c811c2ce 100644
--- a/ntpd/ntp.conf.5mdoc
+++ b/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:31:09 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:42 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1532,6 +1532,7 @@ subcommand specifies the probability of discard
for packets that overflow the rate\-control window.
.It Xo Ic restrict address
.Op Cm mask Ar mask
+.Op Cm ippeerlimit Ar int
.Op Ar flag ...
.Xc
The
@@ -1557,6 +1558,15 @@ Note that text string
.Cm default ,
with no mask option, may
be used to indicate the default entry.
+The
+.Cm ippeerlimit
+directive limits the number of peer requests for each IP to
+.Ar int ,
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+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.
In the current implementation,
.Cm flag
always
@@ -1607,6 +1617,18 @@ 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.
+.It Cm noepeer
+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
+.Pa ntp.keys
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+.Cm noepeer
+to become the default in ntp\-4.4.
.It Cm nomodify
Deny
.Xr ntpq 1ntpqmdoc
@@ -1624,10 +1646,10 @@ and
queries.
Time service is not affected.
.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+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.
It also includes
.Cm pool
associations, so if you want to use servers from a
@@ -1635,8 +1657,9 @@ associations, so if you want to use servers from a
directive and also want to use
.Cm nopeer
by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
+.Cm "restrict source ..."
+line as well that does
+.Em not
include the
.Cm nopeer
directive.
@@ -2011,9 +2034,10 @@ there is clear benefit to having the clients notice this change
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.
+.El
.Ss Manycast Options
.Bl -tag -width indent
.It Xo Ic tos
@@ -2359,7 +2383,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-.Pa /usr/share/doc/ntp ) .
+.Pa /usr/share/doc/ntp ).
.It Cm stratum Ar int
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
@@ -2637,6 +2661,79 @@ This option is useful for sites that run
.Xr ntpd 1ntpdmdoc
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+.It Xo Ic interface
+.Oo
+.Cm listen | Cm ignore | Cm drop
+.Oc
+.Oo
+.Cm all | Cm ipv4 | Cm ipv6 | Cm wildcard
+.Ar name | Ar address
+.Oo Cm / Ar prefixlen
+.Oc
+.Oc
+.Xc
+The
+.Cm interface
+directive controls which network addresses
+.Xr ntpd 1ntpdmdoc
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+.Ar prefixlen
+determines how many bits must match for this rule to apply.
+.Cm ignore
+prevents opening matching addresses,
+.Cm drop
+causes
+.Xr ntpd 1ntpdmdoc
+to open the address and drop all received packets without examination.
+Multiple
+.Cm interface
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+.Cm interface
+directives are disabled if any
+.Fl I ,
+.Fl \-interface ,
+.Fl L ,
+or
+.Fl \-novirtualips
+command\-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+.Cm nic
+directive is an alias for
+.Cm interface .
+.It Ic leapfile Ar leapfile
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+.Li https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list
+or
+.Li ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list .
+The
+.Cm leapfile
+is scanned when
+.Xr ntpd 1ntpdmdoc
+processes the
+.Cm leapfile directive or when
+.Cm ntpd detects that the
+.Ar leapfile
+has changed.
+.Cm ntpd
+checks once a day to see if the
+.Ar leapfile
+has changed.
+The
+.Xr update\-leap 1update_leapmdoc
+script can be run to see if the
+.Ar leapfile
+should be updated.
.It Ic leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd 1ntpdmdoc
@@ -2741,6 +2838,181 @@ facility.
This is the same operation as the
.Fl l
command line option.
+.It Xo Ic mru
+.Oo
+.Cm maxdepth Ar count | Cm maxmem Ar kilobytes |
+.Cm mindepth Ar count | Cm maxage Ar seconds |
+.Cm initialloc Ar count | Cm initmem Ar kilobytes |
+.Cm incalloc Ar count | Cm incmem Ar kilobytes
+.Oc
+.Xc
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.Bl -tag -width indent
+.It Ic maxdepth Ar count
+.It Ic maxmem Ar kilobytes
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+.Cm incalloc
+entries or
+.Cm incmem
+kilobytes larger.
+As with all of the
+.Cm mru
+options offered in units of entries or kilobytes, if both
+.Cm maxdepth
+and
+.Cm maxmem are used, the last one used controls.
+The default is 1024 kilobytes.
+.It Cm mindepth Ar count
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+.Cm mindepth
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.It Cm maxage Ar seconds
+Once the MRU list has
+.Cm mindepth
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+.Cm maxage
+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
+.Cm maxdepth / moxmem .
+The default is 64 seconds.
+.It Cm initalloc Ar count
+.It Cm initmem Ar kilobytes
+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.
+.It Cm incalloc Ar count
+.It Cm incmem Ar kilobytes
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.El
+.It Ic nonvolatile Ar threshold
+Specify the
+.Ar threshold
+delta in seconds before an hourly change to the
+.Cm driftfile
+(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
+.Cm threshold
+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.
+.It Ic phone Ar dial ...
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+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.
+.It Xo Ic reset
+.Oo
+.Ic allpeers
+.Oc
+.Oo
+.Ic auth
+.Oc
+.Oo
+.Ic ctl
+.Oc
+.Oo
+.Ic io
+.Oc
+.Oo
+.Ic mem
+.Oc
+.Oo
+.Ic sys
+.Oc
+.Oo
+.Ic timer
+.Oc
+.Xc
+Reset one or more groups of counters maintained by
+.Cm ntpd
+and exposed by
+.Cm ntpq
+and
+.Cm ntpdc .
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+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
+.Fl i
+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".
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.El
+.It Ic saveconfigdir Ar directory_path
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+.Cm saveconfig
+command.
+If
+.Cm saveconfigdir
+does not appear in the configuration file,
+.Cm saveconfig
+requests are rejected by
+.Cm ntpd .
+.It Ic saveconfig Ar filename
+Write the current configuration, including any runtime
+modifications given with
+.Cm :config
+or
+.Cm config\-from\-file
+to the
+.Cm ntpd
+host's
+.Ar filename
+in the
+.Cm saveconfigdir .
+This command will be rejected unless the
+.Cm saveconfigdir
+directive appears in
+.Cm ntpd 's
+configuration file.
+.Ar filename
+can use
+.Xr strftime 3
+format directives to substitute the current date and time,
+for example,
+.Cm saveconfig\ ntp\-%Y%m%d\-%H%M%S.conf .
+The filename used is stored in the system variable
+.Cm savedconfig .
+Authentication is required.
.It Ic setvar Ar variable Op Cm default
This command adds an additional system variable.
These
@@ -2779,6 +3051,10 @@ holds
the names of all peer variables and the
.Va clock_var_list
holds the names of the reference clock variables.
+.It Cm sysinfo
+Display operational summary.
+.It Cm sysstats
+Show statistics counters maintained in the protocol module.
.It Xo Ic tinker
.Oo
.Cm allan Ar allan |
@@ -2868,33 +3144,18 @@ be set to any positive number in seconds.
If set to zero, the stepout
pulses will not be suppressed.
.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-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
-.Fl i
-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".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
+.It Cm writevar Ar assocID\ name = value [,...]
+Write (create or update) the specified variables.
+If the
+.Cm assocID
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+.Cm assocID
+is required, as the same name can occur in both name spaces.
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number
.Op Cm interface Ar interface_address
@@ -2909,6 +3170,13 @@ message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.It Cm ttl Ar hop ...
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+.Cm manycast
+mode these values are used in\-turn in an expanding\-ring search.
+The default is eight multiples of 32 starting at 31.
.Pp
The trap receiver will generally log event messages and other
information from the server in a log file.
diff --git a/ntpd/ntp.conf.def b/ntpd/ntp.conf.def
index 5ae8c382bd11..4af7742168ef 100644
--- a/ntpd/ntp.conf.def
+++ b/ntpd/ntp.conf.def
@@ -1534,6 +1534,7 @@ subcommand specifies the probability of discard
for packets that overflow the rate-control window.
.It Xo Ic restrict address
.Op Cm mask Ar mask
+.Op Cm ippeerlimit Ar int
.Op Ar flag ...
.Xc
The
@@ -1559,6 +1560,15 @@ Note that text string
.Cm default ,
with no mask option, may
be used to indicate the default entry.
+The
+.Cm ippeerlimit
+directive limits the number of peer requests for each IP to
+.Ar int ,
+where a value of -1 means "unlimited", the current default.
+A value of 0 means "none".
+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.
In the current implementation,
.Cm flag
always
@@ -1609,6 +1619,18 @@ 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.
+.It Cm noepeer
+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
+.Pa ntp.keys
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+.Cm noepeer
+to become the default in ntp-4.4.
.It Cm nomodify
Deny
.Xr ntpq 1ntpqmdoc
@@ -1626,10 +1648,10 @@ and
queries.
Time service is not affected.
.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+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.
It also includes
.Cm pool
associations, so if you want to use servers from a
@@ -1637,8 +1659,9 @@ associations, so if you want to use servers from a
directive and also want to use
.Cm nopeer
by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
+.Cm "restrict source ..."
+line as well that does
+.Em not
include the
.Cm nopeer
directive.
@@ -2013,9 +2036,10 @@ there is clear benefit to having the clients notice this change
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.
+.El
.Ss Manycast Options
.Bl -tag -width indent
.It Xo Ic tos
@@ -2361,7 +2385,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-.Pa /usr/share/doc/ntp ) .
+.Pa /usr/share/doc/ntp ).
.It Cm stratum Ar int
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
@@ -2639,6 +2663,79 @@ This option is useful for sites that run
.Xr ntpd 1ntpdmdoc
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+.It Xo Ic interface
+.Oo
+.Cm listen | Cm ignore | Cm drop
+.Oc
+.Oo
+.Cm all | Cm ipv4 | Cm ipv6 | Cm wildcard
+.Ar name | Ar address
+.Oo Cm / Ar prefixlen
+.Oc
+.Oc
+.Xc
+The
+.Cm interface
+directive controls which network addresses
+.Xr ntpd 1ntpdmdoc
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+.Ar prefixlen
+determines how many bits must match for this rule to apply.
+.Cm ignore
+prevents opening matching addresses,
+.Cm drop
+causes
+.Xr ntpd 1ntpdmdoc
+to open the address and drop all received packets without examination.
+Multiple
+.Cm interface
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+.Cm interface
+directives are disabled if any
+.Fl I ,
+.Fl -interface ,
+.Fl L ,
+or
+.Fl -novirtualips
+command-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+.Cm nic
+directive is an alias for
+.Cm interface .
+.It Ic leapfile Ar leapfile
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+.Li https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
+or
+.Li ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list .
+The
+.Cm leapfile
+is scanned when
+.Xr ntpd 1ntpdmdoc
+processes the
+.Cm leapfile directive or when
+.Cm ntpd detects that the
+.Ar leapfile
+has changed.
+.Cm ntpd
+checks once a day to see if the
+.Ar leapfile
+has changed.
+The
+.Xr update-leap 1update_leapmdoc
+script can be run to see if the
+.Ar leapfile
+should be updated.
.It Ic leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd 1ntpdmdoc
@@ -2743,6 +2840,181 @@ facility.
This is the same operation as the
.Fl l
command line option.
+.It Xo Ic mru
+.Oo
+.Cm maxdepth Ar count | Cm maxmem Ar kilobytes |
+.Cm mindepth Ar count | Cm maxage Ar seconds |
+.Cm initialloc Ar count | Cm initmem Ar kilobytes |
+.Cm incalloc Ar count | Cm incmem Ar kilobytes
+.Oc
+.Xc
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.Bl -tag -width indent
+.It Ic maxdepth Ar count
+.It Ic maxmem Ar kilobytes
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+.Cm incalloc
+entries or
+.Cm incmem
+kilobytes larger.
+As with all of the
+.Cm mru
+options offered in units of entries or kilobytes, if both
+.Cm maxdepth
+and
+.Cm maxmem are used, the last one used controls.
+The default is 1024 kilobytes.
+.It Cm mindepth Ar count
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+.Cm mindepth
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.It Cm maxage Ar seconds
+Once the MRU list has
+.Cm mindepth
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+.Cm maxage
+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
+.Cm maxdepth / moxmem .
+The default is 64 seconds.
+.It Cm initalloc Ar count
+.It Cm initmem Ar kilobytes
+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.
+.It Cm incalloc Ar count
+.It Cm incmem Ar kilobytes
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.El
+.It Ic nonvolatile Ar threshold
+Specify the
+.Ar threshold
+delta in seconds before an hourly change to the
+.Cm driftfile
+(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
+.Cm threshold
+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.
+.It Ic phone Ar dial ...
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+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.
+.It Xo Ic reset
+.Oo
+.Ic allpeers
+.Oc
+.Oo
+.Ic auth
+.Oc
+.Oo
+.Ic ctl
+.Oc
+.Oo
+.Ic io
+.Oc
+.Oo
+.Ic mem
+.Oc
+.Oo
+.Ic sys
+.Oc
+.Oo
+.Ic timer
+.Oc
+.Xc
+Reset one or more groups of counters maintained by
+.Cm ntpd
+and exposed by
+.Cm ntpq
+and
+.Cm ntpdc .
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+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
+.Fl i
+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".
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.El
+.It Ic saveconfigdir Ar directory_path
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+.Cm saveconfig
+command.
+If
+.Cm saveconfigdir
+does not appear in the configuration file,
+.Cm saveconfig
+requests are rejected by
+.Cm ntpd .
+.It Ic saveconfig Ar filename
+Write the current configuration, including any runtime
+modifications given with
+.Cm :config
+or
+.Cm config-from-file
+to the
+.Cm ntpd
+host's
+.Ar filename
+in the
+.Cm saveconfigdir .
+This command will be rejected unless the
+.Cm saveconfigdir
+directive appears in
+.Cm ntpd 's
+configuration file.
+.Ar filename
+can use
+.Xr strftime 3
+format directives to substitute the current date and time,
+for example,
+.Cm saveconfig\ ntp-%Y%m%d-%H%M%S.conf .
+The filename used is stored in the system variable
+.Cm savedconfig .
+Authentication is required.
.It Ic setvar Ar variable Op Cm default
This command adds an additional system variable.
These
@@ -2781,6 +3053,10 @@ holds
the names of all peer variables and the
.Va clock_var_list
holds the names of the reference clock variables.
+.It Cm sysinfo
+Display operational summary.
+.It Cm sysstats
+Show statistics counters maintained in the protocol module.
.It Xo Ic tinker
.Oo
.Cm allan Ar allan |
@@ -2870,33 +3146,18 @@ be set to any positive number in seconds.
If set to zero, the stepout
pulses will not be suppressed.
.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-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
-.Fl i
-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".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
+.It Cm writevar Ar assocID\ name = value [,...]
+Write (create or update) the specified variables.
+If the
+.Cm assocID
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+.Cm assocID
+is required, as the same name can occur in both name spaces.
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number
.Op Cm interface Ar interface_address
@@ -2911,6 +3172,13 @@ message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.It Cm ttl Ar hop ...
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+.Cm manycast
+mode these values are used in-turn in an expanding-ring search.
+The default is eight multiples of 32 starting at 31.
.Pp
The trap receiver will generally log event messages and other
information from the server in a log file.
diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html
index 5718a018a815..2d477e2f33d5 100644
--- a/ntpd/ntp.conf.html
+++ b/ntpd/ntp.conf.html
@@ -33,9 +33,9 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the configuration file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.8p10 of <code>ntp.conf</code>.
+ <p>This document applies to version 4.2.8p11 of <code>ntp.conf</code>.
- <div class="shortcontents">
+ <div class="shortcontents">
<h2>Short Contents</h2>
<ul>
<a href="#Top">NTP's Configuration File User Manual</a>
@@ -1467,7 +1467,7 @@ 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>[</code><kbd>flag</kbd> <kbd>...</kbd><code>]</code><dd>The
+<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
<kbd>address</kbd>
argument expressed in
dotted-quad form is the address of a host or network.
@@ -1490,6 +1490,15 @@ Note that text string
<code>default</code>,
with no mask option, may
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".
+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.
In the current implementation,
<code>flag</code>
always
@@ -1536,6 +1545,17 @@ 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.
+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.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+<code>noepeer</code>
+to become the default in ntp-4.4.
<br><dt><code>nomodify</code><dd>Deny
<code>ntpq(1ntpqmdoc)</code>
and
@@ -1550,10 +1570,10 @@ and
<code>ntpdc(1ntpdcmdoc)</code>
queries.
Time service is not affected.
-<br><dt><code>nopeer</code><dd>Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+<br><dt><code>nopeer</code><dd>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.
It also includes
<code>pool</code>
associations, so if you want to use servers from a
@@ -1561,8 +1581,10 @@ associations, so if you want to use servers from a
directive and also want to use
<code>nopeer</code>
by default, you'll want a
-<code>restrict source ...</code> <code>line</code> <code>as</code> <code>well</code> <code>that</code> <code>does</code>
-<br><dt>not<dd>include the
+<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
@@ -1938,13 +1960,14 @@ there is clear benefit to having the clients notice this change
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.
+</dl>
<h5 class="subsubsection">Manycast Options</h5>
- <dl>
+ <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.
It can be used to select the quality and
@@ -1952,7 +1975,7 @@ quantity of peers used to synchronize the system clock
and is most useful in manycast mode.
The variables operate
as follows:
- <dl>
+ <dl>
<dt><code>ceiling</code> <kbd>ceiling</kbd><dd>Peers with strata above
<code>ceiling</code>
will be discarded if there are at least
@@ -1994,14 +2017,14 @@ Byzantine agreement,
should be at least 4 in order to detect and discard
a single falseticker.
</dl>
- <br><dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd><dd>This command specifies a list of TTL values in increasing
+ <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.
In manycast mode these values are used in turn
in an expanding-ring search.
The default is eight
multiples of 32 starting at 31.
</dl>
- <div class="node">
+<div class="node">
<p><hr>
<a name="Reference-Clock-Support"></a>
<br>
@@ -2009,7 +2032,7 @@ multiples of 32 starting at 31.
<h4 class="subsection">Reference Clock Support</h4>
- <p>The NTP Version 4 daemon supports some three dozen different radio,
+<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.
Detailed descriptions of individual device drivers and options can
@@ -2046,7 +2069,7 @@ page
provided in
<span class="file">/usr/share/doc/ntp</span>).
- <p>A reference clock will generally (though not always) be a radio
+ <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.
@@ -2062,7 +2085,7 @@ 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>For the purposes of configuration,
<code>ntpd(1ntpdmdoc)</code>
treats
reference clocks in a manner analogous to normal NTP peers as much
@@ -2083,7 +2106,7 @@ 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>The
<code>server</code>
command is used to configure a reference
clock, where the
@@ -2121,7 +2144,7 @@ meaning only for selected clock drivers.
See the individual clock
driver document pages for additional information.
- <p>The
+ <p>The
<code>fudge</code>
command is used to provide additional
information for individual clock drivers and normally follows
@@ -2143,7 +2166,7 @@ in the
<code>fudge</code>
command as well.
- <p>The stratum number of a reference clock is by default zero.
+ <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
@@ -2166,11 +2189,11 @@ these options apply to all clock drivers.
<h5 class="subsubsection">Reference Clock Commands</h5>
- <dl>
+ <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.
The options are interpreted as follows:
- <dl>
+ <dl>
<dt><code>prefer</code><dd>Marks the reference clock as preferred.
All other things being
equal, this host will be chosen for synchronization among a set of
@@ -2203,7 +2226,7 @@ defaults to 10 (17.1 m) and
defaults to 14 (4.5 h).
The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
</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
+ <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.
It must immediately follow the
<code>server</code>
@@ -2214,7 +2237,7 @@ is possible at run time using the
program.
The options are interpreted as
follows:
- <dl>
+ <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.
This is used
@@ -2251,7 +2274,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-<span class="file">/usr/share/doc/ntp</span>).
+<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.
This number overrides the default stratum number
@@ -2285,8 +2308,8 @@ Further information on the
command can be found in
<a href="#Monitoring-Options">Monitoring Options</a>.
</dl>
- </dl>
- <div class="node">
+ </dl>
+<div class="node">
<p><hr>
<a name="Miscellaneous-Options"></a>
<br>
@@ -2294,7 +2317,7 @@ command can be found in
<h4 class="subsection">Miscellaneous Options</h4>
- <dl>
+ <dl>
<dt><code>broadcastdelay</code> <kbd>seconds</kbd><dd>The broadcast and multicast modes require a special calibration
to determine the network delay between the local and remote
servers.
@@ -2327,7 +2350,7 @@ 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>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).
The file is updated by first writing
@@ -2347,7 +2370,7 @@ Note that all of these flags
can be controlled remotely using the
<code>ntpdc(1ntpdcmdoc)</code>
utility program.
- <dl>
+ <dl>
<dt><code>auth</code><dd>Enables the server to synchronize with unconfigured peers only if the
peer has been correctly authenticated using either public key or
private key cryptography.
@@ -2482,7 +2505,7 @@ The
default for this flag is
<code>enable</code>.
</dl>
- <br><dt><code>includefile</code> <kbd>includefile</kbd><dd>This command allows additional configuration commands
+ <br><dt><code>includefile</code> <kbd>includefile</kbd><dd>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
@@ -2492,6 +2515,67 @@ 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
+<code>interface</code>
+directive controls which network addresses
+<code>ntpd(1ntpdmdoc)</code>
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+<kbd>prefixlen</kbd>
+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.
+Multiple
+<code>interface</code>
+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>,
+<code>--interface</code>,
+<code>-L</code>,
+or
+<code>--novirtualips</code>
+command-line options are specified in the configuration file,
+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
+leapsecond values for the next leapsecond event, leapfile expiration
+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>.
+The
+<code>leapfile</code>
+is scanned when
+<code>ntpd(1ntpdmdoc)</code>
+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.
+<code>ntpd</code>
+checks once a day to see if the
+<kbd>leapfile</kbd>
+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
<code>ntpd(1ntpdmdoc)</code>
was built with the
@@ -2543,7 +2627,7 @@ and
status messages
(<code>status</code>).
- <p>Configuration keywords are formed by concatenating the message class with
+ <p>Configuration keywords are formed by concatenating the message class with
the event class.
The
<code>all</code>
@@ -2555,20 +2639,20 @@ keyword to enable/disable all
messages of the respective message class.
Thus, a minimal log configuration
could look like this:
-<pre class="verbatim">
- logconfig =syncstatus +sysevents
- </pre>
+<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.
For a simple reference server, the
following minimum message configuration could be useful:
-<pre class="verbatim">
- logconfig =syncall +clockall
- </pre>
+<pre class="verbatim">
+ logconfig =syncall +clockall
+</pre>
- <p>This configuration will list all clock information and
+ <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.
@@ -2579,6 +2663,129 @@ 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
+(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.
+The acutal limit will be up to
+<code>incalloc</code>
+entries or
+<code>incmem</code>
+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.
+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
+<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.
+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.
+</dl>
+ <br><dt><code>nonvolatile</code> <kbd>threshold</kbd><dd>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.
+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
+the ACTS modem driver (type 18)
+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
+<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.
+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
+<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.
+</dl>
+ <br><dt><code>saveconfigdir</code> <kbd>directory_path</kbd><dd>Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+<code>saveconfig</code>
+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
+modifications given with
+<code>:config</code>
+or
+<code>config-from-file</code>
+to the
+<code>ntpd</code>
+host's
+<kbd>filename</kbd>
+in the
+<code>saveconfigdir</code>.
+This command will be rejected unless the
+<code>saveconfigdir</code>
+directive appears in
+.Cm ntpd '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>.
+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.
These
variables can be used to distribute additional information such as
@@ -2610,6 +2817,8 @@ 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.
It should occur in the
@@ -2627,8 +2836,8 @@ 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>
+ <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
intercept, which is a parameter of the PLL/FLL clock discipline
algorithm.
@@ -2677,25 +2886,18 @@ be set to any positive number in seconds.
If set to zero, the stepout
pulses will not be suppressed.
</dl>
- <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.
-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
-<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.
-</dl>
- <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
+ <br><dt><code>writevar</code> <kbd>assocID\ name</kbd> <kbd>=</kbd> <kbd>value</kbd> <kbd>[,...]</kbd><dd>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.
+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
address and port number for sending messages with the specified
local interface address.
If the port number is unspecified, a value
@@ -2704,9 +2906,15 @@ If the interface address is not specified, the
message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
-interface used may vary from time to time with routing changes.
+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.
+In
+<code>manycast</code>
+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
+ <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
@@ -2720,11 +2928,11 @@ The default is eight multiples of 32 starting at
31.
</dl>
- <p>This section was generated by <strong>AutoGen</strong>,
+ <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">
+<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
@@ -2739,14 +2947,14 @@ This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<h4 class="subsection">ntp.conf Files</h4>
- <dl>
+ <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
</dl>
- <div class="node">
+<div class="node">
<p><hr>
<a name="ntp_002econf-See-Also"></a>
<br>
@@ -2754,11 +2962,11 @@ This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<h4 class="subsection">ntp.conf See Also</h4>
- <p><code>ntpd(1ntpdmdoc)</code>,
+<p><code>ntpd(1ntpdmdoc)</code>,
<code>ntpdc(1ntpdcmdoc)</code>,
<code>ntpq(1ntpqmdoc)</code>
- <p>In addition to the manual pages provided,
+ <p>In addition to the manual pages provided,
comprehensive documentation is available on the world wide web
at
<code>http://www.ntp.org/</code>.
@@ -2766,7 +2974,7 @@ A snapshot of this documentation is available in HTML format in
<span class="file">/usr/share/doc/ntp</span>.
<br>
- <p><br>
+ <p><br>
David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
<div class="node">
<p><hr>
@@ -2776,11 +2984,11 @@ David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
<h4 class="subsection">ntp.conf Bugs</h4>
- <p>The syntax checking is not picky; some combinations of
+<p>The syntax checking is not picky; some combinations of
ridiculous and even hilarious options and modes may not be
detected.
- <p>The
+ <p>The
<span class="file">ntpkey_</span><kbd>host</kbd>
files are really digital
certificates.
@@ -2794,7 +3002,7 @@ services when they become universally available.
<h4 class="subsection">ntp.conf Notes</h4>
- <p>This document was derived from FreeBSD.
+<p>This document was derived from FreeBSD.
</body></html>
diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in
index cd6faaab7d73..0f2b21191f96 100644
--- a/ntpd/ntp.conf.man.in
+++ b/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "21 Mar 2017" "4.2.8p10-beta" "File Formats"
+.TH ntp.conf 5 "27 Feb 2018" "4.2.8p11" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-UAaqtC/ag-6AaisC)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LkaqTP/ag-XkaiSP)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:30:48 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:22 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1665,7 +1665,7 @@ The
subcommand specifies the probability of discard
for packets that overflow the rate-control window.
.TP 7
-.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
\f\*[I-Font]address\f[]
argument expressed in
@@ -1689,6 +1689,15 @@ Note that text string
\f\*[B-Font]default\f[],
with no mask option, may
be used to indicate the default entry.
+The
+\f\*[B-Font]ippeerlimit\f[]
+directive limits the number of peer requests for each IP to
+\f\*[I-Font]int\f[],
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+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.
In the current implementation,
\f\*[B-Font]flag\f[]
always
@@ -1744,6 +1753,19 @@ This flag
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
.TP 7
+.NOP \f\*[B-Font]noepeer\f[]
+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
+\fIntp.keys\f[]
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+\f\*[B-Font]noepeer\f[]
+to become the default in ntp-4.4.
+.TP 7
.NOP \f\*[B-Font]nomodify\f[]
Deny
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
@@ -1763,10 +1785,10 @@ queries.
Time service is not affected.
.TP 7
.NOP \f\*[B-Font]nopeer\f[]
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+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.
It also includes
\f\*[B-Font]pool\f[]
associations, so if you want to use servers from a
@@ -1774,9 +1796,9 @@ associations, so if you want to use servers from a
directive and also want to use
\f\*[B-Font]nopeer\f[]
by default, you'll want a
-\f\*[B-Font]restrict source ...\f[] \f\*[B-Font]line\f[] \f\*[B-Font]as\f[] \f\*[B-Font]well\f[] \f\*[B-Font]that\f[] \f\*[B-Font]does\f[]
-.TP 7
-.NOP not
+\f\*[B-Font]restrict source ...\f[]
+line as well that does
+\fInot\f[]
include the
\f\*[B-Font]nopeer\f[]
directive.
@@ -2186,11 +2208,11 @@ there is clear benefit to having the clients notice this change
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.
+.PP
.SS Manycast Options
-.RS
.TP 7
.NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[] | \f\*[B-Font]cohort\f[] { \f\*[B-Font]0\f[] | \f\*[B-Font]1\f[] } | \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[] | \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[] | \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]]
This command affects the clock selection and clustering
@@ -2260,7 +2282,7 @@ In manycast mode these values are used in turn
in an expanding-ring search.
The default is eight
multiples of 32 starting at 31.
-.RE
+.PP
.SH Reference Clock Support
The NTP Version 4 daemon supports some three dozen different radio,
satellite and modem reference clocks plus a special pseudo-clock
@@ -2427,7 +2449,6 @@ option is used for this purpose.
Except where noted,
these options apply to all clock drivers.
.SS Reference Clock Commands
-.RS
.TP 7
.NOP \f\*[B-Font]server\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]]
This command can be used to configure reference clocks in
@@ -2528,7 +2549,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-\fI/usr/share/doc/ntp\f[]).
+\fI/usr/share/doc/ntp\f[] \fI).\f[]
.TP 7
.NOP \f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]
Specifies the stratum number assigned to the driver, an integer
@@ -2576,9 +2597,8 @@ Further information on the
command can be found in
\fIMonitoring\f[] \fIOptions\f[].
.RE
-.RE
+.PP
.SH Miscellaneous Options
-.RS
.TP 7
.NOP \f\*[B-Font]broadcastdelay\f[] \f\*[I-Font]seconds\f[]
The broadcast and multicast modes require a special calibration
@@ -2817,6 +2837,71 @@ This option is useful for sites that run
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
.TP 7
+.NOP \f\*[B-Font]interface\f[] [\f\*[B-Font]listen\f[] | \f\*[B-Font]ignore\f[] | \f\*[B-Font]drop\f[]] [\f\*[B-Font]all\f[] | \f\*[B-Font]ipv4\f[] | \f\*[B-Font]ipv6\f[] | \f\*[B-Font]wildcard\f[] \f\*[I-Font]name\f[] | \f\*[I-Font]address\f[] [\f\*[B-Font]/\f[] \f\*[I-Font]prefixlen\f[]]]
+The
+\f\*[B-Font]interface\f[]
+directive controls which network addresses
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+\f\*[I-Font]prefixlen\f[]
+determines how many bits must match for this rule to apply.
+\f\*[B-Font]ignore\f[]
+prevents opening matching addresses,
+\f\*[B-Font]drop\f[]
+causes
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+to open the address and drop all received packets without examination.
+Multiple
+\f\*[B-Font]interface\f[]
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+\f\*[B-Font]interface\f[]
+directives are disabled if any
+\f\*[B-Font]\-I\f[],
+\f\*[B-Font]\-\-interface\f[],
+\f\*[B-Font]\-L\f[],
+or
+\f\*[B-Font]\-\-novirtualips\f[]
+command-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+\f\*[B-Font]nic\f[]
+directive is an alias for
+\f\*[B-Font]interface\f[].
+.TP 7
+.NOP \f\*[B-Font]leapfile\f[] \f\*[I-Font]leapfile\f[]
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+\f[C]https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[]
+or
+\f[C]ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[].
+The
+\f\*[B-Font]leapfile\f[]
+is scanned when
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+processes the
+\f\*[B-Font]leapfile\f[] \f\*[B-Font]directive\f[] \f\*[B-Font]or\f[] \f\*[B-Font]when\f[]
+\f\*[B-Font]ntpd\f[] \f\*[B-Font]detects\f[] \f\*[B-Font]that\f[] \f\*[B-Font]the\f[]
+\f\*[I-Font]leapfile\f[]
+has changed.
+\f\*[B-Font]ntpd\f[]
+checks once a day to see if the
+\f\*[I-Font]leapfile\f[]
+has changed.
+The
+\fCupdate-leap\f[]\fR(1update_leapmdoc)\f[]
+script can be run to see if the
+\f\*[I-Font]leapfile\f[]
+should be updated.
+.TP 7
.NOP \f\*[B-Font]leapsmearinterval\f[] \f\*[I-Font]seconds\f[]
This EXPERIMENTAL option is only available if
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
@@ -2922,6 +3007,164 @@ This is the same operation as the
\f\*[B-Font]\-l\f[]
command line option.
.TP 7
+.NOP \f\*[B-Font]mru\f[] [\f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[] | \f\*[B-Font]initialloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]]
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.RS
+.TP 7
+.NOP \f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[]
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+\f\*[B-Font]incalloc\f[]
+entries or
+\f\*[B-Font]incmem\f[]
+kilobytes larger.
+As with all of the
+\f\*[B-Font]mru\f[]
+options offered in units of entries or kilobytes, if both
+\f\*[B-Font]maxdepth\f[]
+and
+\f\*[B-Font]maxmem\f[] \f\*[B-Font]are\f[] \f\*[B-Font]used,\f[] \f\*[B-Font]the\f[] \f\*[B-Font]last\f[] \f\*[B-Font]one\f[] \f\*[B-Font]used\f[] \f\*[B-Font]controls.\f[]
+The default is 1024 kilobytes.
+.TP 7
+.NOP \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[]
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+\f\*[B-Font]mindepth\f[]
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.TP 7
+.NOP \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[]
+Once the MRU list has
+\f\*[B-Font]mindepth\f[]
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+\f\*[B-Font]maxage\f[]
+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
+\f\*[B-Font]maxdepth\f[] \f\*[B-Font]/\f[] \f\*[B-Font]moxmem\f[].
+The default is 64 seconds.
+.TP 7
+.NOP \f\*[B-Font]initalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.RE
+.TP 7
+.NOP \f\*[B-Font]nonvolatile\f[] \f\*[I-Font]threshold\f[]
+Specify the
+\f\*[I-Font]threshold\f[]
+delta in seconds before an hourly change to the
+\f\*[B-Font]driftfile\f[]
+(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
+\f\*[B-Font]threshold\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]phone\f[] \f\*[I-Font]dial\f[] \f\*[I-Font]...\f[]
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+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.
+.TP 7
+.NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
+Reset one or more groups of counters maintained by
+\f\*[B-Font]ntpd\f[]
+and exposed by
+\f\*[B-Font]ntpq\f[]
+and
+\f\*[B-Font]ntpdc\f[].
+.TP 7
+.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
+.RS
+.TP 7
+.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
+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
+\f\*[B-Font]\-i\f[]
+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".
+.TP 7
+.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
+Specifies the maximum size of the process stack on systems with the
+\fBmlockall\f[]\fR()\f[]
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.TP 7
+.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.RE
+.TP 7
+.NOP \f\*[B-Font]saveconfigdir\f[] \f\*[I-Font]directory_path\f[]
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+\f\*[B-Font]saveconfig\f[]
+command.
+If
+\f\*[B-Font]saveconfigdir\f[]
+does not appear in the configuration file,
+\f\*[B-Font]saveconfig\f[]
+requests are rejected by
+\f\*[B-Font]ntpd\f[].
+.TP 7
+.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
+Write the current configuration, including any runtime
+modifications given with
+\f\*[B-Font]:config\f[]
+or
+\f\*[B-Font]config-from-file\f[]
+to the
+\f\*[B-Font]ntpd\f[]
+host's
+\f\*[I-Font]filename\f[]
+in the
+\f\*[B-Font]saveconfigdir\f[].
+This command will be rejected unless the
+\f\*[B-Font]saveconfigdir\f[]
+directive appears in
+.Cm ntpd 's
+configuration file.
+\f\*[I-Font]filename\f[]
+can use
+\fCstrftime\f[]\fR(3)\f[]
+format directives to substitute the current date and time,
+for example,
+\f\*[B-Font]saveconfig\ ntp-%Y%m%d-%H%M%S.conf\f[].
+The filename used is stored in the system variable
+\f\*[B-Font]savedconfig\f[].
+Authentication is required.
+.TP 7
.NOP \f\*[B-Font]setvar\f[] \f\*[I-Font]variable\f[] [\f\*[B-Font]default\f[]]
This command adds an additional system variable.
These
@@ -2955,6 +3198,12 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
+.NOP \f\*[B-Font]sysinfo\f[]
+Display operational summary.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Show statistics counters maintained in the protocol module.
+.TP 7
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
@@ -3044,30 +3293,18 @@ If set to zero, the stepout
pulses will not be suppressed.
.RE
.TP 7
-.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
-.RS
-.TP 7
-.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
-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
-\f\*[B-Font]\-i\f[]
-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".
-.TP 7
-.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
-Specifies the maximum size of the process stack on systems with the
-\fBmlockall\f[]\fR()\f[]
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.TP 7
-.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.RE
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\ name\f[] \f\*[I-Font]=\f[] \f\*[I-Font]value\f[] \f\*[I-Font][,...]\f[]
+Write (create or update) the specified variables.
+If the
+\f\*[B-Font]assocID\f[]
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+\f\*[B-Font]assocID\f[]
+is required, as the same name can occur in both name spaces.
.TP 7
.NOP \f\*[B-Font]trap\f[] \f\*[I-Font]host_address\f[] [\f\*[B-Font]port\f[] \f\*[I-Font]port_number\f[]] [\f\*[B-Font]interface\f[] \f\*[I-Font]interface_address\f[]]
This command configures a trap receiver at the given host
@@ -3080,6 +3317,14 @@ message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+\f\*[B-Font]manycast\f[]
+mode these values are used in-turn in an expanding-ring search.
+The default is eight multiples of 32 starting at 31.
.sp \n(Ppu
.ne 2
@@ -3097,9 +3342,8 @@ In manycast mode these values are used in turn in
an expanding-ring search.
The default is eight multiples of 32 starting at
31.
-.RE
+.PP
.SH "OPTIONS"
-.RS
.TP
.NOP \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
@@ -3111,7 +3355,7 @@ Pass the extended usage information through a pager.
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
-.RE
+.PP
.SH "OPTION PRESETS"
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from environment variables named:
@@ -3122,7 +3366,6 @@ by loading values from environment variables named:
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH FILES
-.RS
.TP 15
.NOP \fI/etc/ntp.conf\f[]
the default name of the configuration file
@@ -3146,10 +3389,9 @@ RSA public key
.TP 15
.NOP \fIntp_dh\f[]
Diffie-Hellman agreement parameters
-.RE
+.PP
.SH "EXIT STATUS"
One of the following exit values will be returned:
-.RS
.TP
.NOP 0 " (EXIT_SUCCESS)"
Successful program execution.
@@ -3160,7 +3402,7 @@ The operation failed or the command syntax was not valid.
.NOP 70 " (EX_SOFTWARE)"
libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
-.RE
+.PP
.SH "SEE ALSO"
\fCntpd\f[]\fR(@NTPD_MS@)\f[],
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[],
diff --git a/ntpd/ntp.conf.mdoc.in b/ntpd/ntp.conf.mdoc.in
index 1d5d3b62217c..321acc99da05 100644
--- a/ntpd/ntp.conf.mdoc.in
+++ b/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:31:09 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:42 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1532,6 +1532,7 @@ subcommand specifies the probability of discard
for packets that overflow the rate\-control window.
.It Xo Ic restrict address
.Op Cm mask Ar mask
+.Op Cm ippeerlimit Ar int
.Op Ar flag ...
.Xc
The
@@ -1557,6 +1558,15 @@ Note that text string
.Cm default ,
with no mask option, may
be used to indicate the default entry.
+The
+.Cm ippeerlimit
+directive limits the number of peer requests for each IP to
+.Ar int ,
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+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.
In the current implementation,
.Cm flag
always
@@ -1607,6 +1617,18 @@ 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.
+.It Cm noepeer
+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
+.Pa ntp.keys
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+.Cm noepeer
+to become the default in ntp\-4.4.
.It Cm nomodify
Deny
.Xr ntpq @NTPQ_MS@
@@ -1624,10 +1646,10 @@ and
queries.
Time service is not affected.
.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+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.
It also includes
.Cm pool
associations, so if you want to use servers from a
@@ -1635,8 +1657,9 @@ associations, so if you want to use servers from a
directive and also want to use
.Cm nopeer
by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
+.Cm "restrict source ..."
+line as well that does
+.Em not
include the
.Cm nopeer
directive.
@@ -2011,9 +2034,10 @@ there is clear benefit to having the clients notice this change
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.
+.El
.Ss Manycast Options
.Bl -tag -width indent
.It Xo Ic tos
@@ -2359,7 +2383,7 @@ specific drivers in the
page
(available as part of the HTML documentation
provided in
-.Pa /usr/share/doc/ntp ) .
+.Pa /usr/share/doc/ntp ).
.It Cm stratum Ar int
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
@@ -2637,6 +2661,79 @@ This option is useful for sites that run
.Xr ntpd @NTPD_MS@
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+.It Xo Ic interface
+.Oo
+.Cm listen | Cm ignore | Cm drop
+.Oc
+.Oo
+.Cm all | Cm ipv4 | Cm ipv6 | Cm wildcard
+.Ar name | Ar address
+.Oo Cm / Ar prefixlen
+.Oc
+.Oc
+.Xc
+The
+.Cm interface
+directive controls which network addresses
+.Xr ntpd @NTPD_MS@
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+.Ar prefixlen
+determines how many bits must match for this rule to apply.
+.Cm ignore
+prevents opening matching addresses,
+.Cm drop
+causes
+.Xr ntpd @NTPD_MS@
+to open the address and drop all received packets without examination.
+Multiple
+.Cm interface
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+.Cm interface
+directives are disabled if any
+.Fl I ,
+.Fl \-interface ,
+.Fl L ,
+or
+.Fl \-novirtualips
+command\-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+.Cm nic
+directive is an alias for
+.Cm interface .
+.It Ic leapfile Ar leapfile
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+.Li https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list
+or
+.Li ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list .
+The
+.Cm leapfile
+is scanned when
+.Xr ntpd @NTPD_MS@
+processes the
+.Cm leapfile directive or when
+.Cm ntpd detects that the
+.Ar leapfile
+has changed.
+.Cm ntpd
+checks once a day to see if the
+.Ar leapfile
+has changed.
+The
+.Xr update\-leap 1update_leapmdoc
+script can be run to see if the
+.Ar leapfile
+should be updated.
.It Ic leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd @NTPD_MS@
@@ -2741,6 +2838,181 @@ facility.
This is the same operation as the
.Fl l
command line option.
+.It Xo Ic mru
+.Oo
+.Cm maxdepth Ar count | Cm maxmem Ar kilobytes |
+.Cm mindepth Ar count | Cm maxage Ar seconds |
+.Cm initialloc Ar count | Cm initmem Ar kilobytes |
+.Cm incalloc Ar count | Cm incmem Ar kilobytes
+.Oc
+.Xc
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.Bl -tag -width indent
+.It Ic maxdepth Ar count
+.It Ic maxmem Ar kilobytes
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+.Cm incalloc
+entries or
+.Cm incmem
+kilobytes larger.
+As with all of the
+.Cm mru
+options offered in units of entries or kilobytes, if both
+.Cm maxdepth
+and
+.Cm maxmem are used, the last one used controls.
+The default is 1024 kilobytes.
+.It Cm mindepth Ar count
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+.Cm mindepth
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.It Cm maxage Ar seconds
+Once the MRU list has
+.Cm mindepth
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+.Cm maxage
+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
+.Cm maxdepth / moxmem .
+The default is 64 seconds.
+.It Cm initalloc Ar count
+.It Cm initmem Ar kilobytes
+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.
+.It Cm incalloc Ar count
+.It Cm incmem Ar kilobytes
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.El
+.It Ic nonvolatile Ar threshold
+Specify the
+.Ar threshold
+delta in seconds before an hourly change to the
+.Cm driftfile
+(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
+.Cm threshold
+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.
+.It Ic phone Ar dial ...
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+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.
+.It Xo Ic reset
+.Oo
+.Ic allpeers
+.Oc
+.Oo
+.Ic auth
+.Oc
+.Oo
+.Ic ctl
+.Oc
+.Oo
+.Ic io
+.Oc
+.Oo
+.Ic mem
+.Oc
+.Oo
+.Ic sys
+.Oc
+.Oo
+.Ic timer
+.Oc
+.Xc
+Reset one or more groups of counters maintained by
+.Cm ntpd
+and exposed by
+.Cm ntpq
+and
+.Cm ntpdc .
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+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
+.Fl i
+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".
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.El
+.It Ic saveconfigdir Ar directory_path
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+.Cm saveconfig
+command.
+If
+.Cm saveconfigdir
+does not appear in the configuration file,
+.Cm saveconfig
+requests are rejected by
+.Cm ntpd .
+.It Ic saveconfig Ar filename
+Write the current configuration, including any runtime
+modifications given with
+.Cm :config
+or
+.Cm config\-from\-file
+to the
+.Cm ntpd
+host's
+.Ar filename
+in the
+.Cm saveconfigdir .
+This command will be rejected unless the
+.Cm saveconfigdir
+directive appears in
+.Cm ntpd 's
+configuration file.
+.Ar filename
+can use
+.Xr strftime 3
+format directives to substitute the current date and time,
+for example,
+.Cm saveconfig\ ntp\-%Y%m%d\-%H%M%S.conf .
+The filename used is stored in the system variable
+.Cm savedconfig .
+Authentication is required.
.It Ic setvar Ar variable Op Cm default
This command adds an additional system variable.
These
@@ -2779,6 +3051,10 @@ holds
the names of all peer variables and the
.Va clock_var_list
holds the names of the reference clock variables.
+.It Cm sysinfo
+Display operational summary.
+.It Cm sysstats
+Show statistics counters maintained in the protocol module.
.It Xo Ic tinker
.Oo
.Cm allan Ar allan |
@@ -2868,33 +3144,18 @@ be set to any positive number in seconds.
If set to zero, the stepout
pulses will not be suppressed.
.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-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
-.Fl i
-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".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
+.It Cm writevar Ar assocID\ name = value [,...]
+Write (create or update) the specified variables.
+If the
+.Cm assocID
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+.Cm assocID
+is required, as the same name can occur in both name spaces.
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number
.Op Cm interface Ar interface_address
@@ -2909,6 +3170,13 @@ message is sent with a source address of the local interface the
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.It Cm ttl Ar hop ...
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+.Cm manycast
+mode these values are used in\-turn in an expanding\-ring search.
+The default is eight multiples of 32 starting at 31.
.Pp
The trap receiver will generally log event messages and other
information from the server in a log file.
diff --git a/ntpd/ntp.keys.5man b/ntpd/ntp.keys.5man
index 9daf75f0361d..b107e02ea2a0 100644
--- a/ntpd/ntp.keys.5man
+++ b/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "21 Mar 2017" "4.2.8p10" "File Formats"
+.TH ntp.keys 5man "27 Feb 2018" "4.2.8p11" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:10 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:26 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -76,16 +76,24 @@ where
is a positive integer (between 1 and 65534),
\f\*[I-Font]type\f[]
is the message digest algorithm,
-and
\f\*[I-Font]key\f[]
is the key itself, and
\f\*[I-Font]opt_IP_list\f[]
is an optional comma-separated list of IPs
+where the
+\f\*[I-Font]keyno\f[]
+should be trusted.
that are allowed to serve time.
+Each IP in
+\f\*[I-Font]opt_IP_list\f[]
+may contain an optional
+\f\*[B-Font]/subnetbits\f[]
+specification which identifies the number of bits for
+the desired subnet of trust.
If
\f\*[I-Font]opt_IP_list\f[]
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
.sp \n(Ppu
.ne 2
diff --git a/ntpd/ntp.keys.5mdoc b/ntpd/ntp.keys.5mdoc
index 02664dbe0223..bec3980fc357 100644
--- a/ntpd/ntp.keys.5mdoc
+++ b/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:22 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:46 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -51,16 +51,24 @@ where
is a positive integer (between 1 and 65534),
.Ar type
is the message digest algorithm,
-and
.Ar key
is the key itself, and
.Ar opt_IP_list
is an optional comma\-separated list of IPs
+where the
+.Ar keyno
+should be trusted.
that are allowed to serve time.
+Each IP in
+.Ar opt_IP_list
+may contain an optional
+.Cm /subnetbits
+specification which identifies the number of bits for
+the desired subnet of trust.
If
.Ar opt_IP_list
is empty,
-any properly\-authenticated server message will be
+any properly\-authenticated message will be
accepted.
.Pp
The
diff --git a/ntpd/ntp.keys.def b/ntpd/ntp.keys.def
index efe774c2e541..88dd2aac3e08 100644
--- a/ntpd/ntp.keys.def
+++ b/ntpd/ntp.keys.def
@@ -50,16 +50,24 @@ where
is a positive integer (between 1 and 65534),
.Ar type
is the message digest algorithm,
-and
.Ar key
is the key itself, and
.Ar opt_IP_list
is an optional comma-separated list of IPs
+where the
+.Ar keyno
+should be trusted.
that are allowed to serve time.
+Each IP in
+.Ar opt_IP_list
+may contain an optional
+.Cm /subnetbits
+specification which identifies the number of bits for
+the desired subnet of trust.
If
.Ar opt_IP_list
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
.Pp
The
diff --git a/ntpd/ntp.keys.html b/ntpd/ntp.keys.html
index 7713789d5fbf..28a4076aaa00 100644
--- a/ntpd/ntp.keys.html
+++ b/ntpd/ntp.keys.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the symmetric key file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.8p10 of <code>ntp.keys</code>.
+ <p>This document applies to version 4.2.8p11 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -100,16 +100,24 @@ Key entries use a fixed format of the form
is a positive integer (between 1 and 65534),
<kbd>type</kbd>
is the message digest algorithm,
-and
<kbd>key</kbd>
is the key itself, and
<kbd>opt_IP_list</kbd>
is an optional comma-separated list of IPs
+where the
+<kbd>keyno</kbd>
+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.
If
<kbd>opt_IP_list</kbd>
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
<p>The
diff --git a/ntpd/ntp.keys.man.in b/ntpd/ntp.keys.man.in
index a88bf58b5d07..3712747d4475 100644
--- a/ntpd/ntp.keys.man.in
+++ b/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "21 Mar 2017" "4.2.8p10" "File Formats"
+.TH ntp.keys 5 "27 Feb 2018" "4.2.8p11" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:10 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:26 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -76,16 +76,24 @@ where
is a positive integer (between 1 and 65534),
\f\*[I-Font]type\f[]
is the message digest algorithm,
-and
\f\*[I-Font]key\f[]
is the key itself, and
\f\*[I-Font]opt_IP_list\f[]
is an optional comma-separated list of IPs
+where the
+\f\*[I-Font]keyno\f[]
+should be trusted.
that are allowed to serve time.
+Each IP in
+\f\*[I-Font]opt_IP_list\f[]
+may contain an optional
+\f\*[B-Font]/subnetbits\f[]
+specification which identifies the number of bits for
+the desired subnet of trust.
If
\f\*[I-Font]opt_IP_list\f[]
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
.sp \n(Ppu
.ne 2
diff --git a/ntpd/ntp.keys.mdoc.in b/ntpd/ntp.keys.mdoc.in
index fb2f7ea993e1..6dc4f88c4815 100644
--- a/ntpd/ntp.keys.mdoc.in
+++ b/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:22 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:46 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -51,16 +51,24 @@ where
is a positive integer (between 1 and 65534),
.Ar type
is the message digest algorithm,
-and
.Ar key
is the key itself, and
.Ar opt_IP_list
is an optional comma\-separated list of IPs
+where the
+.Ar keyno
+should be trusted.
that are allowed to serve time.
+Each IP in
+.Ar opt_IP_list
+may contain an optional
+.Cm /subnetbits
+specification which identifies the number of bits for
+the desired subnet of trust.
If
.Ar opt_IP_list
is empty,
-any properly\-authenticated server message will be
+any properly\-authenticated message will be
accepted.
.Pp
The
diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c
index 428ab9f467d6..003b1534a9c4 100644
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -149,9 +149,9 @@ typedef struct peer_resolved_ctx_tag {
extern int yydebug; /* ntp_parser.c (.y) */
config_tree cfgt; /* Parser output stored here */
struct config_tree_tag *cfg_tree_history; /* History of configs */
-char *sys_phone[MAXPHONE] = {NULL}; /* ACTS phone numbers */
+char * sys_phone[MAXPHONE] = {NULL}; /* ACTS phone numbers */
char default_keysdir[] = NTP_KEYSDIR;
-char *keysdir = default_keysdir; /* crypto keys directory */
+char * keysdir = default_keysdir; /* crypto keys directory */
char * saveconfigdir;
#if defined(HAVE_SCHED_SETSCHEDULER)
int config_priority_override = 0;
@@ -312,6 +312,7 @@ static void config_monitor(config_tree *);
static void config_rlimit(config_tree *);
static void config_system_opts(config_tree *);
static void config_tinker(config_tree *);
+static int config_tos_clock(config_tree *);
static void config_tos(config_tree *);
static void config_vars(config_tree *);
@@ -363,6 +364,8 @@ 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 *);
+
#ifndef SIM
static int getnetnum(const char *num, sockaddr_u *addr, int complain,
@@ -528,7 +531,7 @@ dump_config_tree(
setvar_node *setv_node;
nic_rule_node *rule_node;
int_node *i_n;
- int_node *flags;
+ int_node *flag_tok_fifo;
int_node *counter_set;
string_node *str_node;
@@ -554,7 +557,10 @@ dump_config_tree(
ptree->source.value.s);
}
- /* For options I didn't find documentation I'll just output its name and the cor. value */
+ /*
+ * For options without documentation we just output the name
+ * and its data value
+ */
atrv = HEAD_PFIFO(ptree->vars);
for ( ; atrv != NULL; atrv = atrv->link) {
switch (atrv->type) {
@@ -722,6 +728,21 @@ dump_config_tree(
token_name(atrv->type));
break;
#endif
+ case T_Integer:
+ if (atrv->attr == T_Basedate) {
+ struct calendar jd;
+ ntpcal_rd_to_date(&jd, atrv->value.i + DAY_NTP_STARTS);
+ fprintf(df, " %s \"%04hu-%02hu-%02hu\"",
+ keyword(atrv->attr), jd.year,
+ (u_short)jd.month,
+ (u_short)jd.monthday);
+ } else {
+ fprintf(df, " %s %d",
+ keyword(atrv->attr),
+ atrv->value.i);
+ }
+ break;
+
case T_Double:
fprintf(df, " %s %s",
keyword(atrv->attr),
@@ -904,30 +925,52 @@ dump_config_tree(
fprintf(df, "\n");
}
-
for (rest_node = HEAD_PFIFO(ptree->restrict_opts);
rest_node != NULL;
rest_node = rest_node->link) {
+ int is_default = 0;
if (NULL == rest_node->addr) {
s = "default";
- flags = HEAD_PFIFO(rest_node->flags);
- for ( ; flags != NULL; flags = flags->link)
- if (T_Source == flags->i) {
+ /* Don't need to set is_default=1 here */
+ flag_tok_fifo = HEAD_PFIFO(rest_node->flag_tok_fifo);
+ for ( ; flag_tok_fifo != NULL; flag_tok_fifo = flag_tok_fifo->link) {
+ if (T_Source == flag_tok_fifo->i) {
s = "source";
break;
- }
+ }
+ }
} else {
- s = rest_node->addr->address;
+ const char *ap = rest_node->addr->address;
+ const char *mp = "";
+
+ if (rest_node->mask)
+ mp = rest_node->mask->address;
+
+ if ( rest_node->addr->type == AF_INET
+ && !strcmp(ap, "0.0.0.0")
+ && !strcmp(mp, "0.0.0.0")) {
+ is_default = 1;
+ s = "-4 default";
+ } else if ( rest_node->mask
+ && rest_node->mask->type == AF_INET6
+ && !strcmp(ap, "::")
+ && !strcmp(mp, "::")) {
+ is_default = 1;
+ s = "-6 default";
+ } else {
+ s = ap;
+ }
}
fprintf(df, "restrict %s", s);
- if (rest_node->mask != NULL)
+ if (rest_node->mask != NULL && !is_default)
fprintf(df, " mask %s",
rest_node->mask->address);
- flags = HEAD_PFIFO(rest_node->flags);
- for ( ; flags != NULL; flags = flags->link)
- if (T_Source != flags->i)
- fprintf(df, " %s", keyword(flags->i));
+ fprintf(df, " ippeerlimit %d", rest_node->ippeerlimit);
+ flag_tok_fifo = HEAD_PFIFO(rest_node->flag_tok_fifo);
+ for ( ; flag_tok_fifo != NULL; flag_tok_fifo = flag_tok_fifo->link)
+ if (T_Source != flag_tok_fifo->i)
+ fprintf(df, " %s", keyword(flag_tok_fifo->i));
fprintf(df, "\n");
}
@@ -1057,11 +1100,45 @@ concat_gen_fifos(
return pf1;
}
+void*
+destroy_gen_fifo(
+ void *fifo,
+ fifo_deleter func
+ )
+{
+ any_node * np = NULL;
+ any_node_fifo * pf1 = fifo;
+
+ if (pf1 != NULL) {
+ if (!func)
+ func = free;
+ for (;;) {
+ UNLINK_FIFO(np, *pf1, link);
+ if (np == NULL)
+ break;
+ (*func)(np);
+ }
+ free(pf1);
+ }
+ return NULL;
+}
/* FUNCTIONS FOR CREATING NODES ON THE SYNTAX TREE
* -----------------------------------------------
*/
+void
+destroy_attr_val(
+ attr_val * av
+ )
+{
+ if (av) {
+ if (T_String == av->type)
+ free(av->value.s);
+ free(av);
+ }
+}
+
attr_val *
create_attr_dval(
int attr,
@@ -1402,7 +1479,8 @@ restrict_node *
create_restrict_node(
address_node * addr,
address_node * mask,
- int_fifo * flags,
+ short ippeerlimit,
+ int_fifo * flag_tok_fifo,
int line_no
)
{
@@ -1411,7 +1489,8 @@ create_restrict_node(
my_node = emalloc_zero(sizeof(*my_node));
my_node->addr = addr;
my_node->mask = mask;
- my_node->flags = flags;
+ my_node->ippeerlimit = ippeerlimit;
+ my_node->flag_tok_fifo = flag_tok_fifo;
my_node->line_no = line_no;
return my_node;
@@ -1428,7 +1507,7 @@ destroy_restrict_node(
*/
destroy_address_node(my_node->addr);
destroy_address_node(my_node->mask);
- destroy_int_fifo(my_node->flags);
+ destroy_int_fifo(my_node->flag_tok_fifo);
free(my_node);
}
@@ -1484,9 +1563,7 @@ destroy_attr_val_fifo(
UNLINK_FIFO(av, *av_fifo, link);
if (av == NULL)
break;
- if (T_String == av->type)
- free(av->value.s);
- free(av);
+ destroy_attr_val(av);
}
free(av_fifo);
}
@@ -2009,6 +2086,35 @@ free_config_auth(
#endif /* FREE_CFG_T */
+/* Configure low-level clock-related parameters. Return TRUE if the
+ * clock might need adjustment like era-checking after the call, FALSE
+ * otherwise.
+ */
+static int/*BOOL*/
+config_tos_clock(
+ config_tree *ptree
+ )
+{
+ int ret;
+ attr_val * tos;
+
+ ret = FALSE;
+ tos = HEAD_PFIFO(ptree->orphan_cmds);
+ for (; tos != NULL; tos = tos->link) {
+ switch(tos->attr) {
+
+ default:
+ break;
+
+ case T_Basedate:
+ basedate_set_day(tos->value.i);
+ ret = TRUE;
+ break;
+ }
+ }
+ return ret;
+}
+
static void
config_tos(
config_tree *ptree
@@ -2034,12 +2140,16 @@ config_tos(
/* -*- phase one: inspect / sanitize the values */
tos = HEAD_PFIFO(ptree->orphan_cmds);
for (; tos != NULL; tos = tos->link) {
- val = tos->value.d;
+ /* not all attributes are doubles (any more), so loading
+ * 'val' in all cases is not a good idea: It should be
+ * done as needed in every case processed here.
+ */
switch(tos->attr) {
default:
break;
case T_Bcpollbstep:
+ val = tos->value.d;
if (val > 4) {
msyslog(LOG_WARNING,
"Using maximum bcpollbstep ceiling %d, %d requested",
@@ -2054,6 +2164,7 @@ config_tos(
break;
case T_Ceiling:
+ val = tos->value.d;
if (val > STRATUM_UNSPEC - 1) {
msyslog(LOG_WARNING,
"Using maximum tos ceiling %d, %d requested",
@@ -2068,18 +2179,21 @@ config_tos(
break;
case T_Minclock:
+ val = tos->value.d;
if ((int)tos->value.d < 1)
tos->value.d = 1;
l_minclock = (int)tos->value.d;
break;
case T_Maxclock:
+ val = tos->value.d;
if ((int)tos->value.d < 1)
tos->value.d = 1;
l_maxclock = (int)tos->value.d;
break;
case T_Minsane:
+ val = tos->value.d;
if ((int)tos->value.d < 1)
tos->value.d = 1;
l_minsane = (int)tos->value.d;
@@ -2097,7 +2211,6 @@ config_tos(
/* -*- phase two: forward the values to the protocol machinery */
tos = HEAD_PFIFO(ptree->orphan_cmds);
for (; tos != NULL; tos = tos->link) {
- val = tos->value.d;
switch(tos->attr) {
default:
@@ -2150,8 +2263,11 @@ config_tos(
case T_Beacon:
item = PROTO_BEACON;
break;
+
+ case T_Basedate:
+ continue; /* SKIP proto-config for this! */
}
- proto_config(item, 0, val, NULL);
+ proto_config(item, 0, tos->value.d, NULL);
}
}
@@ -2348,7 +2464,7 @@ config_access(
static int warned_signd;
attr_val * my_opt;
restrict_node * my_node;
- int_node * curr_flag;
+ int_node * curr_tok_fifo;
sockaddr_u addr;
sockaddr_u mask;
struct addrinfo hints;
@@ -2356,8 +2472,9 @@ config_access(
struct addrinfo * pai;
int rc;
int restrict_default;
- u_short flags;
+ u_short rflags;
u_short mflags;
+ short ippeerlimit;
int range_err;
const char * signd_warning =
#ifdef HAVE_NTP_SIGND
@@ -2476,17 +2593,23 @@ config_access(
/* Configure the restrict options */
my_node = HEAD_PFIFO(ptree->restrict_opts);
+
for (; my_node != NULL; my_node = my_node->link) {
+ /* Grab the ippeerlmit */
+ ippeerlimit = my_node->ippeerlimit;
+
+DPRINTF(1, ("config_access: top-level node %p: ippeerlimit %d\n", my_node, ippeerlimit));
+
/* Parse the flags */
- flags = 0;
+ rflags = 0;
mflags = 0;
- curr_flag = HEAD_PFIFO(my_node->flags);
- for (; curr_flag != NULL; curr_flag = curr_flag->link) {
- switch (curr_flag->i) {
+ curr_tok_fifo = HEAD_PFIFO(my_node->flag_tok_fifo);
+ for (; curr_tok_fifo != NULL; curr_tok_fifo = curr_tok_fifo->link) {
+ switch (curr_tok_fifo->i) {
default:
- fatal_error("config-access: flag-type-token=%d", curr_flag->i);
+ fatal_error("config_access: flag-type-token=%d", curr_tok_fifo->i);
case T_Ntpport:
mflags |= RESM_NTPONLY;
@@ -2497,71 +2620,75 @@ config_access(
break;
case T_Flake:
- flags |= RES_FLAKE;
+ rflags |= RES_FLAKE;
break;
case T_Ignore:
- flags |= RES_IGNORE;
+ rflags |= RES_IGNORE;
break;
case T_Kod:
- flags |= RES_KOD;
+ rflags |= RES_KOD;
break;
case T_Mssntp:
- flags |= RES_MSSNTP;
+ rflags |= RES_MSSNTP;
break;
case T_Limited:
- flags |= RES_LIMITED;
+ rflags |= RES_LIMITED;
break;
case T_Lowpriotrap:
- flags |= RES_LPTRAP;
+ rflags |= RES_LPTRAP;
break;
case T_Nomodify:
- flags |= RES_NOMODIFY;
+ rflags |= RES_NOMODIFY;
break;
case T_Nomrulist:
- flags |= RES_NOMRULIST;
+ rflags |= RES_NOMRULIST;
+ break;
+
+ case T_Noepeer:
+ rflags |= RES_NOEPEER;
break;
case T_Nopeer:
- flags |= RES_NOPEER;
+ rflags |= RES_NOPEER;
break;
case T_Noquery:
- flags |= RES_NOQUERY;
+ rflags |= RES_NOQUERY;
break;
case T_Noserve:
- flags |= RES_DONTSERVE;
+ rflags |= RES_DONTSERVE;
break;
case T_Notrap:
- flags |= RES_NOTRAP;
+ rflags |= RES_NOTRAP;
break;
case T_Notrust:
- flags |= RES_DONTTRUST;
+ rflags |= RES_DONTTRUST;
break;
case T_Version:
- flags |= RES_VERSION;
+ rflags |= RES_VERSION;
break;
}
}
- if ((RES_MSSNTP & flags) && !warned_signd) {
+ if ((RES_MSSNTP & rflags) && !warned_signd) {
warned_signd = 1;
fprintf(stderr, "%s\n", signd_warning);
msyslog(LOG_WARNING, "%s", signd_warning);
}
/* It would be swell if we could identify the line number */
- if ((RES_KOD & flags) && !(RES_LIMITED & flags)) {
+ if ((RES_KOD & rflags) && !(RES_LIMITED & rflags)) {
const char *kod_where = (my_node->addr)
? my_node->addr->address
: (mflags & RESM_SOURCE)
@@ -2589,10 +2716,10 @@ config_access(
restrict_default = 1;
} else {
/* apply "restrict source ..." */
- DPRINTF(1, ("restrict source template mflags %x flags %x\n",
- mflags, flags));
- hack_restrict(RESTRICT_FLAGS, NULL,
- NULL, mflags, flags, 0);
+ DPRINTF(1, ("restrict source template ippeerlimit %d mflags %x rflags %x\n",
+ ippeerlimit, mflags, rflags));
+ hack_restrict(RESTRICT_FLAGS, NULL, NULL,
+ ippeerlimit, mflags, rflags, 0);
continue;
}
} else {
@@ -2661,15 +2788,15 @@ config_access(
if (restrict_default) {
AF(&addr) = AF_INET;
AF(&mask) = AF_INET;
- hack_restrict(RESTRICT_FLAGS, &addr,
- &mask, mflags, flags, 0);
+ hack_restrict(RESTRICT_FLAGS, &addr, &mask,
+ ippeerlimit, mflags, rflags, 0);
AF(&addr) = AF_INET6;
AF(&mask) = AF_INET6;
}
do {
- hack_restrict(RESTRICT_FLAGS, &addr,
- &mask, mflags, flags, 0);
+ hack_restrict(RESTRICT_FLAGS, &addr, &mask,
+ ippeerlimit, mflags, rflags, 0);
if (pai != NULL &&
NULL != (pai = pai->ai_next)) {
INSIST(pai->ai_addr != NULL);
@@ -2720,6 +2847,9 @@ config_rlimit(
case T_Memlock:
/* What if we HAVE_OPT(SAVECONFIGQUIT) ? */
+ if (HAVE_OPT( SAVECONFIGQUIT )) {
+ break;
+ }
if (rlimit_av->value.i == -1) {
# if defined(HAVE_MLOCKALL)
if (cur_memlock != 0) {
@@ -3006,17 +3136,17 @@ apply_enable_disable(
int enable
)
{
- attr_val *curr_flag;
+ attr_val *curr_tok_fifo;
int option;
#ifdef BC_LIST_FRAMEWORK_NOT_YET_USED
bc_entry *pentry;
#endif
- for (curr_flag = HEAD_PFIFO(fifo);
- curr_flag != NULL;
- curr_flag = curr_flag->link) {
+ for (curr_tok_fifo = HEAD_PFIFO(fifo);
+ curr_tok_fifo != NULL;
+ curr_tok_fifo = curr_tok_fifo->link) {
- option = curr_flag->value.i;
+ option = curr_tok_fifo->value.i;
switch (option) {
default:
@@ -3851,6 +3981,9 @@ config_peers(
* If we have a numeric address, we can safely
* proceed in the mainline with it. Otherwise, hand
* the hostname off to the blocking child.
+ *
+ * Note that if we're told to add the peer here, we
+ * do that regardless of ippeerlimit.
*/
if (is_ip_address(*cmdline_servers, AF_UNSPEC,
&peeraddr)) {
@@ -3862,6 +3995,7 @@ config_peers(
&peeraddr,
NULL,
NULL,
+ -1,
MODE_CLIENT,
NTP_VERSION,
0,
@@ -3912,6 +4046,7 @@ config_peers(
&peeraddr,
curr_peer->addr->address,
NULL,
+ -1,
hmode,
curr_peer->peerversion,
curr_peer->minpoll,
@@ -3935,6 +4070,7 @@ config_peers(
&peeraddr,
NULL,
NULL,
+ -1,
hmode,
curr_peer->peerversion,
curr_peer->minpoll,
@@ -4035,6 +4171,7 @@ peer_name_resolved(
&peeraddr,
NULL,
NULL,
+ -1,
ctx->hmode,
ctx->version,
ctx->minpoll,
@@ -4113,7 +4250,7 @@ config_unpeers(
if (rc > 0) {
DPRINTF(1, ("unpeer: searching for %s\n",
stoa(&peeraddr)));
- p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0, NULL);
if (p != NULL) {
msyslog(LOG_NOTICE, "unpeered %s",
stoa(&peeraddr));
@@ -4193,7 +4330,7 @@ unpeer_name_resolved(
memcpy(&peeraddr, res->ai_addr, res->ai_addrlen);
DPRINTF(1, ("unpeer: searching for peer %s\n",
stoa(&peeraddr)));
- peer = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ peer = findexistingpeer(&peeraddr, NULL, NULL, -1, 0, NULL);
if (peer != NULL) {
af = AF(&peeraddr);
fam_spec = (AF_INET6 == af)
@@ -4420,6 +4557,15 @@ config_ntpd(
int/*BOOL*/ input_from_files
)
{
+ /* [Bug 3435] check and esure clock sanity if configured from
+ * file and clock sanity parameters (-> basedate) are given. Do
+ * this ASAP, so we don't disturb the closed loop controller.
+ */
+ if (input_from_files) {
+ if (config_tos_clock(ptree))
+ clamp_systime();
+ }
+
config_nic_rules(ptree, input_from_files);
config_monitor(ptree);
config_auth(ptree);
@@ -4444,6 +4590,12 @@ config_ntpd(
config_fudge(ptree);
config_reset_counters(ptree);
+#ifdef DEBUG
+ if (debug > 1) {
+ dump_restricts();
+ }
+#endif
+
#ifdef TEST_BLOCKING_WORKER
{
struct addrinfo hints;
@@ -5043,6 +5195,9 @@ ntp_rlimit(
switch (rl_what) {
# ifdef RLIMIT_MEMLOCK
case RLIMIT_MEMLOCK:
+ if (HAVE_OPT( SAVECONFIGQUIT )) {
+ break;
+ }
/*
* The default RLIMIT_MEMLOCK is very low on Linux systems.
* Unless we increase this limit malloc calls are likely to
@@ -5104,3 +5259,217 @@ ntp_rlimit(
}
}
#endif /* HAVE_SETRLIMIT */
+
+
+char *
+build_iflags(u_int32 iflags)
+{
+ static char ifs[1024];
+
+ ifs[0] = '\0';
+
+ if (iflags & INT_UP) {
+ iflags &= ~INT_UP;
+ appendstr(ifs, sizeof ifs, "up");
+ }
+
+ if (iflags & INT_PPP) {
+ iflags &= ~INT_PPP;
+ appendstr(ifs, sizeof ifs, "ppp");
+ }
+
+ if (iflags & INT_LOOPBACK) {
+ iflags &= ~INT_LOOPBACK;
+ appendstr(ifs, sizeof ifs, "loopback");
+ }
+
+ if (iflags & INT_BROADCAST) {
+ iflags &= ~INT_BROADCAST;
+ appendstr(ifs, sizeof ifs, "broadcast");
+ }
+
+ if (iflags & INT_MULTICAST) {
+ iflags &= ~INT_MULTICAST;
+ appendstr(ifs, sizeof ifs, "multicast");
+ }
+
+ if (iflags & INT_BCASTOPEN) {
+ iflags &= ~INT_BCASTOPEN;
+ appendstr(ifs, sizeof ifs, "bcastopen");
+ }
+
+ if (iflags & INT_MCASTOPEN) {
+ iflags &= ~INT_MCASTOPEN;
+ appendstr(ifs, sizeof ifs, "mcastopen");
+ }
+
+ if (iflags & INT_WILDCARD) {
+ iflags &= ~INT_WILDCARD;
+ appendstr(ifs, sizeof ifs, "wildcard");
+ }
+
+ if (iflags & INT_MCASTIF) {
+ iflags &= ~INT_MCASTIF;
+ appendstr(ifs, sizeof ifs, "MCASTif");
+ }
+
+ if (iflags & INT_PRIVACY) {
+ iflags &= ~INT_PRIVACY;
+ appendstr(ifs, sizeof ifs, "IPv6privacy");
+ }
+
+ if (iflags & INT_BCASTXMIT) {
+ iflags &= ~INT_BCASTXMIT;
+ appendstr(ifs, sizeof ifs, "bcastxmit");
+ }
+
+ if (iflags) {
+ char string[10];
+
+ snprintf(string, sizeof string, "%0x", iflags);
+ appendstr(ifs, sizeof ifs, string);
+ }
+
+ return ifs;
+}
+
+
+char *
+build_mflags(u_short mflags)
+{
+ static char mfs[1024];
+
+ mfs[0] = '\0';
+
+ if (mflags & RESM_NTPONLY) {
+ mflags &= ~RESM_NTPONLY;
+ appendstr(mfs, sizeof mfs, "ntponly");
+ }
+
+ if (mflags & RESM_SOURCE) {
+ mflags &= ~RESM_SOURCE;
+ appendstr(mfs, sizeof mfs, "source");
+ }
+
+ if (mflags) {
+ char string[10];
+
+ snprintf(string, sizeof string, "%0x", mflags);
+ appendstr(mfs, sizeof mfs, string);
+ }
+
+ return mfs;
+}
+
+
+char *
+build_rflags(u_short rflags)
+{
+ static char rfs[1024];
+
+ rfs[0] = '\0';
+
+ if (rflags & RES_FLAKE) {
+ rflags &= ~RES_FLAKE;
+ appendstr(rfs, sizeof rfs, "flake");
+ }
+
+ if (rflags & RES_IGNORE) {
+ rflags &= ~RES_IGNORE;
+ appendstr(rfs, sizeof rfs, "ignore");
+ }
+
+ if (rflags & RES_KOD) {
+ rflags &= ~RES_KOD;
+ appendstr(rfs, sizeof rfs, "kod");
+ }
+
+ if (rflags & RES_MSSNTP) {
+ rflags &= ~RES_MSSNTP;
+ appendstr(rfs, sizeof rfs, "mssntp");
+ }
+
+ if (rflags & RES_LIMITED) {
+ rflags &= ~RES_LIMITED;
+ appendstr(rfs, sizeof rfs, "limited");
+ }
+
+ if (rflags & RES_LPTRAP) {
+ rflags &= ~RES_LPTRAP;
+ appendstr(rfs, sizeof rfs, "lptrap");
+ }
+
+ if (rflags & RES_NOMODIFY) {
+ rflags &= ~RES_NOMODIFY;
+ appendstr(rfs, sizeof rfs, "nomodify");
+ }
+
+ if (rflags & RES_NOMRULIST) {
+ rflags &= ~RES_NOMRULIST;
+ appendstr(rfs, sizeof rfs, "nomrulist");
+ }
+
+ if (rflags & RES_NOEPEER) {
+ rflags &= ~RES_NOEPEER;
+ appendstr(rfs, sizeof rfs, "noepeer");
+ }
+
+ if (rflags & RES_NOPEER) {
+ rflags &= ~RES_NOPEER;
+ appendstr(rfs, sizeof rfs, "nopeer");
+ }
+
+ if (rflags & RES_NOQUERY) {
+ rflags &= ~RES_NOQUERY;
+ appendstr(rfs, sizeof rfs, "noquery");
+ }
+
+ if (rflags & RES_DONTSERVE) {
+ rflags &= ~RES_DONTSERVE;
+ appendstr(rfs, sizeof rfs, "dontserve");
+ }
+
+ if (rflags & RES_NOTRAP) {
+ rflags &= ~RES_NOTRAP;
+ appendstr(rfs, sizeof rfs, "notrap");
+ }
+
+ if (rflags & RES_DONTTRUST) {
+ rflags &= ~RES_DONTTRUST;
+ appendstr(rfs, sizeof rfs, "notrust");
+ }
+
+ if (rflags & RES_VERSION) {
+ rflags &= ~RES_VERSION;
+ appendstr(rfs, sizeof rfs, "version");
+ }
+
+ if (rflags) {
+ char string[10];
+
+ snprintf(string, sizeof string, "%0x", rflags);
+ appendstr(rfs, sizeof rfs, string);
+ }
+
+ if ('\0' == rfs[0]) {
+ appendstr(rfs, sizeof rfs, "(none)");
+ }
+
+ return rfs;
+}
+
+
+static void
+appendstr(
+ char *string,
+ size_t s,
+ char *new
+ )
+{
+ if (*string != '\0') {
+ (void)strlcat(string, ",", s);
+ }
+ (void)strlcat(string, new, s);
+
+ return;
+}
diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c
index a18a4d3007e0..d98f6aa50886 100644
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -176,56 +176,58 @@ static const struct ctl_proc control_codes[] = {
#define CS_SS_LIMITED 41
#define CS_SS_KODSENT 42
#define CS_SS_PROCESSED 43
-#define CS_PEERADR 44
-#define CS_PEERMODE 45
-#define CS_BCASTDELAY 46
-#define CS_AUTHDELAY 47
-#define CS_AUTHKEYS 48
-#define CS_AUTHFREEK 49
-#define CS_AUTHKLOOKUPS 50
-#define CS_AUTHKNOTFOUND 51
-#define CS_AUTHKUNCACHED 52
-#define CS_AUTHKEXPIRED 53
-#define CS_AUTHENCRYPTS 54
-#define CS_AUTHDECRYPTS 55
-#define CS_AUTHRESET 56
-#define CS_K_OFFSET 57
-#define CS_K_FREQ 58
-#define CS_K_MAXERR 59
-#define CS_K_ESTERR 60
-#define CS_K_STFLAGS 61
-#define CS_K_TIMECONST 62
-#define CS_K_PRECISION 63
-#define CS_K_FREQTOL 64
-#define CS_K_PPS_FREQ 65
-#define CS_K_PPS_STABIL 66
-#define CS_K_PPS_JITTER 67
-#define CS_K_PPS_CALIBDUR 68
-#define CS_K_PPS_CALIBS 69
-#define CS_K_PPS_CALIBERRS 70
-#define CS_K_PPS_JITEXC 71
-#define CS_K_PPS_STBEXC 72
+#define CS_SS_LAMPORT 44
+#define CS_SS_TSROUNDING 45
+#define CS_PEERADR 46
+#define CS_PEERMODE 47
+#define CS_BCASTDELAY 48
+#define CS_AUTHDELAY 49
+#define CS_AUTHKEYS 50
+#define CS_AUTHFREEK 51
+#define CS_AUTHKLOOKUPS 52
+#define CS_AUTHKNOTFOUND 53
+#define CS_AUTHKUNCACHED 54
+#define CS_AUTHKEXPIRED 55
+#define CS_AUTHENCRYPTS 56
+#define CS_AUTHDECRYPTS 57
+#define CS_AUTHRESET 58
+#define CS_K_OFFSET 59
+#define CS_K_FREQ 60
+#define CS_K_MAXERR 61
+#define CS_K_ESTERR 62
+#define CS_K_STFLAGS 63
+#define CS_K_TIMECONST 64
+#define CS_K_PRECISION 65
+#define CS_K_FREQTOL 66
+#define CS_K_PPS_FREQ 67
+#define CS_K_PPS_STABIL 68
+#define CS_K_PPS_JITTER 69
+#define CS_K_PPS_CALIBDUR 70
+#define CS_K_PPS_CALIBS 71
+#define CS_K_PPS_CALIBERRS 72
+#define CS_K_PPS_JITEXC 73
+#define CS_K_PPS_STBEXC 74
#define CS_KERN_FIRST CS_K_OFFSET
#define CS_KERN_LAST CS_K_PPS_STBEXC
-#define CS_IOSTATS_RESET 73
-#define CS_TOTAL_RBUF 74
-#define CS_FREE_RBUF 75
-#define CS_USED_RBUF 76
-#define CS_RBUF_LOWATER 77
-#define CS_IO_DROPPED 78
-#define CS_IO_IGNORED 79
-#define CS_IO_RECEIVED 80
-#define CS_IO_SENT 81
-#define CS_IO_SENDFAILED 82
-#define CS_IO_WAKEUPS 83
-#define CS_IO_GOODWAKEUPS 84
-#define CS_TIMERSTATS_RESET 85
-#define CS_TIMER_OVERRUNS 86
-#define CS_TIMER_XMTS 87
-#define CS_FUZZ 88
-#define CS_WANDER_THRESH 89
-#define CS_LEAPSMEARINTV 90
-#define CS_LEAPSMEAROFFS 91
+#define CS_IOSTATS_RESET 75
+#define CS_TOTAL_RBUF 76
+#define CS_FREE_RBUF 77
+#define CS_USED_RBUF 78
+#define CS_RBUF_LOWATER 79
+#define CS_IO_DROPPED 80
+#define CS_IO_IGNORED 81
+#define CS_IO_RECEIVED 82
+#define CS_IO_SENT 83
+#define CS_IO_SENDFAILED 84
+#define CS_IO_WAKEUPS 85
+#define CS_IO_GOODWAKEUPS 86
+#define CS_TIMERSTATS_RESET 87
+#define CS_TIMER_OVERRUNS 88
+#define CS_TIMER_XMTS 89
+#define CS_FUZZ 90
+#define CS_WANDER_THRESH 91
+#define CS_LEAPSMEARINTV 92
+#define CS_LEAPSMEAROFFS 93
#define CS_MAX_NOAUTOKEY CS_LEAPSMEAROFFS
#ifdef AUTOKEY
#define CS_FLAGS (1 + CS_MAX_NOAUTOKEY)
@@ -376,55 +378,57 @@ static const struct ctl_var sys_var[] = {
{ CS_SS_LIMITED, RO, "ss_limited" }, /* 41 */
{ CS_SS_KODSENT, RO, "ss_kodsent" }, /* 42 */
{ CS_SS_PROCESSED, RO, "ss_processed" }, /* 43 */
- { CS_PEERADR, RO, "peeradr" }, /* 44 */
- { CS_PEERMODE, RO, "peermode" }, /* 45 */
- { CS_BCASTDELAY, RO, "bcastdelay" }, /* 46 */
- { CS_AUTHDELAY, RO, "authdelay" }, /* 47 */
- { CS_AUTHKEYS, RO, "authkeys" }, /* 48 */
- { CS_AUTHFREEK, RO, "authfreek" }, /* 49 */
- { CS_AUTHKLOOKUPS, RO, "authklookups" }, /* 50 */
- { CS_AUTHKNOTFOUND, RO, "authknotfound" }, /* 51 */
- { CS_AUTHKUNCACHED, RO, "authkuncached" }, /* 52 */
- { CS_AUTHKEXPIRED, RO, "authkexpired" }, /* 53 */
- { CS_AUTHENCRYPTS, RO, "authencrypts" }, /* 54 */
- { CS_AUTHDECRYPTS, RO, "authdecrypts" }, /* 55 */
- { CS_AUTHRESET, RO, "authreset" }, /* 56 */
- { CS_K_OFFSET, RO, "koffset" }, /* 57 */
- { CS_K_FREQ, RO, "kfreq" }, /* 58 */
- { CS_K_MAXERR, RO, "kmaxerr" }, /* 59 */
- { CS_K_ESTERR, RO, "kesterr" }, /* 60 */
- { CS_K_STFLAGS, RO, "kstflags" }, /* 61 */
- { CS_K_TIMECONST, RO, "ktimeconst" }, /* 62 */
- { CS_K_PRECISION, RO, "kprecis" }, /* 63 */
- { CS_K_FREQTOL, RO, "kfreqtol" }, /* 64 */
- { CS_K_PPS_FREQ, RO, "kppsfreq" }, /* 65 */
- { CS_K_PPS_STABIL, RO, "kppsstab" }, /* 66 */
- { CS_K_PPS_JITTER, RO, "kppsjitter" }, /* 67 */
- { CS_K_PPS_CALIBDUR, RO, "kppscalibdur" }, /* 68 */
- { CS_K_PPS_CALIBS, RO, "kppscalibs" }, /* 69 */
- { CS_K_PPS_CALIBERRS, RO, "kppscaliberrs" }, /* 70 */
- { CS_K_PPS_JITEXC, RO, "kppsjitexc" }, /* 71 */
- { CS_K_PPS_STBEXC, RO, "kppsstbexc" }, /* 72 */
- { CS_IOSTATS_RESET, RO, "iostats_reset" }, /* 73 */
- { CS_TOTAL_RBUF, RO, "total_rbuf" }, /* 74 */
- { CS_FREE_RBUF, RO, "free_rbuf" }, /* 75 */
- { CS_USED_RBUF, RO, "used_rbuf" }, /* 76 */
- { CS_RBUF_LOWATER, RO, "rbuf_lowater" }, /* 77 */
- { CS_IO_DROPPED, RO, "io_dropped" }, /* 78 */
- { CS_IO_IGNORED, RO, "io_ignored" }, /* 79 */
- { CS_IO_RECEIVED, RO, "io_received" }, /* 80 */
- { CS_IO_SENT, RO, "io_sent" }, /* 81 */
- { CS_IO_SENDFAILED, RO, "io_sendfailed" }, /* 82 */
- { CS_IO_WAKEUPS, RO, "io_wakeups" }, /* 83 */
- { CS_IO_GOODWAKEUPS, RO, "io_goodwakeups" }, /* 84 */
- { CS_TIMERSTATS_RESET, RO, "timerstats_reset" },/* 85 */
- { CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 86 */
- { CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
- { CS_FUZZ, RO, "fuzz" }, /* 88 */
- { CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */
-
- { CS_LEAPSMEARINTV, RO, "leapsmearinterval" }, /* 90 */
- { CS_LEAPSMEAROFFS, RO, "leapsmearoffset" }, /* 91 */
+ { CS_SS_LAMPORT, RO, "ss_lamport" }, /* 44 */
+ { CS_SS_TSROUNDING, RO, "ss_tsrounding" }, /* 45 */
+ { CS_PEERADR, RO, "peeradr" }, /* 46 */
+ { CS_PEERMODE, RO, "peermode" }, /* 47 */
+ { CS_BCASTDELAY, RO, "bcastdelay" }, /* 48 */
+ { CS_AUTHDELAY, RO, "authdelay" }, /* 49 */
+ { CS_AUTHKEYS, RO, "authkeys" }, /* 50 */
+ { CS_AUTHFREEK, RO, "authfreek" }, /* 51 */
+ { CS_AUTHKLOOKUPS, RO, "authklookups" }, /* 52 */
+ { CS_AUTHKNOTFOUND, RO, "authknotfound" }, /* 53 */
+ { CS_AUTHKUNCACHED, RO, "authkuncached" }, /* 54 */
+ { CS_AUTHKEXPIRED, RO, "authkexpired" }, /* 55 */
+ { CS_AUTHENCRYPTS, RO, "authencrypts" }, /* 56 */
+ { CS_AUTHDECRYPTS, RO, "authdecrypts" }, /* 57 */
+ { CS_AUTHRESET, RO, "authreset" }, /* 58 */
+ { CS_K_OFFSET, RO, "koffset" }, /* 59 */
+ { CS_K_FREQ, RO, "kfreq" }, /* 60 */
+ { CS_K_MAXERR, RO, "kmaxerr" }, /* 61 */
+ { CS_K_ESTERR, RO, "kesterr" }, /* 62 */
+ { CS_K_STFLAGS, RO, "kstflags" }, /* 63 */
+ { CS_K_TIMECONST, RO, "ktimeconst" }, /* 64 */
+ { CS_K_PRECISION, RO, "kprecis" }, /* 65 */
+ { CS_K_FREQTOL, RO, "kfreqtol" }, /* 66 */
+ { CS_K_PPS_FREQ, RO, "kppsfreq" }, /* 67 */
+ { CS_K_PPS_STABIL, RO, "kppsstab" }, /* 68 */
+ { CS_K_PPS_JITTER, RO, "kppsjitter" }, /* 69 */
+ { CS_K_PPS_CALIBDUR, RO, "kppscalibdur" }, /* 70 */
+ { CS_K_PPS_CALIBS, RO, "kppscalibs" }, /* 71 */
+ { CS_K_PPS_CALIBERRS, RO, "kppscaliberrs" }, /* 72 */
+ { CS_K_PPS_JITEXC, RO, "kppsjitexc" }, /* 73 */
+ { CS_K_PPS_STBEXC, RO, "kppsstbexc" }, /* 74 */
+ { CS_IOSTATS_RESET, RO, "iostats_reset" }, /* 75 */
+ { CS_TOTAL_RBUF, RO, "total_rbuf" }, /* 76 */
+ { CS_FREE_RBUF, RO, "free_rbuf" }, /* 77 */
+ { CS_USED_RBUF, RO, "used_rbuf" }, /* 78 */
+ { CS_RBUF_LOWATER, RO, "rbuf_lowater" }, /* 79 */
+ { CS_IO_DROPPED, RO, "io_dropped" }, /* 80 */
+ { CS_IO_IGNORED, RO, "io_ignored" }, /* 81 */
+ { CS_IO_RECEIVED, RO, "io_received" }, /* 82 */
+ { CS_IO_SENT, RO, "io_sent" }, /* 83 */
+ { CS_IO_SENDFAILED, RO, "io_sendfailed" }, /* 84 */
+ { CS_IO_WAKEUPS, RO, "io_wakeups" }, /* 85 */
+ { CS_IO_GOODWAKEUPS, RO, "io_goodwakeups" }, /* 86 */
+ { CS_TIMERSTATS_RESET, RO, "timerstats_reset" },/* 87 */
+ { CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 88 */
+ { CS_TIMER_XMTS, RO, "timer_xmts" }, /* 89 */
+ { CS_FUZZ, RO, "fuzz" }, /* 90 */
+ { CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 91 */
+
+ { CS_LEAPSMEARINTV, RO, "leapsmearinterval" }, /* 92 */
+ { CS_LEAPSMEAROFFS, RO, "leapsmearoffset" }, /* 93 */
#ifdef AUTOKEY
{ CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
@@ -436,7 +440,7 @@ static const struct ctl_var sys_var[] = {
{ CS_IDENT, RO, "ident" }, /* 7 + CS_MAX_NOAUTOKEY */
{ CS_DIGEST, RO, "digest" }, /* 8 + CS_MAX_NOAUTOKEY */
#endif /* AUTOKEY */
- { 0, EOV, "" } /* 87/95 */
+ { 0, EOV, "" } /* 94/102 */
};
static struct ctl_var *ext_sys_var = NULL;
@@ -1264,7 +1268,7 @@ process_control(
rbufp->recv_length, properlen, res_keyid,
maclen));
- if (!authistrusted(res_keyid))
+ if (!authistrustedip(res_keyid, &rbufp->recv_srcadr))
DPRINTF(3, ("invalid keyid %08x\n", res_keyid));
else if (authdecrypt(res_keyid, (u_int32 *)pkt,
rbufp->recv_length - maclen,
@@ -1472,28 +1476,46 @@ ctl_flushpkt(
}
-/*
- * ctl_putdata - write data into the packet, fragmenting and starting
- * another if this one is full.
+/* --------------------------------------------------------------------
+ * block transfer API -- stream string/data fragments into xmit buffer
+ * without additional copying
+ */
+
+/* buffer descriptor: address & size of fragment
+ * 'buf' may only be NULL when 'len' is zero!
*/
+typedef struct {
+ const void *buf;
+ size_t len;
+} CtlMemBufT;
+
+/* put ctl data in a gather-style operation */
static void
-ctl_putdata(
- const char *dp,
- unsigned int dlen,
- int bin /* set to 1 when data is binary */
+ctl_putdata_ex(
+ const CtlMemBufT * argv,
+ size_t argc,
+ int/*BOOL*/ bin /* set to 1 when data is binary */
)
{
- int overhead;
- unsigned int currentlen;
+ const char * src_ptr;
+ size_t src_len, cur_len, add_len, argi;
- overhead = 0;
- if (!bin) {
+ /* text / binary preprocessing, possibly create new linefeed */
+ if (bin) {
+ add_len = 0;
+ } else {
datanotbinflag = TRUE;
- overhead = 3;
+ add_len = 3;
+
if (datasent) {
*datapt++ = ',';
datalinelen++;
- if ((dlen + datalinelen + 1) >= MAXDATALINELEN) {
+
+ /* sum up total length */
+ for (argi = 0, src_len = 0; argi < argc; ++argi)
+ src_len += argv[argi].len;
+ /* possibly start a new line, assume no size_t overflow */
+ if ((src_len + datalinelen + 1) >= MAXDATALINELEN) {
*datapt++ = '\r';
*datapt++ = '\n';
datalinelen = 0;
@@ -1504,31 +1526,56 @@ ctl_putdata(
}
}
- /*
- * Save room for trailing junk
- */
- while (dlen + overhead + datapt > dataend) {
- /*
- * Not enough room in this one, flush it out.
- */
- currentlen = MIN(dlen, (unsigned int)(dataend - datapt));
+ /* now stream out all buffers */
+ for (argi = 0; argi < argc; ++argi) {
+ src_ptr = argv[argi].buf;
+ src_len = argv[argi].len;
- memcpy(datapt, dp, currentlen);
+ if ( ! (src_ptr && src_len))
+ continue;
- datapt += currentlen;
- dp += currentlen;
- dlen -= currentlen;
- datalinelen += currentlen;
+ cur_len = (size_t)(dataend - datapt);
+ while ((src_len + add_len) > cur_len) {
+ /* 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);
+ }
- ctl_flushpkt(CTL_MORE);
- }
+ memcpy(datapt, src_ptr, src_len);
+ datapt += src_len;
+ datalinelen += src_len;
- memcpy(datapt, dp, dlen);
- datapt += dlen;
- datalinelen += dlen;
- datasent = TRUE;
+ datasent = TRUE;
+ }
}
+/*
+ * ctl_putdata - write data into the packet, fragmenting and starting
+ * another if this one is full.
+ */
+static void
+ctl_putdata(
+ const char *dp,
+ unsigned int dlen,
+ int bin /* set to 1 when data is binary */
+ )
+{
+ CtlMemBufT args[1];
+
+ args[0].buf = dp;
+ args[0].len = dlen;
+ ctl_putdata_ex(args, 1, bin);
+}
/*
* ctl_putstr - write a tagged string into the response packet
@@ -1546,16 +1593,21 @@ ctl_putstr(
size_t len
)
{
- char buffer[512];
- int rc;
-
- INSIST(len < sizeof(buffer));
- if (len)
- rc = snprintf(buffer, sizeof(buffer), "%s=\"%.*s\"", tag, (int)len, data);
- else
- rc = snprintf(buffer, sizeof(buffer), "%s", tag);
- INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ CtlMemBufT args[4];
+
+ args[0].buf = tag;
+ args[0].len = strlen(tag);
+ if (data && len) {
+ args[1].buf = "=\"";
+ args[1].len = 2;
+ args[2].buf = data;
+ args[2].len = len;
+ args[3].buf = "\"";
+ args[3].len = 1;
+ ctl_putdata_ex(args, 4, FALSE);
+ } else {
+ ctl_putdata_ex(args, 1, FALSE);
+ }
}
@@ -1575,16 +1627,19 @@ ctl_putunqstr(
size_t len
)
{
- char buffer[512];
- int rc;
-
- INSIST(len < sizeof(buffer));
- if (len)
- rc = snprintf(buffer, sizeof(buffer), "%s=%.*s", tag, (int)len, data);
- else
- rc = snprintf(buffer, sizeof(buffer), "%s", tag);
- INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ CtlMemBufT args[3];
+
+ args[0].buf = tag;
+ args[0].len = strlen(tag);
+ if (data && len) {
+ args[1].buf = "=";
+ args[1].len = 1;
+ args[2].buf = data;
+ args[2].len = len;
+ ctl_putdata_ex(args, 3, FALSE);
+ } else {
+ ctl_putdata_ex(args, 1, FALSE);
+ }
}
@@ -1599,14 +1654,14 @@ ctl_putdblf(
double d
)
{
- char buffer[200];
+ char buffer[40];
int rc;
rc = snprintf(buffer, sizeof(buffer),
- (use_f ? "%s=%.*f" : "%s=%.*g"),
- tag, precision, d);
+ (use_f ? "%.*f" : "%.*g"),
+ precision, d);
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, buffer, rc);
}
/*
@@ -1618,12 +1673,12 @@ ctl_putuint(
u_long uval
)
{
- char buffer[200];
+ char buffer[24]; /* needs to fit for 64 bits! */
int rc;
- rc = snprintf(buffer, sizeof(buffer), "%s=%lu", tag, uval);
+ rc = snprintf(buffer, sizeof(buffer), "%lu", uval);
INSIST(rc >= 0 && rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, buffer, rc);
}
/*
@@ -1637,17 +1692,16 @@ ctl_putcal(
const struct calendar *pcal
)
{
- char buffer[100];
+ char buffer[16];
int rc;
rc = snprintf(buffer, sizeof(buffer),
- "%s=%04d%02d%02d%02d%02d",
- tag,
+ "%04d%02d%02d%02d%02d",
pcal->year, pcal->month, pcal->monthday,
pcal->hour, pcal->minute
);
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, buffer, rc);
}
#endif
@@ -1660,23 +1714,21 @@ ctl_putfs(
tstamp_t uval
)
{
- char buffer[200];
- struct tm *tm = NULL;
- time_t fstamp;
- int rc;
+ char buffer[16];
+ int rc;
- fstamp = (time_t)uval - JAN_1970;
- tm = gmtime(&fstamp);
+ time_t fstamp = (time_t)uval - JAN_1970;
+ struct tm *tm = gmtime(&fstamp);
+
if (NULL == tm)
return;
rc = snprintf(buffer, sizeof(buffer),
- "%s=%04d%02d%02d%02d%02d",
- tag,
+ "%04d%02d%02d%02d%02d",
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min);
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, buffer, rc);
}
@@ -1690,12 +1742,12 @@ ctl_puthex(
u_long uval
)
{
- char buffer[200];
+ char buffer[24]; /* must fit 64bit int! */
int rc;
- rc = snprintf(buffer, sizeof(buffer), "%s=0x%lx", tag, uval);
+ rc = snprintf(buffer, sizeof(buffer), "0x%lx", uval);
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, buffer, rc);
}
@@ -1708,12 +1760,12 @@ ctl_putint(
long ival
)
{
- char buffer[200];
+ char buffer[24]; /*must fit 64bit int */
int rc;
- rc = snprintf(buffer, sizeof(buffer), "%s=%ld", tag, ival);
+ rc = snprintf(buffer, sizeof(buffer), "%ld", ival);
INSIST(rc >= 0 && rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, buffer, rc);
}
@@ -1726,14 +1778,14 @@ ctl_putts(
l_fp *ts
)
{
- char buffer[200];
+ char buffer[24];
int rc;
rc = snprintf(buffer, sizeof(buffer),
- "%s=0x%08lx.%08lx",
- tag, (u_long)ts->l_ui, (u_long)ts->l_uf);
+ "0x%08lx.%08lx",
+ (u_long)ts->l_ui, (u_long)ts->l_uf);
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, buffer, rc);
}
@@ -1748,16 +1800,12 @@ ctl_putadr(
)
{
const char *cq;
- char buffer[200];
- int rc;
if (NULL == addr)
cq = numtoa(addr32);
else
cq = stoa(addr);
- rc = snprintf(buffer, sizeof(buffer), "%s=%s", tag, cq);
- INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, 0);
+ ctl_putunqstr(tag, cq, strlen(cq));
}
@@ -1770,8 +1818,7 @@ ctl_putrefid(
u_int32 refid
)
{
- char buffer[128];
- int rc, i;
+ size_t nc;
union {
uint32_t w;
@@ -1779,13 +1826,10 @@ ctl_putrefid(
} bytes;
bytes.w = refid;
- for (i = 0; i < sizeof(bytes.b); ++i)
- if (bytes.b[i] && !isprint(bytes.b[i]))
- bytes.b[i] = '.';
- rc = snprintf(buffer, sizeof(buffer), "%s=%.*s",
- tag, (int)sizeof(bytes.b), bytes.b);
- INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
- ctl_putdata(buffer, (u_int)rc, FALSE);
+ for (nc = 0; nc < sizeof(bytes.b) && bytes.b[nc]; ++nc)
+ if (!isprint(bytes.b[nc]))
+ bytes.b[nc] = '.';
+ ctl_putunqstr(tag, (const char*)bytes.b, nc);
}
@@ -1805,21 +1849,16 @@ ctl_putarray(
cp = buffer;
ep = buffer + sizeof(buffer);
-
- rc = snprintf(cp, (size_t)(ep - cp), "%s=", tag);
- INSIST(rc >= 0 && rc < (ep - cp));
- cp += rc;
-
- i = start;
+ i = start;
do {
if (i == 0)
i = NTP_SHIFT;
i--;
rc = snprintf(cp, (size_t)(ep - cp), " %.2f", arr[i] * 1e3);
- INSIST(rc >= 0 && rc < (ep - cp));
+ INSIST(rc >= 0 && (size_t)rc < (size_t)(ep - cp));
cp += rc;
} while (i != start);
- ctl_putdata(buffer, (u_int)(cp - buffer), 0);
+ ctl_putunqstr(tag, buffer, (size_t)(cp - buffer));
}
/*
@@ -2183,6 +2222,14 @@ ctl_putsys(
ctl_putuint(sys_var[varid].text, sys_limitrejected);
break;
+ case CS_SS_LAMPORT:
+ ctl_putuint(sys_var[varid].text, sys_lamport);
+ break;
+
+ case CS_SS_TSROUNDING:
+ ctl_putuint(sys_var[varid].text, sys_tsrounding);
+ break;
+
case CS_SS_KODSENT:
ctl_putuint(sys_var[varid].text, sys_kodsent);
break;
@@ -3095,7 +3142,9 @@ ctl_getitem(
const char *sp1 = reqpt;
const char *sp2 = v->text;
- while ((sp1 != tp) && (*sp1 == *sp2)) {
+ /* [Bug 3412] do not compare past NUL byte in name */
+ while ( (sp1 != tp)
+ && ('\0' != *sp2) && (*sp1 == *sp2)) {
++sp1;
++sp2;
}
@@ -3594,7 +3643,13 @@ static u_int32 derive_nonce(
}
ctx = EVP_MD_CTX_new();
+# if defined(OPENSSL) && defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)
+ /* [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
EVP_DigestInit(ctx, EVP_get_digestbynid(NID_md5));
+# endif
EVP_DigestUpdate(ctx, salt, sizeof(salt));
EVP_DigestUpdate(ctx, &ts_i, sizeof(ts_i));
EVP_DigestUpdate(ctx, &ts_f, sizeof(ts_f));
@@ -4373,6 +4428,7 @@ send_restrict_entry(
while (sent[which])
which = (which + 1) % COUNTOF(sent);
+ /* XXX: Numbers? Really? */
switch (which) {
case 0:
@@ -4395,7 +4451,7 @@ send_restrict_entry(
case 3:
snprintf(tag, sizeof(tag), flags_fmt, idx);
match_str = res_match_flags(pres->mflags);
- access_str = res_access_flags(pres->flags);
+ access_str = res_access_flags(pres->rflags);
if ('\0' == match_str[0]) {
pch = access_str;
} else {
diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c
index 11d087a5ad69..f2df4da8fcf4 100644
--- a/ntpd/ntp_crypto.c
+++ b/ntpd/ntp_crypto.c
@@ -268,7 +268,13 @@ session_key(
break;
}
ctx = EVP_MD_CTX_new();
+# if defined(OPENSSL) && defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)
+ /* [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(crypto_nid), NULL);
+# else
EVP_DigestInit(ctx, EVP_get_digestbynid(crypto_nid));
+# endif
EVP_DigestUpdate(ctx, (u_char *)header, hdlen);
EVP_DigestFinal(ctx, dgst, &len);
EVP_MD_CTX_free(ctx);
@@ -2087,7 +2093,13 @@ bighash(
ptr = emalloc(len);
BN_bn2bin(bn, ptr);
ctx = EVP_MD_CTX_new();
+# if defined(OPENSSL) && defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)
+ /* [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_md5(), NULL);
+# else
EVP_DigestInit(ctx, EVP_md5());
+# endif
EVP_DigestUpdate(ctx, ptr, len);
EVP_DigestFinal(ctx, dgst, &len);
EVP_MD_CTX_free(ctx);
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index fe62ec566cda..ed5f0dcaff40 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -1043,7 +1043,7 @@ remove_interface(
/* remove restrict interface entry */
SET_HOSTMASK(&resmask, AF(&ep->sin));
hack_restrict(RESTRICT_REMOVEIF, &ep->sin, &resmask,
- RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
+ -3, RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
}
@@ -1600,7 +1600,7 @@ set_wildcard_reuse(
if (fd != INVALID_SOCKET) {
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
- (char *)&on, sizeof(on)))
+ (void *)&on, sizeof(on)))
msyslog(LOG_ERR,
"set_wildcard_reuse: setsockopt(SO_REUSEADDR, %s) failed: %m",
on ? "on" : "off");
@@ -2093,7 +2093,7 @@ create_interface(
*/
SET_HOSTMASK(&resmask, AF(&iface->sin));
hack_restrict(RESTRICT_FLAGS, &iface->sin, &resmask,
- RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
+ -4, RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
/*
* set globals with the first found
@@ -2156,7 +2156,7 @@ set_excladdruse(
#endif
failed = setsockopt(fd, SOL_SOCKET, SO_EXCLUSIVEADDRUSE,
- (char *)&one, sizeof(one));
+ (void *)&one, sizeof(one));
if (!failed)
return;
@@ -2210,7 +2210,7 @@ set_reuseaddr(
if (ep->fd != INVALID_SOCKET) {
if (setsockopt(ep->fd, SOL_SOCKET, SO_REUSEADDR,
- (char *)&flag, sizeof(flag))) {
+ (void *)&flag, sizeof(flag))) {
msyslog(LOG_ERR, "set_reuseaddr: setsockopt(%s, SO_REUSEADDR, %s) failed: %m",
stoa(&ep->sin), flag ? "on" : "off");
}
@@ -2253,7 +2253,7 @@ socket_broadcast_enable(
if (IS_IPV4(baddr)) {
/* if this interface can support broadcast, set SO_BROADCAST */
if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST,
- (char *)&on, sizeof(on)))
+ (void *)&on, sizeof(on)))
msyslog(LOG_ERR,
"setsockopt(SO_BROADCAST) enable failure on address %s: %m",
stoa(baddr));
@@ -2284,7 +2284,7 @@ socket_broadcast_disable(
int off = 0; /* This seems to be OK as an int */
if (IS_IPV4(baddr) && setsockopt(iface->fd, SOL_SOCKET,
- SO_BROADCAST, (char *)&off, sizeof(off)))
+ SO_BROADCAST, (void *)&off, sizeof(off)))
msyslog(LOG_ERR,
"setsockopt(SO_BROADCAST) disable failure on address %s: %m",
stoa(baddr));
@@ -2365,7 +2365,7 @@ enable_multicast_if(
*/
if (setsockopt(iface->fd, IPPROTO_IP,
IP_MULTICAST_LOOP,
- SETSOCKOPT_ARG_CAST &off,
+ (void *)&off,
sizeof(off))) {
msyslog(LOG_ERR,
@@ -2384,7 +2384,7 @@ enable_multicast_if(
*/
if (setsockopt(iface->fd, IPPROTO_IPV6,
IPV6_MULTICAST_LOOP,
- (char *) &off6, sizeof(off6))) {
+ (void *) &off6, sizeof(off6))) {
msyslog(LOG_ERR,
"setsockopt IPV6_MULTICAST_LOOP failed: %m on socket %d, addr %s for multicast address %s",
@@ -2426,7 +2426,7 @@ socket_multicast_enable(
if (setsockopt(iface->fd,
IPPROTO_IP,
IP_ADD_MEMBERSHIP,
- (char *)&mreq,
+ (void *)&mreq,
sizeof(mreq))) {
DPRINTF(2, (
"setsockopt IP_ADD_MEMBERSHIP failed: %m on socket %d, addr %s for %x / %x (%s)",
@@ -2456,7 +2456,7 @@ socket_multicast_enable(
mreq6.ipv6mr_interface = iface->ifindex;
if (setsockopt(iface->fd, IPPROTO_IPV6,
- IPV6_JOIN_GROUP, (char *)&mreq6,
+ IPV6_JOIN_GROUP, (void *)&mreq6,
sizeof(mreq6))) {
DPRINTF(2, (
"setsockopt IPV6_JOIN_GROUP failed: %m on socket %d, addr %s for interface %u (%s)",
@@ -2510,7 +2510,7 @@ socket_multicast_disable(
mreq.imr_multiaddr = SOCK_ADDR4(maddr);
mreq.imr_interface = SOCK_ADDR4(&iface->sin);
if (setsockopt(iface->fd, IPPROTO_IP,
- IP_DROP_MEMBERSHIP, (char *)&mreq,
+ IP_DROP_MEMBERSHIP, (void *)&mreq,
sizeof(mreq))) {
msyslog(LOG_ERR,
@@ -2534,7 +2534,7 @@ socket_multicast_disable(
mreq6.ipv6mr_interface = iface->ifindex;
if (setsockopt(iface->fd, IPPROTO_IPV6,
- IPV6_LEAVE_GROUP, (char *)&mreq6,
+ IPV6_LEAVE_GROUP, (void *)&mreq6,
sizeof(mreq6))) {
msyslog(LOG_ERR,
@@ -2730,6 +2730,7 @@ io_multicast_add(
if (ep->fd != INVALID_SOCKET) {
ep->ignore_packets = ISC_FALSE;
ep->flags |= INT_MCASTIF;
+ ep->ifindex = SCOPE(addr);
strlcpy(ep->name, "multicast", sizeof(ep->name));
DPRINT_INTERFACE(2, (ep, "multicast add ", "\n"));
@@ -2895,7 +2896,7 @@ open_socket(
if (isc_win32os_versioncheck(5, 1, 0, 0) < 0) /* before 5.1 */
#endif
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
- (char *)((turn_off_reuse)
+ (void *)((turn_off_reuse)
? &off
: &on),
sizeof(on))) {
@@ -2923,7 +2924,7 @@ open_socket(
*/
if (IS_IPV4(addr)) {
#if defined(IPPROTO_IP) && defined(IP_TOS)
- if (setsockopt(fd, IPPROTO_IP, IP_TOS, (char*)&qos,
+ if (setsockopt(fd, IPPROTO_IP, IP_TOS, (void *)&qos,
sizeof(qos)))
msyslog(LOG_ERR,
"setsockopt IP_TOS (%02x) fails on address %s: %m",
@@ -2938,7 +2939,7 @@ open_socket(
*/
if (IS_IPV6(addr)) {
#if defined(IPPROTO_IPV6) && defined(IPV6_TCLASS)
- if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, (char*)&qos,
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, (void *)&qos,
sizeof(qos)))
msyslog(LOG_ERR,
"setsockopt IPV6_TCLASS (%02x) fails on address %s: %m",
@@ -2947,14 +2948,14 @@ open_socket(
#ifdef IPV6_V6ONLY
if (isc_net_probe_ipv6only() == ISC_R_SUCCESS
&& setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY,
- (char*)&on, sizeof(on)))
+ (void *)&on, sizeof(on)))
msyslog(LOG_ERR,
"setsockopt IPV6_V6ONLY on fails on address %s: %m",
stoa(addr));
#endif
#ifdef IPV6_BINDV6ONLY
if (setsockopt(fd, IPPROTO_IPV6, IPV6_BINDV6ONLY,
- (char*)&on, sizeof(on)))
+ (void *)&on, sizeof(on)))
msyslog(LOG_ERR,
"setsockopt IPV6_BINDV6ONLY on fails on address %s: %m",
stoa(addr));
@@ -3006,7 +3007,7 @@ open_socket(
#ifdef HAVE_TIMESTAMP
{
if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP,
- (char*)&on, sizeof(on)))
+ (void *)&on, sizeof(on)))
msyslog(LOG_DEBUG,
"setsockopt SO_TIMESTAMP on fails on address %s: %m",
stoa(addr));
@@ -3018,7 +3019,7 @@ open_socket(
#ifdef HAVE_TIMESTAMPNS
{
if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPNS,
- (char*)&on, sizeof(on)))
+ (void *)&on, sizeof(on)))
msyslog(LOG_DEBUG,
"setsockopt SO_TIMESTAMPNS on fails on address %s: %m",
stoa(addr));
@@ -3030,7 +3031,7 @@ open_socket(
#ifdef HAVE_BINTIME
{
if (setsockopt(fd, SOL_SOCKET, SO_BINTIME,
- (char*)&on, sizeof(on)))
+ (void *)&on, sizeof(on)))
msyslog(LOG_DEBUG,
"setsockopt SO_BINTIME on fails on address %s: %m",
stoa(addr));
@@ -3091,6 +3092,7 @@ sendpkt(
int cc;
int rc;
u_char cttl;
+ l_fp fp_zero = { 0, 0 };
ismcast = IS_MCAST(dest);
if (!ismcast)
@@ -3174,6 +3176,19 @@ sendpkt(
if (ismcast)
src = src->mclink;
} while (ismcast && src != NULL);
+
+ /* HMS: pkt->rootdisp is usually random here */
+ record_raw_stats(src ? &src->sin : NULL, dest,
+ &pkt->org, &pkt->rec, &pkt->xmt, &fp_zero,
+ PKT_MODE(pkt->li_vn_mode),
+ PKT_VERSION(pkt->li_vn_mode),
+ PKT_LEAP(pkt->li_vn_mode),
+ pkt->stratum,
+ pkt->ppoll, pkt->precision,
+ pkt->rootdelay, pkt->rootdisp, pkt->refid,
+ len - MIN_V4_PKT_LEN, (u_char *)&pkt->exten);
+
+ return;
}
@@ -3960,6 +3975,17 @@ findlocalinterface(
DPRINTF(4, ("Finding interface for addr %s in list of addresses\n",
stoa(addr)));
+ /* [Bug 3437] The dummy POOL peer comes in with an AF of
+ * zero. This is bound to fail, but on the way to nowhere it
+ * triggers a security incident on SELinux.
+ *
+ * Checking the condition and failing early is probably a good
+ * advice, and even saves us some syscalls in that case.
+ * Thanks to Miroslav Lichvar for finding this.
+ */
+ if (AF_UNSPEC == AF(addr))
+ return NULL;
+
s = socket(AF(addr), SOCK_DGRAM, 0);
if (INVALID_SOCKET == s)
return NULL;
@@ -3972,7 +3998,7 @@ findlocalinterface(
on = 1;
if (SOCKET_ERROR == setsockopt(s, SOL_SOCKET,
SO_BROADCAST,
- (char *)&on,
+ (void *)&on,
sizeof(on))) {
closesocket(s);
return NULL;
diff --git a/ntpd/ntp_keyword.h b/ntpd/ntp_keyword.h
index 57ec764058cc..663881006a6c 100644
--- a/ntpd/ntp_keyword.h
+++ b/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
* ntp_keyword.h
*
* NOTE: edit this file with caution, it is generated by keyword-gen.c
- * Generated 2016-11-09 11:39:28 UTC diff_ignore_line
+ * Generated 2018-01-14 03:53:33 UTC diff_ignore_line
*
*/
#include "ntp_scanner.h"
@@ -10,7 +10,7 @@
#define LOWEST_KEYWORD_ID 258
-const char * const keyword_text[196] = {
+const char * const keyword_text[200] = {
/* 0 258 T_Abbrev */ "abbrev",
/* 1 259 T_Age */ "age",
/* 2 260 T_All */ "all",
@@ -20,203 +20,207 @@ const char * const keyword_text[196] = {
/* 6 264 T_Autokey */ "autokey",
/* 7 265 T_Automax */ "automax",
/* 8 266 T_Average */ "average",
- /* 9 267 T_Bclient */ "bclient",
- /* 10 268 T_Bcpollbstep */ "bcpollbstep",
- /* 11 269 T_Beacon */ "beacon",
- /* 12 270 T_Broadcast */ "broadcast",
- /* 13 271 T_Broadcastclient */ "broadcastclient",
- /* 14 272 T_Broadcastdelay */ "broadcastdelay",
- /* 15 273 T_Burst */ "burst",
- /* 16 274 T_Calibrate */ "calibrate",
- /* 17 275 T_Ceiling */ "ceiling",
- /* 18 276 T_Clockstats */ "clockstats",
- /* 19 277 T_Cohort */ "cohort",
- /* 20 278 T_ControlKey */ "controlkey",
- /* 21 279 T_Crypto */ "crypto",
- /* 22 280 T_Cryptostats */ "cryptostats",
- /* 23 281 T_Ctl */ "ctl",
- /* 24 282 T_Day */ "day",
- /* 25 283 T_Default */ "default",
- /* 26 284 T_Digest */ "digest",
- /* 27 285 T_Disable */ "disable",
- /* 28 286 T_Discard */ "discard",
- /* 29 287 T_Dispersion */ "dispersion",
- /* 30 288 T_Double */ NULL,
- /* 31 289 T_Driftfile */ "driftfile",
- /* 32 290 T_Drop */ "drop",
- /* 33 291 T_Dscp */ "dscp",
- /* 34 292 T_Ellipsis */ "...",
- /* 35 293 T_Enable */ "enable",
- /* 36 294 T_End */ "end",
- /* 37 295 T_False */ NULL,
- /* 38 296 T_File */ "file",
- /* 39 297 T_Filegen */ "filegen",
- /* 40 298 T_Filenum */ "filenum",
- /* 41 299 T_Flag1 */ "flag1",
- /* 42 300 T_Flag2 */ "flag2",
- /* 43 301 T_Flag3 */ "flag3",
- /* 44 302 T_Flag4 */ "flag4",
- /* 45 303 T_Flake */ "flake",
- /* 46 304 T_Floor */ "floor",
- /* 47 305 T_Freq */ "freq",
- /* 48 306 T_Fudge */ "fudge",
- /* 49 307 T_Host */ "host",
- /* 50 308 T_Huffpuff */ "huffpuff",
- /* 51 309 T_Iburst */ "iburst",
- /* 52 310 T_Ident */ "ident",
- /* 53 311 T_Ignore */ "ignore",
- /* 54 312 T_Incalloc */ "incalloc",
- /* 55 313 T_Incmem */ "incmem",
- /* 56 314 T_Initalloc */ "initalloc",
- /* 57 315 T_Initmem */ "initmem",
- /* 58 316 T_Includefile */ "includefile",
- /* 59 317 T_Integer */ NULL,
- /* 60 318 T_Interface */ "interface",
- /* 61 319 T_Intrange */ NULL,
- /* 62 320 T_Io */ "io",
- /* 63 321 T_Ipv4 */ "ipv4",
- /* 64 322 T_Ipv4_flag */ "-4",
- /* 65 323 T_Ipv6 */ "ipv6",
- /* 66 324 T_Ipv6_flag */ "-6",
- /* 67 325 T_Kernel */ "kernel",
- /* 68 326 T_Key */ "key",
- /* 69 327 T_Keys */ "keys",
- /* 70 328 T_Keysdir */ "keysdir",
- /* 71 329 T_Kod */ "kod",
- /* 72 330 T_Mssntp */ "mssntp",
- /* 73 331 T_Leapfile */ "leapfile",
- /* 74 332 T_Leapsmearinterval */ "leapsmearinterval",
- /* 75 333 T_Limited */ "limited",
- /* 76 334 T_Link */ "link",
- /* 77 335 T_Listen */ "listen",
- /* 78 336 T_Logconfig */ "logconfig",
- /* 79 337 T_Logfile */ "logfile",
- /* 80 338 T_Loopstats */ "loopstats",
- /* 81 339 T_Lowpriotrap */ "lowpriotrap",
- /* 82 340 T_Manycastclient */ "manycastclient",
- /* 83 341 T_Manycastserver */ "manycastserver",
- /* 84 342 T_Mask */ "mask",
- /* 85 343 T_Maxage */ "maxage",
- /* 86 344 T_Maxclock */ "maxclock",
- /* 87 345 T_Maxdepth */ "maxdepth",
- /* 88 346 T_Maxdist */ "maxdist",
- /* 89 347 T_Maxmem */ "maxmem",
- /* 90 348 T_Maxpoll */ "maxpoll",
- /* 91 349 T_Mdnstries */ "mdnstries",
- /* 92 350 T_Mem */ "mem",
- /* 93 351 T_Memlock */ "memlock",
- /* 94 352 T_Minclock */ "minclock",
- /* 95 353 T_Mindepth */ "mindepth",
- /* 96 354 T_Mindist */ "mindist",
- /* 97 355 T_Minimum */ "minimum",
- /* 98 356 T_Minpoll */ "minpoll",
- /* 99 357 T_Minsane */ "minsane",
- /* 100 358 T_Mode */ "mode",
- /* 101 359 T_Mode7 */ "mode7",
- /* 102 360 T_Monitor */ "monitor",
- /* 103 361 T_Month */ "month",
- /* 104 362 T_Mru */ "mru",
- /* 105 363 T_Multicastclient */ "multicastclient",
- /* 106 364 T_Nic */ "nic",
- /* 107 365 T_Nolink */ "nolink",
- /* 108 366 T_Nomodify */ "nomodify",
- /* 109 367 T_Nomrulist */ "nomrulist",
- /* 110 368 T_None */ "none",
- /* 111 369 T_Nonvolatile */ "nonvolatile",
- /* 112 370 T_Nopeer */ "nopeer",
- /* 113 371 T_Noquery */ "noquery",
- /* 114 372 T_Noselect */ "noselect",
- /* 115 373 T_Noserve */ "noserve",
- /* 116 374 T_Notrap */ "notrap",
- /* 117 375 T_Notrust */ "notrust",
- /* 118 376 T_Ntp */ "ntp",
- /* 119 377 T_Ntpport */ "ntpport",
- /* 120 378 T_NtpSignDsocket */ "ntpsigndsocket",
- /* 121 379 T_Orphan */ "orphan",
- /* 122 380 T_Orphanwait */ "orphanwait",
- /* 123 381 T_PCEdigest */ "peer_clear_digest_early",
- /* 124 382 T_Panic */ "panic",
- /* 125 383 T_Peer */ "peer",
- /* 126 384 T_Peerstats */ "peerstats",
- /* 127 385 T_Phone */ "phone",
- /* 128 386 T_Pid */ "pid",
- /* 129 387 T_Pidfile */ "pidfile",
- /* 130 388 T_Pool */ "pool",
- /* 131 389 T_Port */ "port",
- /* 132 390 T_Preempt */ "preempt",
- /* 133 391 T_Prefer */ "prefer",
- /* 134 392 T_Protostats */ "protostats",
- /* 135 393 T_Pw */ "pw",
- /* 136 394 T_Randfile */ "randfile",
- /* 137 395 T_Rawstats */ "rawstats",
- /* 138 396 T_Refid */ "refid",
- /* 139 397 T_Requestkey */ "requestkey",
- /* 140 398 T_Reset */ "reset",
- /* 141 399 T_Restrict */ "restrict",
- /* 142 400 T_Revoke */ "revoke",
- /* 143 401 T_Rlimit */ "rlimit",
- /* 144 402 T_Saveconfigdir */ "saveconfigdir",
- /* 145 403 T_Server */ "server",
- /* 146 404 T_Setvar */ "setvar",
- /* 147 405 T_Source */ "source",
- /* 148 406 T_Stacksize */ "stacksize",
- /* 149 407 T_Statistics */ "statistics",
- /* 150 408 T_Stats */ "stats",
- /* 151 409 T_Statsdir */ "statsdir",
- /* 152 410 T_Step */ "step",
- /* 153 411 T_Stepback */ "stepback",
- /* 154 412 T_Stepfwd */ "stepfwd",
- /* 155 413 T_Stepout */ "stepout",
- /* 156 414 T_Stratum */ "stratum",
- /* 157 415 T_String */ NULL,
- /* 158 416 T_Sys */ "sys",
- /* 159 417 T_Sysstats */ "sysstats",
- /* 160 418 T_Tick */ "tick",
- /* 161 419 T_Time1 */ "time1",
- /* 162 420 T_Time2 */ "time2",
- /* 163 421 T_Timer */ "timer",
- /* 164 422 T_Timingstats */ "timingstats",
- /* 165 423 T_Tinker */ "tinker",
- /* 166 424 T_Tos */ "tos",
- /* 167 425 T_Trap */ "trap",
- /* 168 426 T_True */ "true",
- /* 169 427 T_Trustedkey */ "trustedkey",
- /* 170 428 T_Ttl */ "ttl",
- /* 171 429 T_Type */ "type",
- /* 172 430 T_U_int */ NULL,
- /* 173 431 T_UEcrypto */ "unpeer_crypto_early",
- /* 174 432 T_UEcryptonak */ "unpeer_crypto_nak_early",
- /* 175 433 T_UEdigest */ "unpeer_digest_early",
- /* 176 434 T_Unconfig */ "unconfig",
- /* 177 435 T_Unpeer */ "unpeer",
- /* 178 436 T_Version */ "version",
- /* 179 437 T_WanderThreshold */ NULL,
- /* 180 438 T_Week */ "week",
- /* 181 439 T_Wildcard */ "wildcard",
- /* 182 440 T_Xleave */ "xleave",
- /* 183 441 T_Year */ "year",
- /* 184 442 T_Flag */ NULL,
- /* 185 443 T_EOC */ NULL,
- /* 186 444 T_Simulate */ "simulate",
- /* 187 445 T_Beep_Delay */ "beep_delay",
- /* 188 446 T_Sim_Duration */ "simulation_duration",
- /* 189 447 T_Server_Offset */ "server_offset",
- /* 190 448 T_Duration */ "duration",
- /* 191 449 T_Freq_Offset */ "freq_offset",
- /* 192 450 T_Wander */ "wander",
- /* 193 451 T_Jitter */ "jitter",
- /* 194 452 T_Prop_Delay */ "prop_delay",
- /* 195 453 T_Proc_Delay */ "proc_delay"
+ /* 9 267 T_Basedate */ "basedate",
+ /* 10 268 T_Bclient */ "bclient",
+ /* 11 269 T_Bcpollbstep */ "bcpollbstep",
+ /* 12 270 T_Beacon */ "beacon",
+ /* 13 271 T_Broadcast */ "broadcast",
+ /* 14 272 T_Broadcastclient */ "broadcastclient",
+ /* 15 273 T_Broadcastdelay */ "broadcastdelay",
+ /* 16 274 T_Burst */ "burst",
+ /* 17 275 T_Calibrate */ "calibrate",
+ /* 18 276 T_Ceiling */ "ceiling",
+ /* 19 277 T_Clockstats */ "clockstats",
+ /* 20 278 T_Cohort */ "cohort",
+ /* 21 279 T_ControlKey */ "controlkey",
+ /* 22 280 T_Crypto */ "crypto",
+ /* 23 281 T_Cryptostats */ "cryptostats",
+ /* 24 282 T_Ctl */ "ctl",
+ /* 25 283 T_Day */ "day",
+ /* 26 284 T_Default */ "default",
+ /* 27 285 T_Digest */ "digest",
+ /* 28 286 T_Disable */ "disable",
+ /* 29 287 T_Discard */ "discard",
+ /* 30 288 T_Dispersion */ "dispersion",
+ /* 31 289 T_Double */ NULL,
+ /* 32 290 T_Driftfile */ "driftfile",
+ /* 33 291 T_Drop */ "drop",
+ /* 34 292 T_Dscp */ "dscp",
+ /* 35 293 T_Ellipsis */ "...",
+ /* 36 294 T_Enable */ "enable",
+ /* 37 295 T_End */ "end",
+ /* 38 296 T_Epeer */ "epeer",
+ /* 39 297 T_False */ NULL,
+ /* 40 298 T_File */ "file",
+ /* 41 299 T_Filegen */ "filegen",
+ /* 42 300 T_Filenum */ "filenum",
+ /* 43 301 T_Flag1 */ "flag1",
+ /* 44 302 T_Flag2 */ "flag2",
+ /* 45 303 T_Flag3 */ "flag3",
+ /* 46 304 T_Flag4 */ "flag4",
+ /* 47 305 T_Flake */ "flake",
+ /* 48 306 T_Floor */ "floor",
+ /* 49 307 T_Freq */ "freq",
+ /* 50 308 T_Fudge */ "fudge",
+ /* 51 309 T_Host */ "host",
+ /* 52 310 T_Huffpuff */ "huffpuff",
+ /* 53 311 T_Iburst */ "iburst",
+ /* 54 312 T_Ident */ "ident",
+ /* 55 313 T_Ignore */ "ignore",
+ /* 56 314 T_Incalloc */ "incalloc",
+ /* 57 315 T_Incmem */ "incmem",
+ /* 58 316 T_Initalloc */ "initalloc",
+ /* 59 317 T_Initmem */ "initmem",
+ /* 60 318 T_Includefile */ "includefile",
+ /* 61 319 T_Integer */ NULL,
+ /* 62 320 T_Interface */ "interface",
+ /* 63 321 T_Intrange */ NULL,
+ /* 64 322 T_Io */ "io",
+ /* 65 323 T_Ippeerlimit */ "ippeerlimit",
+ /* 66 324 T_Ipv4 */ "ipv4",
+ /* 67 325 T_Ipv4_flag */ "-4",
+ /* 68 326 T_Ipv6 */ "ipv6",
+ /* 69 327 T_Ipv6_flag */ "-6",
+ /* 70 328 T_Kernel */ "kernel",
+ /* 71 329 T_Key */ "key",
+ /* 72 330 T_Keys */ "keys",
+ /* 73 331 T_Keysdir */ "keysdir",
+ /* 74 332 T_Kod */ "kod",
+ /* 75 333 T_Mssntp */ "mssntp",
+ /* 76 334 T_Leapfile */ "leapfile",
+ /* 77 335 T_Leapsmearinterval */ "leapsmearinterval",
+ /* 78 336 T_Limited */ "limited",
+ /* 79 337 T_Link */ "link",
+ /* 80 338 T_Listen */ "listen",
+ /* 81 339 T_Logconfig */ "logconfig",
+ /* 82 340 T_Logfile */ "logfile",
+ /* 83 341 T_Loopstats */ "loopstats",
+ /* 84 342 T_Lowpriotrap */ "lowpriotrap",
+ /* 85 343 T_Manycastclient */ "manycastclient",
+ /* 86 344 T_Manycastserver */ "manycastserver",
+ /* 87 345 T_Mask */ "mask",
+ /* 88 346 T_Maxage */ "maxage",
+ /* 89 347 T_Maxclock */ "maxclock",
+ /* 90 348 T_Maxdepth */ "maxdepth",
+ /* 91 349 T_Maxdist */ "maxdist",
+ /* 92 350 T_Maxmem */ "maxmem",
+ /* 93 351 T_Maxpoll */ "maxpoll",
+ /* 94 352 T_Mdnstries */ "mdnstries",
+ /* 95 353 T_Mem */ "mem",
+ /* 96 354 T_Memlock */ "memlock",
+ /* 97 355 T_Minclock */ "minclock",
+ /* 98 356 T_Mindepth */ "mindepth",
+ /* 99 357 T_Mindist */ "mindist",
+ /* 100 358 T_Minimum */ "minimum",
+ /* 101 359 T_Minpoll */ "minpoll",
+ /* 102 360 T_Minsane */ "minsane",
+ /* 103 361 T_Mode */ "mode",
+ /* 104 362 T_Mode7 */ "mode7",
+ /* 105 363 T_Monitor */ "monitor",
+ /* 106 364 T_Month */ "month",
+ /* 107 365 T_Mru */ "mru",
+ /* 108 366 T_Multicastclient */ "multicastclient",
+ /* 109 367 T_Nic */ "nic",
+ /* 110 368 T_Nolink */ "nolink",
+ /* 111 369 T_Nomodify */ "nomodify",
+ /* 112 370 T_Nomrulist */ "nomrulist",
+ /* 113 371 T_None */ "none",
+ /* 114 372 T_Nonvolatile */ "nonvolatile",
+ /* 115 373 T_Noepeer */ "noepeer",
+ /* 116 374 T_Nopeer */ "nopeer",
+ /* 117 375 T_Noquery */ "noquery",
+ /* 118 376 T_Noselect */ "noselect",
+ /* 119 377 T_Noserve */ "noserve",
+ /* 120 378 T_Notrap */ "notrap",
+ /* 121 379 T_Notrust */ "notrust",
+ /* 122 380 T_Ntp */ "ntp",
+ /* 123 381 T_Ntpport */ "ntpport",
+ /* 124 382 T_NtpSignDsocket */ "ntpsigndsocket",
+ /* 125 383 T_Orphan */ "orphan",
+ /* 126 384 T_Orphanwait */ "orphanwait",
+ /* 127 385 T_PCEdigest */ "peer_clear_digest_early",
+ /* 128 386 T_Panic */ "panic",
+ /* 129 387 T_Peer */ "peer",
+ /* 130 388 T_Peerstats */ "peerstats",
+ /* 131 389 T_Phone */ "phone",
+ /* 132 390 T_Pid */ "pid",
+ /* 133 391 T_Pidfile */ "pidfile",
+ /* 134 392 T_Pool */ "pool",
+ /* 135 393 T_Port */ "port",
+ /* 136 394 T_Preempt */ "preempt",
+ /* 137 395 T_Prefer */ "prefer",
+ /* 138 396 T_Protostats */ "protostats",
+ /* 139 397 T_Pw */ "pw",
+ /* 140 398 T_Randfile */ "randfile",
+ /* 141 399 T_Rawstats */ "rawstats",
+ /* 142 400 T_Refid */ "refid",
+ /* 143 401 T_Requestkey */ "requestkey",
+ /* 144 402 T_Reset */ "reset",
+ /* 145 403 T_Restrict */ "restrict",
+ /* 146 404 T_Revoke */ "revoke",
+ /* 147 405 T_Rlimit */ "rlimit",
+ /* 148 406 T_Saveconfigdir */ "saveconfigdir",
+ /* 149 407 T_Server */ "server",
+ /* 150 408 T_Setvar */ "setvar",
+ /* 151 409 T_Source */ "source",
+ /* 152 410 T_Stacksize */ "stacksize",
+ /* 153 411 T_Statistics */ "statistics",
+ /* 154 412 T_Stats */ "stats",
+ /* 155 413 T_Statsdir */ "statsdir",
+ /* 156 414 T_Step */ "step",
+ /* 157 415 T_Stepback */ "stepback",
+ /* 158 416 T_Stepfwd */ "stepfwd",
+ /* 159 417 T_Stepout */ "stepout",
+ /* 160 418 T_Stratum */ "stratum",
+ /* 161 419 T_String */ NULL,
+ /* 162 420 T_Sys */ "sys",
+ /* 163 421 T_Sysstats */ "sysstats",
+ /* 164 422 T_Tick */ "tick",
+ /* 165 423 T_Time1 */ "time1",
+ /* 166 424 T_Time2 */ "time2",
+ /* 167 425 T_Timer */ "timer",
+ /* 168 426 T_Timingstats */ "timingstats",
+ /* 169 427 T_Tinker */ "tinker",
+ /* 170 428 T_Tos */ "tos",
+ /* 171 429 T_Trap */ "trap",
+ /* 172 430 T_True */ "true",
+ /* 173 431 T_Trustedkey */ "trustedkey",
+ /* 174 432 T_Ttl */ "ttl",
+ /* 175 433 T_Type */ "type",
+ /* 176 434 T_U_int */ NULL,
+ /* 177 435 T_UEcrypto */ "unpeer_crypto_early",
+ /* 178 436 T_UEcryptonak */ "unpeer_crypto_nak_early",
+ /* 179 437 T_UEdigest */ "unpeer_digest_early",
+ /* 180 438 T_Unconfig */ "unconfig",
+ /* 181 439 T_Unpeer */ "unpeer",
+ /* 182 440 T_Version */ "version",
+ /* 183 441 T_WanderThreshold */ NULL,
+ /* 184 442 T_Week */ "week",
+ /* 185 443 T_Wildcard */ "wildcard",
+ /* 186 444 T_Xleave */ "xleave",
+ /* 187 445 T_Year */ "year",
+ /* 188 446 T_Flag */ NULL,
+ /* 189 447 T_EOC */ NULL,
+ /* 190 448 T_Simulate */ "simulate",
+ /* 191 449 T_Beep_Delay */ "beep_delay",
+ /* 192 450 T_Sim_Duration */ "simulation_duration",
+ /* 193 451 T_Server_Offset */ "server_offset",
+ /* 194 452 T_Duration */ "duration",
+ /* 195 453 T_Freq_Offset */ "freq_offset",
+ /* 196 454 T_Wander */ "wander",
+ /* 197 455 T_Jitter */ "jitter",
+ /* 198 456 T_Prop_Delay */ "prop_delay",
+ /* 199 457 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 915
+#define SCANNER_INIT_S 940
-const scan_state sst[918] = {
+const scan_state sst[943] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
- S_ST( '-', 3, 324, 0 ), /* 1 */
+ S_ST( '-', 3, 327, 0 ), /* 1 */
S_ST( '.', 3, 3, 1 ), /* 2 */
- S_ST( '.', 3, 292, 0 ), /* 3 . */
+ S_ST( '.', 3, 293, 0 ), /* 3 . */
S_ST( 'a', 3, 23, 2 ), /* 4 */
S_ST( 'b', 3, 6, 0 ), /* 5 a */
S_ST( 'b', 3, 7, 0 ), /* 6 ab */
@@ -241,236 +245,236 @@ const scan_state sst[918] = {
S_ST( 'r', 3, 26, 0 ), /* 25 ave */
S_ST( 'a', 3, 27, 0 ), /* 26 aver */
S_ST( 'g', 3, 266, 0 ), /* 27 avera */
- S_ST( 'b', 3, 69, 4 ), /* 28 */
- S_ST( 'c', 3, 34, 0 ), /* 29 b */
- S_ST( 'l', 3, 31, 0 ), /* 30 bc */
- S_ST( 'i', 3, 32, 0 ), /* 31 bcl */
- S_ST( 'e', 3, 33, 0 ), /* 32 bcli */
- S_ST( 'n', 3, 267, 0 ), /* 33 bclie */
- S_ST( 'p', 3, 35, 30 ), /* 34 bc */
- S_ST( 'o', 3, 36, 0 ), /* 35 bcp */
- S_ST( 'l', 3, 37, 0 ), /* 36 bcpo */
- S_ST( 'l', 3, 38, 0 ), /* 37 bcpol */
- S_ST( 'b', 3, 39, 0 ), /* 38 bcpoll */
- S_ST( 's', 3, 40, 0 ), /* 39 bcpollb */
- S_ST( 't', 3, 41, 0 ), /* 40 bcpollbs */
- S_ST( 'e', 3, 268, 0 ), /* 41 bcpollbst */
- S_ST( 'e', 3, 46, 29 ), /* 42 b */
- S_ST( 'a', 3, 44, 0 ), /* 43 be */
- S_ST( 'c', 3, 45, 0 ), /* 44 bea */
- S_ST( 'o', 3, 269, 0 ), /* 45 beac */
- S_ST( 'e', 3, 47, 43 ), /* 46 be */
- S_ST( 'p', 3, 48, 0 ), /* 47 bee */
- S_ST( '_', 3, 49, 0 ), /* 48 beep */
- S_ST( 'd', 3, 50, 0 ), /* 49 beep_ */
- S_ST( 'e', 3, 51, 0 ), /* 50 beep_d */
- S_ST( 'l', 3, 52, 0 ), /* 51 beep_de */
- S_ST( 'a', 3, 445, 0 ), /* 52 beep_del */
- S_ST( 'r', 3, 54, 42 ), /* 53 b */
- S_ST( 'o', 3, 55, 0 ), /* 54 br */
- S_ST( 'a', 3, 56, 0 ), /* 55 bro */
- S_ST( 'd', 3, 57, 0 ), /* 56 broa */
- S_ST( 'c', 3, 58, 0 ), /* 57 broad */
- S_ST( 'a', 3, 59, 0 ), /* 58 broadc */
- S_ST( 's', 3, 270, 0 ), /* 59 broadca */
- S_ST( 'c', 3, 61, 0 ), /* 60 broadcast */
- S_ST( 'l', 3, 62, 0 ), /* 61 broadcastc */
- S_ST( 'i', 3, 63, 0 ), /* 62 broadcastcl */
- S_ST( 'e', 3, 64, 0 ), /* 63 broadcastcli */
- S_ST( 'n', 3, 271, 0 ), /* 64 broadcastclie */
- S_ST( 'd', 3, 66, 60 ), /* 65 broadcast */
- S_ST( 'e', 3, 67, 0 ), /* 66 broadcastd */
- S_ST( 'l', 3, 68, 0 ), /* 67 broadcastde */
- S_ST( 'a', 3, 272, 0 ), /* 68 broadcastdel */
- S_ST( 'u', 3, 70, 53 ), /* 69 b */
- S_ST( 'r', 3, 71, 0 ), /* 70 bu */
- S_ST( 's', 3, 273, 0 ), /* 71 bur */
- S_ST( 'c', 3, 112, 28 ), /* 72 */
- S_ST( 'a', 3, 74, 0 ), /* 73 c */
- S_ST( 'l', 3, 75, 0 ), /* 74 ca */
- S_ST( 'i', 3, 76, 0 ), /* 75 cal */
- S_ST( 'b', 3, 77, 0 ), /* 76 cali */
- S_ST( 'r', 3, 78, 0 ), /* 77 calib */
- S_ST( 'a', 3, 79, 0 ), /* 78 calibr */
- S_ST( 't', 3, 274, 0 ), /* 79 calibra */
- S_ST( 'e', 3, 81, 73 ), /* 80 c */
- S_ST( 'i', 3, 82, 0 ), /* 81 ce */
- S_ST( 'l', 3, 83, 0 ), /* 82 cei */
- S_ST( 'i', 3, 84, 0 ), /* 83 ceil */
- S_ST( 'n', 3, 275, 0 ), /* 84 ceili */
- S_ST( 'l', 3, 86, 80 ), /* 85 c */
- S_ST( 'o', 3, 87, 0 ), /* 86 cl */
- S_ST( 'c', 3, 88, 0 ), /* 87 clo */
- S_ST( 'k', 3, 89, 0 ), /* 88 cloc */
- S_ST( 's', 3, 90, 0 ), /* 89 clock */
- S_ST( 't', 3, 91, 0 ), /* 90 clocks */
- S_ST( 'a', 3, 92, 0 ), /* 91 clockst */
- S_ST( 't', 3, 276, 0 ), /* 92 clocksta */
- S_ST( 'o', 3, 97, 85 ), /* 93 c */
- S_ST( 'h', 3, 95, 0 ), /* 94 co */
- S_ST( 'o', 3, 96, 0 ), /* 95 coh */
- S_ST( 'r', 3, 277, 0 ), /* 96 coho */
- S_ST( 'n', 3, 98, 94 ), /* 97 co */
- S_ST( 't', 3, 99, 0 ), /* 98 con */
- S_ST( 'r', 3, 100, 0 ), /* 99 cont */
- S_ST( 'o', 3, 101, 0 ), /* 100 contr */
- S_ST( 'l', 3, 102, 0 ), /* 101 contro */
- S_ST( 'k', 3, 103, 0 ), /* 102 control */
- S_ST( 'e', 3, 278, 0 ), /* 103 controlk */
- S_ST( 'r', 3, 105, 93 ), /* 104 c */
- S_ST( 'y', 3, 106, 0 ), /* 105 cr */
- S_ST( 'p', 3, 107, 0 ), /* 106 cry */
- S_ST( 't', 3, 279, 0 ), /* 107 cryp */
- S_ST( 's', 3, 109, 0 ), /* 108 crypto */
- S_ST( 't', 3, 110, 0 ), /* 109 cryptos */
- S_ST( 'a', 3, 111, 0 ), /* 110 cryptost */
- S_ST( 't', 3, 280, 0 ), /* 111 cryptosta */
- S_ST( 't', 3, 281, 104 ), /* 112 c */
- S_ST( 'd', 3, 147, 72 ), /* 113 */
- S_ST( 'a', 3, 282, 0 ), /* 114 d */
- S_ST( 'e', 3, 116, 114 ), /* 115 d */
- S_ST( 'f', 3, 117, 0 ), /* 116 de */
- S_ST( 'a', 3, 118, 0 ), /* 117 def */
- S_ST( 'u', 3, 119, 0 ), /* 118 defa */
- S_ST( 'l', 3, 283, 0 ), /* 119 defau */
- S_ST( 'i', 3, 124, 115 ), /* 120 d */
- S_ST( 'g', 3, 122, 0 ), /* 121 di */
- S_ST( 'e', 3, 123, 0 ), /* 122 dig */
- S_ST( 's', 3, 284, 0 ), /* 123 dige */
- S_ST( 's', 3, 131, 121 ), /* 124 di */
- S_ST( 'a', 3, 126, 0 ), /* 125 dis */
- S_ST( 'b', 3, 127, 0 ), /* 126 disa */
- S_ST( 'l', 3, 285, 0 ), /* 127 disab */
- S_ST( 'c', 3, 129, 125 ), /* 128 dis */
- S_ST( 'a', 3, 130, 0 ), /* 129 disc */
- S_ST( 'r', 3, 286, 0 ), /* 130 disca */
- S_ST( 'p', 3, 132, 128 ), /* 131 dis */
- S_ST( 'e', 3, 133, 0 ), /* 132 disp */
- S_ST( 'r', 3, 134, 0 ), /* 133 dispe */
- S_ST( 's', 3, 135, 0 ), /* 134 disper */
- S_ST( 'i', 3, 136, 0 ), /* 135 dispers */
- S_ST( 'o', 3, 287, 0 ), /* 136 dispersi */
- S_ST( 'r', 3, 144, 120 ), /* 137 d */
- S_ST( 'i', 3, 139, 0 ), /* 138 dr */
- S_ST( 'f', 3, 140, 0 ), /* 139 dri */
- S_ST( 't', 3, 141, 0 ), /* 140 drif */
- S_ST( 'f', 3, 142, 0 ), /* 141 drift */
- S_ST( 'i', 3, 143, 0 ), /* 142 driftf */
- S_ST( 'l', 3, 289, 0 ), /* 143 driftfi */
- S_ST( 'o', 3, 290, 138 ), /* 144 dr */
- S_ST( 's', 3, 146, 137 ), /* 145 d */
- S_ST( 'c', 3, 291, 0 ), /* 146 ds */
- S_ST( 'u', 3, 148, 145 ), /* 147 d */
- S_ST( 'r', 3, 149, 0 ), /* 148 du */
- S_ST( 'a', 3, 150, 0 ), /* 149 dur */
- S_ST( 't', 3, 151, 0 ), /* 150 dura */
- S_ST( 'i', 3, 152, 0 ), /* 151 durat */
- S_ST( 'o', 3, 448, 0 ), /* 152 durati */
- S_ST( 'e', 3, 154, 113 ), /* 153 */
- S_ST( 'n', 3, 294, 0 ), /* 154 e */
- S_ST( 'a', 3, 156, 0 ), /* 155 en */
- S_ST( 'b', 3, 157, 0 ), /* 156 ena */
- S_ST( 'l', 3, 293, 0 ), /* 157 enab */
- S_ST( 'f', 3, 179, 153 ), /* 158 */
- S_ST( 'i', 3, 160, 0 ), /* 159 f */
- S_ST( 'l', 3, 296, 0 ), /* 160 fi */
- S_ST( 'g', 3, 162, 0 ), /* 161 file */
- S_ST( 'e', 3, 297, 0 ), /* 162 fileg */
- S_ST( 'n', 3, 164, 161 ), /* 163 file */
- S_ST( 'u', 3, 298, 0 ), /* 164 filen */
- S_ST( 'l', 3, 169, 159 ), /* 165 f */
- S_ST( 'a', 3, 168, 0 ), /* 166 fl */
- S_ST( 'g', 3, 302, 0 ), /* 167 fla */
- S_ST( 'k', 3, 303, 167 ), /* 168 fla */
- S_ST( 'o', 3, 170, 166 ), /* 169 fl */
- S_ST( 'o', 3, 304, 0 ), /* 170 flo */
- S_ST( 'r', 3, 172, 165 ), /* 171 f */
- S_ST( 'e', 3, 305, 0 ), /* 172 fr */
- S_ST( '_', 3, 174, 0 ), /* 173 freq */
- S_ST( 'o', 3, 175, 0 ), /* 174 freq_ */
- S_ST( 'f', 3, 176, 0 ), /* 175 freq_o */
- S_ST( 'f', 3, 177, 0 ), /* 176 freq_of */
- S_ST( 's', 3, 178, 0 ), /* 177 freq_off */
- S_ST( 'e', 3, 449, 0 ), /* 178 freq_offs */
- S_ST( 'u', 3, 180, 171 ), /* 179 f */
- S_ST( 'd', 3, 181, 0 ), /* 180 fu */
- S_ST( 'g', 3, 306, 0 ), /* 181 fud */
- S_ST( 'h', 3, 185, 158 ), /* 182 */
- S_ST( 'o', 3, 184, 0 ), /* 183 h */
- S_ST( 's', 3, 307, 0 ), /* 184 ho */
- S_ST( 'u', 3, 186, 183 ), /* 185 h */
- S_ST( 'f', 3, 187, 0 ), /* 186 hu */
- S_ST( 'f', 3, 188, 0 ), /* 187 huf */
- S_ST( 'p', 3, 189, 0 ), /* 188 huff */
- S_ST( 'u', 3, 190, 0 ), /* 189 huffp */
- S_ST( 'f', 3, 308, 0 ), /* 190 huffpu */
- S_ST( 'i', 3, 232, 182 ), /* 191 */
- S_ST( 'b', 3, 193, 0 ), /* 192 i */
- S_ST( 'u', 3, 194, 0 ), /* 193 ib */
- S_ST( 'r', 3, 195, 0 ), /* 194 ibu */
- S_ST( 's', 3, 309, 0 ), /* 195 ibur */
- S_ST( 'd', 3, 197, 192 ), /* 196 i */
- S_ST( 'e', 3, 198, 0 ), /* 197 id */
- S_ST( 'n', 3, 310, 0 ), /* 198 ide */
- S_ST( 'g', 3, 200, 196 ), /* 199 i */
- S_ST( 'n', 3, 201, 0 ), /* 200 ig */
- S_ST( 'o', 3, 202, 0 ), /* 201 ign */
- S_ST( 'r', 3, 311, 0 ), /* 202 igno */
- S_ST( 'n', 3, 226, 199 ), /* 203 i */
- S_ST( 'c', 3, 216, 0 ), /* 204 in */
- S_ST( 'a', 3, 206, 0 ), /* 205 inc */
- S_ST( 'l', 3, 207, 0 ), /* 206 inca */
- S_ST( 'l', 3, 208, 0 ), /* 207 incal */
- S_ST( 'o', 3, 312, 0 ), /* 208 incall */
- S_ST( 'l', 3, 210, 205 ), /* 209 inc */
- S_ST( 'u', 3, 211, 0 ), /* 210 incl */
- S_ST( 'd', 3, 212, 0 ), /* 211 inclu */
- S_ST( 'e', 3, 213, 0 ), /* 212 includ */
- S_ST( 'f', 3, 214, 0 ), /* 213 include */
- S_ST( 'i', 3, 215, 0 ), /* 214 includef */
- S_ST( 'l', 3, 316, 0 ), /* 215 includefi */
- S_ST( 'm', 3, 217, 209 ), /* 216 inc */
- S_ST( 'e', 3, 313, 0 ), /* 217 incm */
- S_ST( 'i', 3, 219, 204 ), /* 218 in */
- S_ST( 't', 3, 224, 0 ), /* 219 ini */
- S_ST( 'a', 3, 221, 0 ), /* 220 init */
- S_ST( 'l', 3, 222, 0 ), /* 221 inita */
- S_ST( 'l', 3, 223, 0 ), /* 222 inital */
- S_ST( 'o', 3, 314, 0 ), /* 223 initall */
- S_ST( 'm', 3, 225, 220 ), /* 224 init */
- S_ST( 'e', 3, 315, 0 ), /* 225 initm */
- S_ST( 't', 3, 227, 218 ), /* 226 in */
- S_ST( 'e', 3, 228, 0 ), /* 227 int */
- S_ST( 'r', 3, 229, 0 ), /* 228 inte */
- S_ST( 'f', 3, 230, 0 ), /* 229 inter */
- S_ST( 'a', 3, 231, 0 ), /* 230 interf */
- S_ST( 'c', 3, 318, 0 ), /* 231 interfa */
- S_ST( 'p', 3, 233, 320 ), /* 232 i */
- S_ST( 'v', 3, 323, 0 ), /* 233 ip */
- S_ST( 'j', 3, 235, 191 ), /* 234 */
- S_ST( 'i', 3, 236, 0 ), /* 235 j */
- S_ST( 't', 3, 237, 0 ), /* 236 ji */
- S_ST( 't', 3, 238, 0 ), /* 237 jit */
- S_ST( 'e', 3, 451, 0 ), /* 238 jitt */
- S_ST( 'k', 3, 246, 234 ), /* 239 */
- S_ST( 'e', 3, 326, 0 ), /* 240 k */
- S_ST( 'r', 3, 242, 0 ), /* 241 ke */
- S_ST( 'n', 3, 243, 0 ), /* 242 ker */
- S_ST( 'e', 3, 325, 0 ), /* 243 kern */
- S_ST( 'd', 3, 245, 0 ), /* 244 keys */
- S_ST( 'i', 3, 328, 0 ), /* 245 keysd */
- S_ST( 'o', 3, 329, 240 ), /* 246 k */
- S_ST( 'l', 3, 462, 239 ), /* 247 */
- S_ST( 'e', 3, 249, 0 ), /* 248 l */
- S_ST( 'a', 3, 250, 0 ), /* 249 le */
- S_ST( 'p', 3, 254, 0 ), /* 250 lea */
- S_ST( 'f', 3, 252, 0 ), /* 251 leap */
- S_ST( 'i', 3, 253, 0 ), /* 252 leapf */
- S_ST( 'l', 3, 331, 0 ), /* 253 leapfi */
- S_ST( 's', 3, 255, 251 ), /* 254 leap */
- S_ST( 'm', 3, 256, 0 ), /* 255 leaps */
- S_ST( 'e', 3, 257, 0 ), /* 256 leapsm */
- S_ST( 'a', 3, 288, 0 ), /* 257 leapsme */
+ S_ST( 'b', 3, 75, 4 ), /* 28 */
+ S_ST( 'a', 3, 30, 0 ), /* 29 b */
+ S_ST( 's', 3, 31, 0 ), /* 30 ba */
+ S_ST( 'e', 3, 32, 0 ), /* 31 bas */
+ S_ST( 'd', 3, 33, 0 ), /* 32 base */
+ S_ST( 'a', 3, 34, 0 ), /* 33 based */
+ S_ST( 't', 3, 267, 0 ), /* 34 baseda */
+ S_ST( 'c', 3, 40, 29 ), /* 35 b */
+ S_ST( 'l', 3, 37, 0 ), /* 36 bc */
+ S_ST( 'i', 3, 38, 0 ), /* 37 bcl */
+ S_ST( 'e', 3, 39, 0 ), /* 38 bcli */
+ S_ST( 'n', 3, 268, 0 ), /* 39 bclie */
+ S_ST( 'p', 3, 41, 36 ), /* 40 bc */
+ S_ST( 'o', 3, 42, 0 ), /* 41 bcp */
+ S_ST( 'l', 3, 43, 0 ), /* 42 bcpo */
+ S_ST( 'l', 3, 44, 0 ), /* 43 bcpol */
+ S_ST( 'b', 3, 45, 0 ), /* 44 bcpoll */
+ S_ST( 's', 3, 46, 0 ), /* 45 bcpollb */
+ S_ST( 't', 3, 47, 0 ), /* 46 bcpollbs */
+ S_ST( 'e', 3, 269, 0 ), /* 47 bcpollbst */
+ S_ST( 'e', 3, 52, 35 ), /* 48 b */
+ S_ST( 'a', 3, 50, 0 ), /* 49 be */
+ S_ST( 'c', 3, 51, 0 ), /* 50 bea */
+ S_ST( 'o', 3, 270, 0 ), /* 51 beac */
+ S_ST( 'e', 3, 53, 49 ), /* 52 be */
+ S_ST( 'p', 3, 54, 0 ), /* 53 bee */
+ S_ST( '_', 3, 55, 0 ), /* 54 beep */
+ S_ST( 'd', 3, 56, 0 ), /* 55 beep_ */
+ S_ST( 'e', 3, 57, 0 ), /* 56 beep_d */
+ S_ST( 'l', 3, 58, 0 ), /* 57 beep_de */
+ S_ST( 'a', 3, 449, 0 ), /* 58 beep_del */
+ S_ST( 'r', 3, 60, 48 ), /* 59 b */
+ S_ST( 'o', 3, 61, 0 ), /* 60 br */
+ S_ST( 'a', 3, 62, 0 ), /* 61 bro */
+ S_ST( 'd', 3, 63, 0 ), /* 62 broa */
+ S_ST( 'c', 3, 64, 0 ), /* 63 broad */
+ S_ST( 'a', 3, 65, 0 ), /* 64 broadc */
+ S_ST( 's', 3, 271, 0 ), /* 65 broadca */
+ S_ST( 'c', 3, 67, 0 ), /* 66 broadcast */
+ S_ST( 'l', 3, 68, 0 ), /* 67 broadcastc */
+ S_ST( 'i', 3, 69, 0 ), /* 68 broadcastcl */
+ S_ST( 'e', 3, 70, 0 ), /* 69 broadcastcli */
+ S_ST( 'n', 3, 272, 0 ), /* 70 broadcastclie */
+ S_ST( 'd', 3, 72, 66 ), /* 71 broadcast */
+ S_ST( 'e', 3, 73, 0 ), /* 72 broadcastd */
+ S_ST( 'l', 3, 74, 0 ), /* 73 broadcastde */
+ S_ST( 'a', 3, 273, 0 ), /* 74 broadcastdel */
+ S_ST( 'u', 3, 76, 59 ), /* 75 b */
+ S_ST( 'r', 3, 77, 0 ), /* 76 bu */
+ S_ST( 's', 3, 274, 0 ), /* 77 bur */
+ S_ST( 'c', 3, 118, 28 ), /* 78 */
+ S_ST( 'a', 3, 80, 0 ), /* 79 c */
+ S_ST( 'l', 3, 81, 0 ), /* 80 ca */
+ S_ST( 'i', 3, 82, 0 ), /* 81 cal */
+ S_ST( 'b', 3, 83, 0 ), /* 82 cali */
+ S_ST( 'r', 3, 84, 0 ), /* 83 calib */
+ S_ST( 'a', 3, 85, 0 ), /* 84 calibr */
+ S_ST( 't', 3, 275, 0 ), /* 85 calibra */
+ S_ST( 'e', 3, 87, 79 ), /* 86 c */
+ S_ST( 'i', 3, 88, 0 ), /* 87 ce */
+ S_ST( 'l', 3, 89, 0 ), /* 88 cei */
+ S_ST( 'i', 3, 90, 0 ), /* 89 ceil */
+ S_ST( 'n', 3, 276, 0 ), /* 90 ceili */
+ S_ST( 'l', 3, 92, 86 ), /* 91 c */
+ S_ST( 'o', 3, 93, 0 ), /* 92 cl */
+ S_ST( 'c', 3, 94, 0 ), /* 93 clo */
+ S_ST( 'k', 3, 95, 0 ), /* 94 cloc */
+ S_ST( 's', 3, 96, 0 ), /* 95 clock */
+ S_ST( 't', 3, 97, 0 ), /* 96 clocks */
+ S_ST( 'a', 3, 98, 0 ), /* 97 clockst */
+ S_ST( 't', 3, 277, 0 ), /* 98 clocksta */
+ S_ST( 'o', 3, 103, 91 ), /* 99 c */
+ S_ST( 'h', 3, 101, 0 ), /* 100 co */
+ S_ST( 'o', 3, 102, 0 ), /* 101 coh */
+ S_ST( 'r', 3, 278, 0 ), /* 102 coho */
+ S_ST( 'n', 3, 104, 100 ), /* 103 co */
+ S_ST( 't', 3, 105, 0 ), /* 104 con */
+ S_ST( 'r', 3, 106, 0 ), /* 105 cont */
+ S_ST( 'o', 3, 107, 0 ), /* 106 contr */
+ S_ST( 'l', 3, 108, 0 ), /* 107 contro */
+ S_ST( 'k', 3, 109, 0 ), /* 108 control */
+ S_ST( 'e', 3, 279, 0 ), /* 109 controlk */
+ S_ST( 'r', 3, 111, 99 ), /* 110 c */
+ S_ST( 'y', 3, 112, 0 ), /* 111 cr */
+ S_ST( 'p', 3, 113, 0 ), /* 112 cry */
+ S_ST( 't', 3, 280, 0 ), /* 113 cryp */
+ S_ST( 's', 3, 115, 0 ), /* 114 crypto */
+ S_ST( 't', 3, 116, 0 ), /* 115 cryptos */
+ S_ST( 'a', 3, 117, 0 ), /* 116 cryptost */
+ S_ST( 't', 3, 281, 0 ), /* 117 cryptosta */
+ S_ST( 't', 3, 282, 110 ), /* 118 c */
+ S_ST( 'd', 3, 153, 78 ), /* 119 */
+ S_ST( 'a', 3, 283, 0 ), /* 120 d */
+ S_ST( 'e', 3, 122, 120 ), /* 121 d */
+ S_ST( 'f', 3, 123, 0 ), /* 122 de */
+ S_ST( 'a', 3, 124, 0 ), /* 123 def */
+ S_ST( 'u', 3, 125, 0 ), /* 124 defa */
+ S_ST( 'l', 3, 284, 0 ), /* 125 defau */
+ S_ST( 'i', 3, 130, 121 ), /* 126 d */
+ S_ST( 'g', 3, 128, 0 ), /* 127 di */
+ S_ST( 'e', 3, 129, 0 ), /* 128 dig */
+ S_ST( 's', 3, 285, 0 ), /* 129 dige */
+ S_ST( 's', 3, 137, 127 ), /* 130 di */
+ S_ST( 'a', 3, 132, 0 ), /* 131 dis */
+ S_ST( 'b', 3, 133, 0 ), /* 132 disa */
+ S_ST( 'l', 3, 286, 0 ), /* 133 disab */
+ S_ST( 'c', 3, 135, 131 ), /* 134 dis */
+ S_ST( 'a', 3, 136, 0 ), /* 135 disc */
+ S_ST( 'r', 3, 287, 0 ), /* 136 disca */
+ S_ST( 'p', 3, 138, 134 ), /* 137 dis */
+ S_ST( 'e', 3, 139, 0 ), /* 138 disp */
+ S_ST( 'r', 3, 140, 0 ), /* 139 dispe */
+ S_ST( 's', 3, 141, 0 ), /* 140 disper */
+ S_ST( 'i', 3, 142, 0 ), /* 141 dispers */
+ S_ST( 'o', 3, 288, 0 ), /* 142 dispersi */
+ S_ST( 'r', 3, 150, 126 ), /* 143 d */
+ S_ST( 'i', 3, 145, 0 ), /* 144 dr */
+ S_ST( 'f', 3, 146, 0 ), /* 145 dri */
+ S_ST( 't', 3, 147, 0 ), /* 146 drif */
+ S_ST( 'f', 3, 148, 0 ), /* 147 drift */
+ S_ST( 'i', 3, 149, 0 ), /* 148 driftf */
+ S_ST( 'l', 3, 290, 0 ), /* 149 driftfi */
+ S_ST( 'o', 3, 291, 144 ), /* 150 dr */
+ S_ST( 's', 3, 152, 143 ), /* 151 d */
+ S_ST( 'c', 3, 292, 0 ), /* 152 ds */
+ S_ST( 'u', 3, 154, 151 ), /* 153 d */
+ S_ST( 'r', 3, 155, 0 ), /* 154 du */
+ S_ST( 'a', 3, 156, 0 ), /* 155 dur */
+ S_ST( 't', 3, 157, 0 ), /* 156 dura */
+ S_ST( 'i', 3, 158, 0 ), /* 157 durat */
+ S_ST( 'o', 3, 452, 0 ), /* 158 durati */
+ S_ST( 'e', 3, 164, 119 ), /* 159 */
+ S_ST( 'n', 3, 295, 0 ), /* 160 e */
+ S_ST( 'a', 3, 162, 0 ), /* 161 en */
+ S_ST( 'b', 3, 163, 0 ), /* 162 ena */
+ S_ST( 'l', 3, 294, 0 ), /* 163 enab */
+ S_ST( 'p', 3, 165, 160 ), /* 164 e */
+ S_ST( 'e', 3, 166, 0 ), /* 165 ep */
+ S_ST( 'e', 3, 296, 0 ), /* 166 epe */
+ S_ST( 'f', 3, 188, 159 ), /* 167 */
+ S_ST( 'i', 3, 169, 0 ), /* 168 f */
+ S_ST( 'l', 3, 298, 0 ), /* 169 fi */
+ S_ST( 'g', 3, 171, 0 ), /* 170 file */
+ S_ST( 'e', 3, 299, 0 ), /* 171 fileg */
+ S_ST( 'n', 3, 173, 170 ), /* 172 file */
+ S_ST( 'u', 3, 300, 0 ), /* 173 filen */
+ S_ST( 'l', 3, 178, 168 ), /* 174 f */
+ S_ST( 'a', 3, 177, 0 ), /* 175 fl */
+ S_ST( 'g', 3, 304, 0 ), /* 176 fla */
+ S_ST( 'k', 3, 305, 176 ), /* 177 fla */
+ S_ST( 'o', 3, 179, 175 ), /* 178 fl */
+ S_ST( 'o', 3, 306, 0 ), /* 179 flo */
+ S_ST( 'r', 3, 181, 174 ), /* 180 f */
+ S_ST( 'e', 3, 307, 0 ), /* 181 fr */
+ S_ST( '_', 3, 183, 0 ), /* 182 freq */
+ S_ST( 'o', 3, 184, 0 ), /* 183 freq_ */
+ S_ST( 'f', 3, 185, 0 ), /* 184 freq_o */
+ S_ST( 'f', 3, 186, 0 ), /* 185 freq_of */
+ S_ST( 's', 3, 187, 0 ), /* 186 freq_off */
+ S_ST( 'e', 3, 453, 0 ), /* 187 freq_offs */
+ S_ST( 'u', 3, 189, 180 ), /* 188 f */
+ S_ST( 'd', 3, 190, 0 ), /* 189 fu */
+ S_ST( 'g', 3, 308, 0 ), /* 190 fud */
+ S_ST( 'h', 3, 194, 167 ), /* 191 */
+ S_ST( 'o', 3, 193, 0 ), /* 192 h */
+ S_ST( 's', 3, 309, 0 ), /* 193 ho */
+ S_ST( 'u', 3, 195, 192 ), /* 194 h */
+ S_ST( 'f', 3, 196, 0 ), /* 195 hu */
+ S_ST( 'f', 3, 197, 0 ), /* 196 huf */
+ S_ST( 'p', 3, 198, 0 ), /* 197 huff */
+ S_ST( 'u', 3, 199, 0 ), /* 198 huffp */
+ S_ST( 'f', 3, 310, 0 ), /* 199 huffpu */
+ S_ST( 'i', 3, 241, 191 ), /* 200 */
+ S_ST( 'b', 3, 202, 0 ), /* 201 i */
+ S_ST( 'u', 3, 203, 0 ), /* 202 ib */
+ S_ST( 'r', 3, 204, 0 ), /* 203 ibu */
+ S_ST( 's', 3, 311, 0 ), /* 204 ibur */
+ S_ST( 'd', 3, 206, 201 ), /* 205 i */
+ S_ST( 'e', 3, 207, 0 ), /* 206 id */
+ S_ST( 'n', 3, 312, 0 ), /* 207 ide */
+ S_ST( 'g', 3, 209, 205 ), /* 208 i */
+ S_ST( 'n', 3, 210, 0 ), /* 209 ig */
+ S_ST( 'o', 3, 211, 0 ), /* 210 ign */
+ S_ST( 'r', 3, 313, 0 ), /* 211 igno */
+ S_ST( 'n', 3, 235, 208 ), /* 212 i */
+ S_ST( 'c', 3, 225, 0 ), /* 213 in */
+ S_ST( 'a', 3, 215, 0 ), /* 214 inc */
+ S_ST( 'l', 3, 216, 0 ), /* 215 inca */
+ S_ST( 'l', 3, 217, 0 ), /* 216 incal */
+ S_ST( 'o', 3, 314, 0 ), /* 217 incall */
+ S_ST( 'l', 3, 219, 214 ), /* 218 inc */
+ S_ST( 'u', 3, 220, 0 ), /* 219 incl */
+ S_ST( 'd', 3, 221, 0 ), /* 220 inclu */
+ S_ST( 'e', 3, 222, 0 ), /* 221 includ */
+ S_ST( 'f', 3, 223, 0 ), /* 222 include */
+ S_ST( 'i', 3, 224, 0 ), /* 223 includef */
+ S_ST( 'l', 3, 318, 0 ), /* 224 includefi */
+ S_ST( 'm', 3, 226, 218 ), /* 225 inc */
+ S_ST( 'e', 3, 315, 0 ), /* 226 incm */
+ S_ST( 'i', 3, 228, 213 ), /* 227 in */
+ S_ST( 't', 3, 233, 0 ), /* 228 ini */
+ S_ST( 'a', 3, 230, 0 ), /* 229 init */
+ S_ST( 'l', 3, 231, 0 ), /* 230 inita */
+ S_ST( 'l', 3, 232, 0 ), /* 231 inital */
+ S_ST( 'o', 3, 316, 0 ), /* 232 initall */
+ S_ST( 'm', 3, 234, 229 ), /* 233 init */
+ S_ST( 'e', 3, 317, 0 ), /* 234 initm */
+ S_ST( 't', 3, 236, 227 ), /* 235 in */
+ S_ST( 'e', 3, 237, 0 ), /* 236 int */
+ S_ST( 'r', 3, 238, 0 ), /* 237 inte */
+ S_ST( 'f', 3, 239, 0 ), /* 238 inter */
+ S_ST( 'a', 3, 240, 0 ), /* 239 interf */
+ S_ST( 'c', 3, 320, 0 ), /* 240 interfa */
+ S_ST( 'p', 3, 250, 322 ), /* 241 i */
+ S_ST( 'p', 3, 243, 0 ), /* 242 ip */
+ S_ST( 'e', 3, 244, 0 ), /* 243 ipp */
+ S_ST( 'e', 3, 245, 0 ), /* 244 ippe */
+ S_ST( 'r', 3, 246, 0 ), /* 245 ippee */
+ S_ST( 'l', 3, 247, 0 ), /* 246 ippeer */
+ S_ST( 'i', 3, 248, 0 ), /* 247 ippeerl */
+ S_ST( 'm', 3, 249, 0 ), /* 248 ippeerli */
+ S_ST( 'i', 3, 323, 0 ), /* 249 ippeerlim */
+ S_ST( 'v', 3, 326, 242 ), /* 250 ip */
+ S_ST( 'j', 3, 252, 200 ), /* 251 */
+ S_ST( 'i', 3, 253, 0 ), /* 252 j */
+ S_ST( 't', 3, 254, 0 ), /* 253 ji */
+ S_ST( 't', 3, 255, 0 ), /* 254 jit */
+ S_ST( 'e', 3, 455, 0 ), /* 255 jitt */
+ S_ST( 'k', 3, 434, 251 ), /* 256 */
+ S_ST( 'e', 3, 329, 0 ), /* 257 k */
S_ST( 'v', 1, 0, 0 ), /* 258 T_Abbrev */
S_ST( 'e', 0, 0, 0 ), /* 259 T_Age */
S_ST( 'l', 0, 12, 0 ), /* 260 T_All */
@@ -480,656 +484,681 @@ const scan_state sst[918] = {
S_ST( 'y', 0, 0, 0 ), /* 264 T_Autokey */
S_ST( 'x', 0, 0, 0 ), /* 265 T_Automax */
S_ST( 'e', 0, 0, 0 ), /* 266 T_Average */
- S_ST( 't', 0, 0, 0 ), /* 267 T_Bclient */
- S_ST( 'p', 0, 0, 0 ), /* 268 T_Bcpollbstep */
- S_ST( 'n', 0, 0, 0 ), /* 269 T_Beacon */
- S_ST( 't', 1, 65, 0 ), /* 270 T_Broadcast */
- S_ST( 't', 0, 0, 0 ), /* 271 T_Broadcastclient */
- S_ST( 'y', 0, 0, 0 ), /* 272 T_Broadcastdelay */
- S_ST( 't', 0, 0, 0 ), /* 273 T_Burst */
- S_ST( 'e', 0, 0, 0 ), /* 274 T_Calibrate */
- S_ST( 'g', 0, 0, 0 ), /* 275 T_Ceiling */
- S_ST( 's', 0, 0, 0 ), /* 276 T_Clockstats */
- S_ST( 't', 0, 0, 0 ), /* 277 T_Cohort */
- S_ST( 'y', 0, 0, 0 ), /* 278 T_ControlKey */
- S_ST( 'o', 0, 108, 0 ), /* 279 T_Crypto */
- S_ST( 's', 0, 0, 0 ), /* 280 T_Cryptostats */
- S_ST( 'l', 0, 0, 0 ), /* 281 T_Ctl */
- S_ST( 'y', 0, 0, 0 ), /* 282 T_Day */
- S_ST( 't', 0, 0, 0 ), /* 283 T_Default */
- S_ST( 't', 1, 0, 0 ), /* 284 T_Digest */
- S_ST( 'e', 0, 0, 0 ), /* 285 T_Disable */
- S_ST( 'd', 0, 0, 0 ), /* 286 T_Discard */
- S_ST( 'n', 0, 0, 0 ), /* 287 T_Dispersion */
- S_ST( 'r', 3, 295, 0 ), /* 288 leapsmea */
- S_ST( 'e', 1, 0, 0 ), /* 289 T_Driftfile */
- S_ST( 'p', 0, 0, 0 ), /* 290 T_Drop */
- S_ST( 'p', 0, 0, 0 ), /* 291 T_Dscp */
- S_ST( '.', 0, 0, 0 ), /* 292 T_Ellipsis */
- S_ST( 'e', 0, 0, 0 ), /* 293 T_Enable */
- S_ST( 'd', 0, 0, 155 ), /* 294 T_End */
- S_ST( 'i', 3, 317, 0 ), /* 295 leapsmear */
- S_ST( 'e', 1, 163, 0 ), /* 296 T_File */
- S_ST( 'n', 0, 0, 0 ), /* 297 T_Filegen */
- S_ST( 'm', 0, 0, 0 ), /* 298 T_Filenum */
- S_ST( '1', 0, 0, 0 ), /* 299 T_Flag1 */
- S_ST( '2', 0, 0, 299 ), /* 300 T_Flag2 */
- S_ST( '3', 0, 0, 300 ), /* 301 T_Flag3 */
- S_ST( '4', 0, 0, 301 ), /* 302 T_Flag4 */
- S_ST( 'e', 0, 0, 0 ), /* 303 T_Flake */
- S_ST( 'r', 0, 0, 0 ), /* 304 T_Floor */
- S_ST( 'q', 0, 173, 0 ), /* 305 T_Freq */
- S_ST( 'e', 1, 0, 0 ), /* 306 T_Fudge */
- S_ST( 't', 1, 0, 0 ), /* 307 T_Host */
- S_ST( 'f', 0, 0, 0 ), /* 308 T_Huffpuff */
- S_ST( 't', 0, 0, 0 ), /* 309 T_Iburst */
- S_ST( 't', 1, 0, 0 ), /* 310 T_Ident */
- S_ST( 'e', 0, 0, 0 ), /* 311 T_Ignore */
- S_ST( 'c', 0, 0, 0 ), /* 312 T_Incalloc */
- S_ST( 'm', 0, 0, 0 ), /* 313 T_Incmem */
- S_ST( 'c', 0, 0, 0 ), /* 314 T_Initalloc */
- S_ST( 'm', 0, 0, 0 ), /* 315 T_Initmem */
- S_ST( 'e', 1, 0, 0 ), /* 316 T_Includefile */
- S_ST( 'n', 3, 319, 0 ), /* 317 leapsmeari */
- S_ST( 'e', 0, 0, 0 ), /* 318 T_Interface */
- S_ST( 't', 3, 415, 0 ), /* 319 leapsmearin */
- S_ST( 'o', 0, 0, 203 ), /* 320 T_Io */
- S_ST( '4', 0, 0, 0 ), /* 321 T_Ipv4 */
- S_ST( '4', 0, 0, 0 ), /* 322 T_Ipv4_flag */
- S_ST( '6', 0, 0, 321 ), /* 323 T_Ipv6 */
- S_ST( '6', 0, 0, 322 ), /* 324 T_Ipv6_flag */
- S_ST( 'l', 0, 0, 0 ), /* 325 T_Kernel */
- S_ST( 'y', 0, 327, 241 ), /* 326 T_Key */
- S_ST( 's', 1, 244, 0 ), /* 327 T_Keys */
- S_ST( 'r', 1, 0, 0 ), /* 328 T_Keysdir */
- S_ST( 'd', 0, 0, 0 ), /* 329 T_Kod */
- S_ST( 'p', 0, 0, 0 ), /* 330 T_Mssntp */
- S_ST( 'e', 1, 0, 0 ), /* 331 T_Leapfile */
- S_ST( 'l', 0, 0, 0 ), /* 332 T_Leapsmearinterval */
- S_ST( 'd', 0, 0, 0 ), /* 333 T_Limited */
- S_ST( 'k', 0, 0, 0 ), /* 334 T_Link */
- S_ST( 'n', 0, 0, 0 ), /* 335 T_Listen */
- S_ST( 'g', 2, 0, 0 ), /* 336 T_Logconfig */
- S_ST( 'e', 1, 0, 0 ), /* 337 T_Logfile */
- S_ST( 's', 0, 0, 0 ), /* 338 T_Loopstats */
- S_ST( 'p', 0, 0, 0 ), /* 339 T_Lowpriotrap */
- S_ST( 't', 1, 0, 0 ), /* 340 T_Manycastclient */
- S_ST( 'r', 2, 0, 0 ), /* 341 T_Manycastserver */
- S_ST( 'k', 0, 0, 0 ), /* 342 T_Mask */
- S_ST( 'e', 0, 0, 0 ), /* 343 T_Maxage */
- S_ST( 'k', 0, 0, 0 ), /* 344 T_Maxclock */
- S_ST( 'h', 0, 0, 0 ), /* 345 T_Maxdepth */
- S_ST( 't', 0, 0, 0 ), /* 346 T_Maxdist */
- S_ST( 'm', 0, 0, 0 ), /* 347 T_Maxmem */
- S_ST( 'l', 0, 0, 0 ), /* 348 T_Maxpoll */
- S_ST( 's', 0, 0, 0 ), /* 349 T_Mdnstries */
- S_ST( 'm', 0, 531, 0 ), /* 350 T_Mem */
- S_ST( 'k', 0, 0, 0 ), /* 351 T_Memlock */
- S_ST( 'k', 0, 0, 0 ), /* 352 T_Minclock */
- S_ST( 'h', 0, 0, 0 ), /* 353 T_Mindepth */
- S_ST( 't', 0, 0, 0 ), /* 354 T_Mindist */
- S_ST( 'm', 0, 0, 0 ), /* 355 T_Minimum */
- S_ST( 'l', 0, 0, 0 ), /* 356 T_Minpoll */
- S_ST( 'e', 0, 0, 0 ), /* 357 T_Minsane */
- S_ST( 'e', 0, 359, 0 ), /* 358 T_Mode */
- S_ST( '7', 0, 0, 0 ), /* 359 T_Mode7 */
- S_ST( 'r', 0, 0, 0 ), /* 360 T_Monitor */
- S_ST( 'h', 0, 0, 0 ), /* 361 T_Month */
- S_ST( 'u', 0, 0, 0 ), /* 362 T_Mru */
- S_ST( 't', 2, 0, 0 ), /* 363 T_Multicastclient */
- S_ST( 'c', 0, 0, 0 ), /* 364 T_Nic */
- S_ST( 'k', 0, 0, 0 ), /* 365 T_Nolink */
- S_ST( 'y', 0, 0, 0 ), /* 366 T_Nomodify */
- S_ST( 't', 0, 0, 0 ), /* 367 T_Nomrulist */
- S_ST( 'e', 0, 0, 0 ), /* 368 T_None */
- S_ST( 'e', 0, 0, 0 ), /* 369 T_Nonvolatile */
- S_ST( 'r', 0, 0, 0 ), /* 370 T_Nopeer */
- S_ST( 'y', 0, 0, 0 ), /* 371 T_Noquery */
- S_ST( 't', 0, 0, 0 ), /* 372 T_Noselect */
- S_ST( 'e', 0, 0, 0 ), /* 373 T_Noserve */
- S_ST( 'p', 0, 0, 0 ), /* 374 T_Notrap */
- S_ST( 't', 0, 0, 0 ), /* 375 T_Notrust */
- S_ST( 'p', 0, 627, 0 ), /* 376 T_Ntp */
- S_ST( 't', 0, 0, 0 ), /* 377 T_Ntpport */
- S_ST( 't', 1, 0, 0 ), /* 378 T_NtpSignDsocket */
- S_ST( 'n', 0, 642, 0 ), /* 379 T_Orphan */
- S_ST( 't', 0, 0, 0 ), /* 380 T_Orphanwait */
- S_ST( 'y', 0, 0, 0 ), /* 381 T_PCEdigest */
- S_ST( 'c', 0, 0, 0 ), /* 382 T_Panic */
- S_ST( 'r', 1, 669, 0 ), /* 383 T_Peer */
- S_ST( 's', 0, 0, 0 ), /* 384 T_Peerstats */
- S_ST( 'e', 2, 0, 0 ), /* 385 T_Phone */
- S_ST( 'd', 0, 677, 0 ), /* 386 T_Pid */
- S_ST( 'e', 1, 0, 0 ), /* 387 T_Pidfile */
- S_ST( 'l', 1, 0, 0 ), /* 388 T_Pool */
- S_ST( 't', 0, 0, 0 ), /* 389 T_Port */
- S_ST( 't', 0, 0, 0 ), /* 390 T_Preempt */
- S_ST( 'r', 0, 0, 0 ), /* 391 T_Prefer */
- S_ST( 's', 0, 0, 0 ), /* 392 T_Protostats */
- S_ST( 'w', 1, 0, 683 ), /* 393 T_Pw */
- S_ST( 'e', 1, 0, 0 ), /* 394 T_Randfile */
- S_ST( 's', 0, 0, 0 ), /* 395 T_Rawstats */
- S_ST( 'd', 1, 0, 0 ), /* 396 T_Refid */
- S_ST( 'y', 0, 0, 0 ), /* 397 T_Requestkey */
- S_ST( 't', 0, 0, 0 ), /* 398 T_Reset */
- S_ST( 't', 0, 0, 0 ), /* 399 T_Restrict */
- S_ST( 'e', 0, 0, 0 ), /* 400 T_Revoke */
- S_ST( 't', 0, 0, 0 ), /* 401 T_Rlimit */
- S_ST( 'r', 1, 0, 0 ), /* 402 T_Saveconfigdir */
- S_ST( 'r', 1, 760, 0 ), /* 403 T_Server */
- S_ST( 'r', 1, 0, 0 ), /* 404 T_Setvar */
- S_ST( 'e', 0, 0, 0 ), /* 405 T_Source */
- S_ST( 'e', 0, 0, 0 ), /* 406 T_Stacksize */
- S_ST( 's', 0, 0, 0 ), /* 407 T_Statistics */
- S_ST( 's', 0, 803, 798 ), /* 408 T_Stats */
- S_ST( 'r', 1, 0, 0 ), /* 409 T_Statsdir */
- S_ST( 'p', 0, 811, 0 ), /* 410 T_Step */
- S_ST( 'k', 0, 0, 0 ), /* 411 T_Stepback */
- S_ST( 'd', 0, 0, 0 ), /* 412 T_Stepfwd */
- S_ST( 't', 0, 0, 0 ), /* 413 T_Stepout */
- S_ST( 'm', 0, 0, 0 ), /* 414 T_Stratum */
- S_ST( 'e', 3, 430, 0 ), /* 415 leapsmearint */
- S_ST( 's', 0, 818, 0 ), /* 416 T_Sys */
- S_ST( 's', 0, 0, 0 ), /* 417 T_Sysstats */
- S_ST( 'k', 0, 0, 0 ), /* 418 T_Tick */
- S_ST( '1', 0, 0, 0 ), /* 419 T_Time1 */
- S_ST( '2', 0, 0, 419 ), /* 420 T_Time2 */
- S_ST( 'r', 0, 0, 420 ), /* 421 T_Timer */
- S_ST( 's', 0, 0, 0 ), /* 422 T_Timingstats */
- S_ST( 'r', 0, 0, 0 ), /* 423 T_Tinker */
- S_ST( 's', 0, 0, 0 ), /* 424 T_Tos */
- S_ST( 'p', 1, 0, 0 ), /* 425 T_Trap */
- S_ST( 'e', 0, 0, 0 ), /* 426 T_True */
- S_ST( 'y', 0, 0, 0 ), /* 427 T_Trustedkey */
- S_ST( 'l', 0, 0, 0 ), /* 428 T_Ttl */
- S_ST( 'e', 0, 0, 0 ), /* 429 T_Type */
- S_ST( 'r', 3, 437, 0 ), /* 430 leapsmearinte */
- S_ST( 'y', 0, 0, 0 ), /* 431 T_UEcrypto */
- S_ST( 'y', 0, 0, 0 ), /* 432 T_UEcryptonak */
- S_ST( 'y', 0, 0, 0 ), /* 433 T_UEdigest */
- S_ST( 'g', 1, 0, 0 ), /* 434 T_Unconfig */
- S_ST( 'r', 1, 860, 0 ), /* 435 T_Unpeer */
- S_ST( 'n', 0, 0, 0 ), /* 436 T_Version */
- S_ST( 'v', 3, 442, 0 ), /* 437 leapsmearinter */
- S_ST( 'k', 0, 0, 0 ), /* 438 T_Week */
- S_ST( 'd', 0, 0, 0 ), /* 439 T_Wildcard */
- S_ST( 'e', 0, 0, 0 ), /* 440 T_Xleave */
- S_ST( 'r', 0, 0, 0 ), /* 441 T_Year */
- S_ST( 'a', 3, 332, 0 ), /* 442 leapsmearinterv */
- S_ST( 'i', 3, 459, 248 ), /* 443 l */
- S_ST( 'e', 0, 0, 0 ), /* 444 T_Simulate */
- S_ST( 'y', 0, 0, 0 ), /* 445 T_Beep_Delay */
- S_ST( 'n', 0, 0, 0 ), /* 446 T_Sim_Duration */
- S_ST( 't', 0, 0, 0 ), /* 447 T_Server_Offset */
- S_ST( 'n', 0, 0, 0 ), /* 448 T_Duration */
- S_ST( 't', 0, 0, 0 ), /* 449 T_Freq_Offset */
- S_ST( 'r', 0, 0, 0 ), /* 450 T_Wander */
- S_ST( 'r', 0, 0, 0 ), /* 451 T_Jitter */
- S_ST( 'y', 0, 0, 0 ), /* 452 T_Prop_Delay */
- S_ST( 'y', 0, 0, 0 ), /* 453 T_Proc_Delay */
- S_ST( 'm', 3, 455, 0 ), /* 454 li */
- S_ST( 'i', 3, 456, 0 ), /* 455 lim */
- S_ST( 't', 3, 457, 0 ), /* 456 limi */
- S_ST( 'e', 3, 333, 0 ), /* 457 limit */
- S_ST( 'n', 3, 334, 454 ), /* 458 li */
- S_ST( 's', 3, 460, 458 ), /* 459 li */
- S_ST( 't', 3, 461, 0 ), /* 460 lis */
- S_ST( 'e', 3, 335, 0 ), /* 461 list */
- S_ST( 'o', 3, 478, 443 ), /* 462 l */
- S_ST( 'g', 3, 469, 0 ), /* 463 lo */
- S_ST( 'c', 3, 465, 0 ), /* 464 log */
- S_ST( 'o', 3, 466, 0 ), /* 465 logc */
- S_ST( 'n', 3, 467, 0 ), /* 466 logco */
- S_ST( 'f', 3, 468, 0 ), /* 467 logcon */
- S_ST( 'i', 3, 336, 0 ), /* 468 logconf */
- S_ST( 'f', 3, 470, 464 ), /* 469 log */
- S_ST( 'i', 3, 471, 0 ), /* 470 logf */
- S_ST( 'l', 3, 337, 0 ), /* 471 logfi */
- S_ST( 'o', 3, 473, 463 ), /* 472 lo */
- S_ST( 'p', 3, 474, 0 ), /* 473 loo */
- S_ST( 's', 3, 475, 0 ), /* 474 loop */
- S_ST( 't', 3, 476, 0 ), /* 475 loops */
- S_ST( 'a', 3, 477, 0 ), /* 476 loopst */
- S_ST( 't', 3, 338, 0 ), /* 477 loopsta */
- S_ST( 'w', 3, 479, 472 ), /* 478 lo */
- S_ST( 'p', 3, 480, 0 ), /* 479 low */
- S_ST( 'r', 3, 481, 0 ), /* 480 lowp */
- S_ST( 'i', 3, 482, 0 ), /* 481 lowpr */
- S_ST( 'o', 3, 483, 0 ), /* 482 lowpri */
- S_ST( 't', 3, 484, 0 ), /* 483 lowprio */
- S_ST( 'r', 3, 485, 0 ), /* 484 lowpriot */
- S_ST( 'a', 3, 339, 0 ), /* 485 lowpriotr */
- S_ST( 'm', 3, 567, 247 ), /* 486 */
- S_ST( 'a', 3, 505, 0 ), /* 487 m */
- S_ST( 'n', 3, 489, 0 ), /* 488 ma */
- S_ST( 'y', 3, 490, 0 ), /* 489 man */
- S_ST( 'c', 3, 491, 0 ), /* 490 many */
- S_ST( 'a', 3, 492, 0 ), /* 491 manyc */
- S_ST( 's', 3, 493, 0 ), /* 492 manyca */
- S_ST( 't', 3, 499, 0 ), /* 493 manycas */
- S_ST( 'c', 3, 495, 0 ), /* 494 manycast */
- S_ST( 'l', 3, 496, 0 ), /* 495 manycastc */
- S_ST( 'i', 3, 497, 0 ), /* 496 manycastcl */
- S_ST( 'e', 3, 498, 0 ), /* 497 manycastcli */
- S_ST( 'n', 3, 340, 0 ), /* 498 manycastclie */
- S_ST( 's', 3, 500, 494 ), /* 499 manycast */
- S_ST( 'e', 3, 501, 0 ), /* 500 manycasts */
- S_ST( 'r', 3, 502, 0 ), /* 501 manycastse */
- S_ST( 'v', 3, 503, 0 ), /* 502 manycastser */
- S_ST( 'e', 3, 341, 0 ), /* 503 manycastserv */
- S_ST( 's', 3, 342, 488 ), /* 504 ma */
- S_ST( 'x', 3, 520, 504 ), /* 505 ma */
- S_ST( 'a', 3, 507, 0 ), /* 506 max */
- S_ST( 'g', 3, 343, 0 ), /* 507 maxa */
- S_ST( 'c', 3, 509, 506 ), /* 508 max */
- S_ST( 'l', 3, 510, 0 ), /* 509 maxc */
- S_ST( 'o', 3, 511, 0 ), /* 510 maxcl */
- S_ST( 'c', 3, 344, 0 ), /* 511 maxclo */
- S_ST( 'd', 3, 516, 508 ), /* 512 max */
- S_ST( 'e', 3, 514, 0 ), /* 513 maxd */
- S_ST( 'p', 3, 515, 0 ), /* 514 maxde */
- S_ST( 't', 3, 345, 0 ), /* 515 maxdep */
- S_ST( 'i', 3, 517, 513 ), /* 516 maxd */
- S_ST( 's', 3, 346, 0 ), /* 517 maxdi */
- S_ST( 'm', 3, 519, 512 ), /* 518 max */
- S_ST( 'e', 3, 347, 0 ), /* 519 maxm */
- S_ST( 'p', 3, 521, 518 ), /* 520 max */
- S_ST( 'o', 3, 522, 0 ), /* 521 maxp */
- S_ST( 'l', 3, 348, 0 ), /* 522 maxpo */
- S_ST( 'd', 3, 524, 487 ), /* 523 m */
- S_ST( 'n', 3, 525, 0 ), /* 524 md */
- S_ST( 's', 3, 526, 0 ), /* 525 mdn */
- S_ST( 't', 3, 527, 0 ), /* 526 mdns */
- S_ST( 'r', 3, 528, 0 ), /* 527 mdnst */
- S_ST( 'i', 3, 529, 0 ), /* 528 mdnstr */
- S_ST( 'e', 3, 349, 0 ), /* 529 mdnstri */
- S_ST( 'e', 3, 350, 523 ), /* 530 m */
- S_ST( 'l', 3, 532, 0 ), /* 531 mem */
- S_ST( 'o', 3, 533, 0 ), /* 532 meml */
- S_ST( 'c', 3, 351, 0 ), /* 533 memlo */
- S_ST( 'i', 3, 535, 530 ), /* 534 m */
- S_ST( 'n', 3, 552, 0 ), /* 535 mi */
- S_ST( 'c', 3, 537, 0 ), /* 536 min */
- S_ST( 'l', 3, 538, 0 ), /* 537 minc */
- S_ST( 'o', 3, 539, 0 ), /* 538 mincl */
- S_ST( 'c', 3, 352, 0 ), /* 539 minclo */
- S_ST( 'd', 3, 544, 536 ), /* 540 min */
- S_ST( 'e', 3, 542, 0 ), /* 541 mind */
- S_ST( 'p', 3, 543, 0 ), /* 542 minde */
- S_ST( 't', 3, 353, 0 ), /* 543 mindep */
- S_ST( 'i', 3, 545, 541 ), /* 544 mind */
- S_ST( 's', 3, 354, 0 ), /* 545 mindi */
- S_ST( 'i', 3, 547, 540 ), /* 546 min */
- S_ST( 'm', 3, 548, 0 ), /* 547 mini */
- S_ST( 'u', 3, 355, 0 ), /* 548 minim */
- S_ST( 'p', 3, 550, 546 ), /* 549 min */
- S_ST( 'o', 3, 551, 0 ), /* 550 minp */
- S_ST( 'l', 3, 356, 0 ), /* 551 minpo */
- S_ST( 's', 3, 553, 549 ), /* 552 min */
- S_ST( 'a', 3, 554, 0 ), /* 553 mins */
- S_ST( 'n', 3, 357, 0 ), /* 554 minsa */
- S_ST( 'o', 3, 557, 534 ), /* 555 m */
- S_ST( 'd', 3, 358, 0 ), /* 556 mo */
- S_ST( 'n', 3, 561, 556 ), /* 557 mo */
- S_ST( 'i', 3, 559, 0 ), /* 558 mon */
- S_ST( 't', 3, 560, 0 ), /* 559 moni */
- S_ST( 'o', 3, 360, 0 ), /* 560 monit */
- S_ST( 't', 3, 361, 558 ), /* 561 mon */
- S_ST( 'r', 3, 362, 555 ), /* 562 m */
- S_ST( 's', 3, 564, 562 ), /* 563 m */
- S_ST( 's', 3, 565, 0 ), /* 564 ms */
- S_ST( 'n', 3, 566, 0 ), /* 565 mss */
- S_ST( 't', 3, 330, 0 ), /* 566 mssn */
- S_ST( 'u', 3, 568, 563 ), /* 567 m */
- S_ST( 'l', 3, 569, 0 ), /* 568 mu */
- S_ST( 't', 3, 570, 0 ), /* 569 mul */
- S_ST( 'i', 3, 571, 0 ), /* 570 mult */
- S_ST( 'c', 3, 572, 0 ), /* 571 multi */
- S_ST( 'a', 3, 573, 0 ), /* 572 multic */
- S_ST( 's', 3, 574, 0 ), /* 573 multica */
- S_ST( 't', 3, 575, 0 ), /* 574 multicas */
- S_ST( 'c', 3, 576, 0 ), /* 575 multicast */
- S_ST( 'l', 3, 577, 0 ), /* 576 multicastc */
- S_ST( 'i', 3, 578, 0 ), /* 577 multicastcl */
- S_ST( 'e', 3, 579, 0 ), /* 578 multicastcli */
- S_ST( 'n', 3, 363, 0 ), /* 579 multicastclie */
- S_ST( 'n', 3, 623, 486 ), /* 580 */
- S_ST( 'i', 3, 364, 0 ), /* 581 n */
- S_ST( 'o', 3, 618, 581 ), /* 582 n */
- S_ST( 'l', 3, 584, 0 ), /* 583 no */
- S_ST( 'i', 3, 585, 0 ), /* 584 nol */
- S_ST( 'n', 3, 365, 0 ), /* 585 noli */
- S_ST( 'm', 3, 591, 583 ), /* 586 no */
- S_ST( 'o', 3, 588, 0 ), /* 587 nom */
- S_ST( 'd', 3, 589, 0 ), /* 588 nomo */
- S_ST( 'i', 3, 590, 0 ), /* 589 nomod */
- S_ST( 'f', 3, 366, 0 ), /* 590 nomodi */
- S_ST( 'r', 3, 592, 587 ), /* 591 nom */
- S_ST( 'u', 3, 593, 0 ), /* 592 nomr */
- S_ST( 'l', 3, 594, 0 ), /* 593 nomru */
- S_ST( 'i', 3, 595, 0 ), /* 594 nomrul */
- S_ST( 's', 3, 367, 0 ), /* 595 nomruli */
- S_ST( 'n', 3, 597, 586 ), /* 596 no */
- S_ST( 'v', 3, 598, 368 ), /* 597 non */
- S_ST( 'o', 3, 599, 0 ), /* 598 nonv */
- S_ST( 'l', 3, 600, 0 ), /* 599 nonvo */
- S_ST( 'a', 3, 601, 0 ), /* 600 nonvol */
- S_ST( 't', 3, 602, 0 ), /* 601 nonvola */
- S_ST( 'i', 3, 603, 0 ), /* 602 nonvolat */
- S_ST( 'l', 3, 369, 0 ), /* 603 nonvolati */
- S_ST( 'p', 3, 605, 596 ), /* 604 no */
- S_ST( 'e', 3, 606, 0 ), /* 605 nop */
- S_ST( 'e', 3, 370, 0 ), /* 606 nope */
- S_ST( 'q', 3, 608, 604 ), /* 607 no */
- S_ST( 'u', 3, 609, 0 ), /* 608 noq */
- S_ST( 'e', 3, 610, 0 ), /* 609 noqu */
- S_ST( 'r', 3, 371, 0 ), /* 610 noque */
- S_ST( 's', 3, 612, 607 ), /* 611 no */
- S_ST( 'e', 3, 616, 0 ), /* 612 nos */
- S_ST( 'l', 3, 614, 0 ), /* 613 nose */
- S_ST( 'e', 3, 615, 0 ), /* 614 nosel */
- S_ST( 'c', 3, 372, 0 ), /* 615 nosele */
- S_ST( 'r', 3, 617, 613 ), /* 616 nose */
- S_ST( 'v', 3, 373, 0 ), /* 617 noser */
- S_ST( 't', 3, 619, 611 ), /* 618 no */
- S_ST( 'r', 3, 621, 0 ), /* 619 not */
- S_ST( 'a', 3, 374, 0 ), /* 620 notr */
- S_ST( 'u', 3, 622, 620 ), /* 621 notr */
- S_ST( 's', 3, 375, 0 ), /* 622 notru */
- S_ST( 't', 3, 376, 582 ), /* 623 n */
- S_ST( 'p', 3, 625, 0 ), /* 624 ntp */
- S_ST( 'o', 3, 626, 0 ), /* 625 ntpp */
- S_ST( 'r', 3, 377, 0 ), /* 626 ntppo */
- S_ST( 's', 3, 628, 624 ), /* 627 ntp */
- S_ST( 'i', 3, 629, 0 ), /* 628 ntps */
- S_ST( 'g', 3, 630, 0 ), /* 629 ntpsi */
- S_ST( 'n', 3, 631, 0 ), /* 630 ntpsig */
- S_ST( 'd', 3, 632, 0 ), /* 631 ntpsign */
- S_ST( 's', 3, 633, 0 ), /* 632 ntpsignd */
- S_ST( 'o', 3, 634, 0 ), /* 633 ntpsignds */
- S_ST( 'c', 3, 635, 0 ), /* 634 ntpsigndso */
- S_ST( 'k', 3, 636, 0 ), /* 635 ntpsigndsoc */
- S_ST( 'e', 3, 378, 0 ), /* 636 ntpsigndsock */
- S_ST( 'o', 3, 638, 580 ), /* 637 */
- S_ST( 'r', 3, 639, 0 ), /* 638 o */
- S_ST( 'p', 3, 640, 0 ), /* 639 or */
- S_ST( 'h', 3, 641, 0 ), /* 640 orp */
- S_ST( 'a', 3, 379, 0 ), /* 641 orph */
- S_ST( 'w', 3, 643, 0 ), /* 642 orphan */
- S_ST( 'a', 3, 644, 0 ), /* 643 orphanw */
- S_ST( 'i', 3, 380, 0 ), /* 644 orphanwa */
- S_ST( 'p', 3, 393, 637 ), /* 645 */
- S_ST( 'a', 3, 647, 0 ), /* 646 p */
- S_ST( 'n', 3, 648, 0 ), /* 647 pa */
- S_ST( 'i', 3, 382, 0 ), /* 648 pan */
- S_ST( 'e', 3, 650, 646 ), /* 649 p */
- S_ST( 'e', 3, 383, 0 ), /* 650 pe */
- S_ST( '_', 3, 652, 0 ), /* 651 peer */
- S_ST( 'c', 3, 653, 0 ), /* 652 peer_ */
- S_ST( 'l', 3, 654, 0 ), /* 653 peer_c */
- S_ST( 'e', 3, 655, 0 ), /* 654 peer_cl */
- S_ST( 'a', 3, 656, 0 ), /* 655 peer_cle */
- S_ST( 'r', 3, 657, 0 ), /* 656 peer_clea */
- S_ST( '_', 3, 658, 0 ), /* 657 peer_clear */
- S_ST( 'd', 3, 659, 0 ), /* 658 peer_clear_ */
- S_ST( 'i', 3, 660, 0 ), /* 659 peer_clear_d */
- S_ST( 'g', 3, 661, 0 ), /* 660 peer_clear_di */
- S_ST( 'e', 3, 662, 0 ), /* 661 peer_clear_dig */
- S_ST( 's', 3, 663, 0 ), /* 662 peer_clear_dige */
- S_ST( 't', 3, 664, 0 ), /* 663 peer_clear_diges */
- S_ST( '_', 3, 665, 0 ), /* 664 peer_clear_digest */
- S_ST( 'e', 3, 666, 0 ), /* 665 peer_clear_digest_ */
- S_ST( 'a', 3, 667, 0 ), /* 666 peer_clear_digest_e */
- S_ST( 'r', 3, 668, 0 ), /* 667 peer_clear_digest_ea */
- S_ST( 'l', 3, 381, 0 ), /* 668 peer_clear_digest_ear */
- S_ST( 's', 3, 670, 651 ), /* 669 peer */
- S_ST( 't', 3, 671, 0 ), /* 670 peers */
- S_ST( 'a', 3, 672, 0 ), /* 671 peerst */
- S_ST( 't', 3, 384, 0 ), /* 672 peersta */
- S_ST( 'h', 3, 674, 649 ), /* 673 p */
- S_ST( 'o', 3, 675, 0 ), /* 674 ph */
- S_ST( 'n', 3, 385, 0 ), /* 675 pho */
- S_ST( 'i', 3, 386, 673 ), /* 676 p */
- S_ST( 'f', 3, 678, 0 ), /* 677 pid */
- S_ST( 'i', 3, 679, 0 ), /* 678 pidf */
- S_ST( 'l', 3, 387, 0 ), /* 679 pidfi */
- S_ST( 'o', 3, 682, 676 ), /* 680 p */
- S_ST( 'o', 3, 388, 0 ), /* 681 po */
- S_ST( 'r', 3, 389, 681 ), /* 682 po */
- S_ST( 'r', 3, 690, 680 ), /* 683 p */
- S_ST( 'e', 3, 688, 0 ), /* 684 pr */
- S_ST( 'e', 3, 686, 0 ), /* 685 pre */
- S_ST( 'm', 3, 687, 0 ), /* 686 pree */
- S_ST( 'p', 3, 390, 0 ), /* 687 preem */
- S_ST( 'f', 3, 689, 685 ), /* 688 pre */
- S_ST( 'e', 3, 391, 0 ), /* 689 pref */
- S_ST( 'o', 3, 703, 684 ), /* 690 pr */
- S_ST( 'c', 3, 692, 0 ), /* 691 pro */
- S_ST( '_', 3, 693, 0 ), /* 692 proc */
- S_ST( 'd', 3, 694, 0 ), /* 693 proc_ */
- S_ST( 'e', 3, 695, 0 ), /* 694 proc_d */
- S_ST( 'l', 3, 696, 0 ), /* 695 proc_de */
- S_ST( 'a', 3, 453, 0 ), /* 696 proc_del */
- S_ST( 'p', 3, 698, 691 ), /* 697 pro */
- S_ST( '_', 3, 699, 0 ), /* 698 prop */
- S_ST( 'd', 3, 700, 0 ), /* 699 prop_ */
- S_ST( 'e', 3, 701, 0 ), /* 700 prop_d */
- S_ST( 'l', 3, 702, 0 ), /* 701 prop_de */
- S_ST( 'a', 3, 452, 0 ), /* 702 prop_del */
- S_ST( 't', 3, 704, 697 ), /* 703 pro */
- S_ST( 'o', 3, 705, 0 ), /* 704 prot */
- S_ST( 's', 3, 706, 0 ), /* 705 proto */
- S_ST( 't', 3, 707, 0 ), /* 706 protos */
- S_ST( 'a', 3, 708, 0 ), /* 707 protost */
- S_ST( 't', 3, 392, 0 ), /* 708 protosta */
- S_ST( 'r', 3, 740, 645 ), /* 709 */
- S_ST( 'a', 3, 716, 0 ), /* 710 r */
- S_ST( 'n', 3, 712, 0 ), /* 711 ra */
- S_ST( 'd', 3, 713, 0 ), /* 712 ran */
- S_ST( 'f', 3, 714, 0 ), /* 713 rand */
- S_ST( 'i', 3, 715, 0 ), /* 714 randf */
- S_ST( 'l', 3, 394, 0 ), /* 715 randfi */
- S_ST( 'w', 3, 717, 711 ), /* 716 ra */
- S_ST( 's', 3, 718, 0 ), /* 717 raw */
- S_ST( 't', 3, 719, 0 ), /* 718 raws */
- S_ST( 'a', 3, 720, 0 ), /* 719 rawst */
- S_ST( 't', 3, 395, 0 ), /* 720 rawsta */
- S_ST( 'e', 3, 737, 710 ), /* 721 r */
- S_ST( 'f', 3, 723, 0 ), /* 722 re */
- S_ST( 'i', 3, 396, 0 ), /* 723 ref */
- S_ST( 'q', 3, 725, 722 ), /* 724 re */
- S_ST( 'u', 3, 726, 0 ), /* 725 req */
- S_ST( 'e', 3, 727, 0 ), /* 726 requ */
- S_ST( 's', 3, 728, 0 ), /* 727 reque */
- S_ST( 't', 3, 729, 0 ), /* 728 reques */
- S_ST( 'k', 3, 730, 0 ), /* 729 request */
- S_ST( 'e', 3, 397, 0 ), /* 730 requestk */
- S_ST( 's', 3, 733, 724 ), /* 731 re */
- S_ST( 'e', 3, 398, 0 ), /* 732 res */
- S_ST( 't', 3, 734, 732 ), /* 733 res */
- S_ST( 'r', 3, 735, 0 ), /* 734 rest */
- S_ST( 'i', 3, 736, 0 ), /* 735 restr */
- S_ST( 'c', 3, 399, 0 ), /* 736 restri */
- S_ST( 'v', 3, 738, 731 ), /* 737 re */
- S_ST( 'o', 3, 739, 0 ), /* 738 rev */
- S_ST( 'k', 3, 400, 0 ), /* 739 revo */
- S_ST( 'l', 3, 741, 721 ), /* 740 r */
- S_ST( 'i', 3, 742, 0 ), /* 741 rl */
- S_ST( 'm', 3, 743, 0 ), /* 742 rli */
- S_ST( 'i', 3, 401, 0 ), /* 743 rlim */
- S_ST( 's', 3, 817, 709 ), /* 744 */
- S_ST( 'a', 3, 746, 0 ), /* 745 s */
- S_ST( 'v', 3, 747, 0 ), /* 746 sa */
- S_ST( 'e', 3, 748, 0 ), /* 747 sav */
- S_ST( 'c', 3, 749, 0 ), /* 748 save */
- S_ST( 'o', 3, 750, 0 ), /* 749 savec */
- S_ST( 'n', 3, 751, 0 ), /* 750 saveco */
- S_ST( 'f', 3, 752, 0 ), /* 751 savecon */
- S_ST( 'i', 3, 753, 0 ), /* 752 saveconf */
- S_ST( 'g', 3, 754, 0 ), /* 753 saveconfi */
- S_ST( 'd', 3, 755, 0 ), /* 754 saveconfig */
- S_ST( 'i', 3, 402, 0 ), /* 755 saveconfigd */
- S_ST( 'e', 3, 766, 745 ), /* 756 s */
- S_ST( 'r', 3, 758, 0 ), /* 757 se */
- S_ST( 'v', 3, 759, 0 ), /* 758 ser */
- S_ST( 'e', 3, 403, 0 ), /* 759 serv */
- S_ST( '_', 3, 761, 0 ), /* 760 server */
- S_ST( 'o', 3, 762, 0 ), /* 761 server_ */
- S_ST( 'f', 3, 763, 0 ), /* 762 server_o */
- S_ST( 'f', 3, 764, 0 ), /* 763 server_of */
- S_ST( 's', 3, 765, 0 ), /* 764 server_off */
- S_ST( 'e', 3, 447, 0 ), /* 765 server_offs */
- S_ST( 't', 3, 767, 757 ), /* 766 se */
- S_ST( 'v', 3, 768, 0 ), /* 767 set */
- S_ST( 'a', 3, 404, 0 ), /* 768 setv */
- S_ST( 'i', 3, 770, 756 ), /* 769 s */
- S_ST( 'm', 3, 771, 0 ), /* 770 si */
- S_ST( 'u', 3, 772, 0 ), /* 771 sim */
- S_ST( 'l', 3, 773, 0 ), /* 772 simu */
- S_ST( 'a', 3, 774, 0 ), /* 773 simul */
- S_ST( 't', 3, 775, 0 ), /* 774 simula */
- S_ST( 'i', 3, 776, 444 ), /* 775 simulat */
- S_ST( 'o', 3, 777, 0 ), /* 776 simulati */
- S_ST( 'n', 3, 778, 0 ), /* 777 simulatio */
- S_ST( '_', 3, 779, 0 ), /* 778 simulation */
- S_ST( 'd', 3, 780, 0 ), /* 779 simulation_ */
- S_ST( 'u', 3, 781, 0 ), /* 780 simulation_d */
- S_ST( 'r', 3, 782, 0 ), /* 781 simulation_du */
- S_ST( 'a', 3, 783, 0 ), /* 782 simulation_dur */
- S_ST( 't', 3, 784, 0 ), /* 783 simulation_dura */
- S_ST( 'i', 3, 785, 0 ), /* 784 simulation_durat */
- S_ST( 'o', 3, 446, 0 ), /* 785 simulation_durati */
- S_ST( 'o', 3, 787, 769 ), /* 786 s */
- S_ST( 'u', 3, 788, 0 ), /* 787 so */
- S_ST( 'r', 3, 789, 0 ), /* 788 sou */
- S_ST( 'c', 3, 405, 0 ), /* 789 sour */
- S_ST( 't', 3, 813, 786 ), /* 790 s */
- S_ST( 'a', 3, 797, 0 ), /* 791 st */
- S_ST( 'c', 3, 793, 0 ), /* 792 sta */
- S_ST( 'k', 3, 794, 0 ), /* 793 stac */
- S_ST( 's', 3, 795, 0 ), /* 794 stack */
- S_ST( 'i', 3, 796, 0 ), /* 795 stacks */
- S_ST( 'z', 3, 406, 0 ), /* 796 stacksi */
- S_ST( 't', 3, 408, 792 ), /* 797 sta */
- S_ST( 'i', 3, 799, 0 ), /* 798 stat */
- S_ST( 's', 3, 800, 0 ), /* 799 stati */
- S_ST( 't', 3, 801, 0 ), /* 800 statis */
- S_ST( 'i', 3, 802, 0 ), /* 801 statist */
- S_ST( 'c', 3, 407, 0 ), /* 802 statisti */
- S_ST( 'd', 3, 804, 0 ), /* 803 stats */
- S_ST( 'i', 3, 409, 0 ), /* 804 statsd */
- S_ST( 'e', 3, 410, 791 ), /* 805 st */
- S_ST( 'b', 3, 807, 0 ), /* 806 step */
- S_ST( 'a', 3, 808, 0 ), /* 807 stepb */
- S_ST( 'c', 3, 411, 0 ), /* 808 stepba */
- S_ST( 'f', 3, 810, 806 ), /* 809 step */
- S_ST( 'w', 3, 412, 0 ), /* 810 stepf */
- S_ST( 'o', 3, 812, 809 ), /* 811 step */
- S_ST( 'u', 3, 413, 0 ), /* 812 stepo */
- S_ST( 'r', 3, 814, 805 ), /* 813 st */
- S_ST( 'a', 3, 815, 0 ), /* 814 str */
- S_ST( 't', 3, 816, 0 ), /* 815 stra */
- S_ST( 'u', 3, 414, 0 ), /* 816 strat */
- S_ST( 'y', 3, 416, 790 ), /* 817 s */
- S_ST( 's', 3, 819, 0 ), /* 818 sys */
- S_ST( 't', 3, 820, 0 ), /* 819 syss */
- S_ST( 'a', 3, 821, 0 ), /* 820 sysst */
- S_ST( 't', 3, 417, 0 ), /* 821 syssta */
- S_ST( 't', 3, 848, 744 ), /* 822 */
- S_ST( 'i', 3, 834, 0 ), /* 823 t */
- S_ST( 'c', 3, 418, 0 ), /* 824 ti */
- S_ST( 'm', 3, 827, 824 ), /* 825 ti */
- S_ST( 'e', 3, 421, 0 ), /* 826 tim */
- S_ST( 'i', 3, 828, 826 ), /* 827 tim */
- S_ST( 'n', 3, 829, 0 ), /* 828 timi */
- S_ST( 'g', 3, 830, 0 ), /* 829 timin */
- S_ST( 's', 3, 831, 0 ), /* 830 timing */
- S_ST( 't', 3, 832, 0 ), /* 831 timings */
- S_ST( 'a', 3, 833, 0 ), /* 832 timingst */
- S_ST( 't', 3, 422, 0 ), /* 833 timingsta */
- S_ST( 'n', 3, 835, 825 ), /* 834 ti */
- S_ST( 'k', 3, 836, 0 ), /* 835 tin */
- S_ST( 'e', 3, 423, 0 ), /* 836 tink */
- S_ST( 'o', 3, 424, 823 ), /* 837 t */
- S_ST( 'r', 3, 840, 837 ), /* 838 t */
- S_ST( 'a', 3, 425, 0 ), /* 839 tr */
- S_ST( 'u', 3, 841, 839 ), /* 840 tr */
- S_ST( 's', 3, 842, 426 ), /* 841 tru */
- S_ST( 't', 3, 843, 0 ), /* 842 trus */
- S_ST( 'e', 3, 844, 0 ), /* 843 trust */
- S_ST( 'd', 3, 845, 0 ), /* 844 truste */
- S_ST( 'k', 3, 846, 0 ), /* 845 trusted */
- S_ST( 'e', 3, 427, 0 ), /* 846 trustedk */
- S_ST( 't', 3, 428, 838 ), /* 847 t */
- S_ST( 'y', 3, 849, 847 ), /* 848 t */
- S_ST( 'p', 3, 429, 0 ), /* 849 ty */
- S_ST( 'u', 3, 851, 822 ), /* 850 */
- S_ST( 'n', 3, 857, 0 ), /* 851 u */
- S_ST( 'c', 3, 853, 0 ), /* 852 un */
- S_ST( 'o', 3, 854, 0 ), /* 853 unc */
- S_ST( 'n', 3, 855, 0 ), /* 854 unco */
- S_ST( 'f', 3, 856, 0 ), /* 855 uncon */
- S_ST( 'i', 3, 434, 0 ), /* 856 unconf */
- S_ST( 'p', 3, 858, 852 ), /* 857 un */
- S_ST( 'e', 3, 859, 0 ), /* 858 unp */
- S_ST( 'e', 3, 435, 0 ), /* 859 unpe */
- S_ST( '_', 3, 880, 0 ), /* 860 unpeer */
- S_ST( 'c', 3, 862, 0 ), /* 861 unpeer_ */
- S_ST( 'r', 3, 863, 0 ), /* 862 unpeer_c */
- S_ST( 'y', 3, 864, 0 ), /* 863 unpeer_cr */
- S_ST( 'p', 3, 865, 0 ), /* 864 unpeer_cry */
- S_ST( 't', 3, 866, 0 ), /* 865 unpeer_cryp */
- S_ST( 'o', 3, 867, 0 ), /* 866 unpeer_crypt */
- S_ST( '_', 3, 872, 0 ), /* 867 unpeer_crypto */
- S_ST( 'e', 3, 869, 0 ), /* 868 unpeer_crypto_ */
- S_ST( 'a', 3, 870, 0 ), /* 869 unpeer_crypto_e */
- S_ST( 'r', 3, 871, 0 ), /* 870 unpeer_crypto_ea */
- S_ST( 'l', 3, 431, 0 ), /* 871 unpeer_crypto_ear */
- S_ST( 'n', 3, 873, 868 ), /* 872 unpeer_crypto_ */
- S_ST( 'a', 3, 874, 0 ), /* 873 unpeer_crypto_n */
- S_ST( 'k', 3, 875, 0 ), /* 874 unpeer_crypto_na */
- S_ST( '_', 3, 876, 0 ), /* 875 unpeer_crypto_nak */
- S_ST( 'e', 3, 877, 0 ), /* 876 unpeer_crypto_nak_ */
- S_ST( 'a', 3, 878, 0 ), /* 877 unpeer_crypto_nak_e */
- S_ST( 'r', 3, 879, 0 ), /* 878 unpeer_crypto_nak_ea */
- S_ST( 'l', 3, 432, 0 ), /* 879 unpeer_crypto_nak_ear */
- S_ST( 'd', 3, 881, 861 ), /* 880 unpeer_ */
- S_ST( 'i', 3, 882, 0 ), /* 881 unpeer_d */
- S_ST( 'g', 3, 883, 0 ), /* 882 unpeer_di */
- S_ST( 'e', 3, 884, 0 ), /* 883 unpeer_dig */
- S_ST( 's', 3, 885, 0 ), /* 884 unpeer_dige */
- S_ST( 't', 3, 886, 0 ), /* 885 unpeer_diges */
- S_ST( '_', 3, 887, 0 ), /* 886 unpeer_digest */
- S_ST( 'e', 3, 888, 0 ), /* 887 unpeer_digest_ */
- S_ST( 'a', 3, 889, 0 ), /* 888 unpeer_digest_e */
- S_ST( 'r', 3, 890, 0 ), /* 889 unpeer_digest_ea */
- S_ST( 'l', 3, 433, 0 ), /* 890 unpeer_digest_ear */
- S_ST( 'v', 3, 892, 850 ), /* 891 */
- S_ST( 'e', 3, 893, 0 ), /* 892 v */
- S_ST( 'r', 3, 894, 0 ), /* 893 ve */
- S_ST( 's', 3, 895, 0 ), /* 894 ver */
- S_ST( 'i', 3, 896, 0 ), /* 895 vers */
- S_ST( 'o', 3, 436, 0 ), /* 896 versi */
- S_ST( 'w', 3, 904, 891 ), /* 897 */
- S_ST( 'a', 3, 899, 0 ), /* 898 w */
- S_ST( 'n', 3, 900, 0 ), /* 899 wa */
- S_ST( 'd', 3, 901, 0 ), /* 900 wan */
- S_ST( 'e', 3, 450, 0 ), /* 901 wand */
- S_ST( 'e', 3, 903, 898 ), /* 902 w */
- S_ST( 'e', 3, 438, 0 ), /* 903 we */
- S_ST( 'i', 3, 905, 902 ), /* 904 w */
- S_ST( 'l', 3, 906, 0 ), /* 905 wi */
- S_ST( 'd', 3, 907, 0 ), /* 906 wil */
- S_ST( 'c', 3, 908, 0 ), /* 907 wild */
- S_ST( 'a', 3, 909, 0 ), /* 908 wildc */
- S_ST( 'r', 3, 439, 0 ), /* 909 wildca */
- S_ST( 'x', 3, 911, 897 ), /* 910 */
- S_ST( 'l', 3, 912, 0 ), /* 911 x */
- S_ST( 'e', 3, 913, 0 ), /* 912 xl */
- S_ST( 'a', 3, 914, 0 ), /* 913 xle */
- S_ST( 'v', 3, 440, 0 ), /* 914 xlea */
- S_ST( 'y', 3, 916, 910 ), /* 915 [initial state] */
- S_ST( 'e', 3, 917, 0 ), /* 916 y */
- S_ST( 'a', 3, 441, 0 ) /* 917 ye */
+ S_ST( 'e', 1, 0, 0 ), /* 267 T_Basedate */
+ S_ST( 't', 0, 0, 0 ), /* 268 T_Bclient */
+ S_ST( 'p', 0, 0, 0 ), /* 269 T_Bcpollbstep */
+ S_ST( 'n', 0, 0, 0 ), /* 270 T_Beacon */
+ S_ST( 't', 1, 71, 0 ), /* 271 T_Broadcast */
+ S_ST( 't', 0, 0, 0 ), /* 272 T_Broadcastclient */
+ S_ST( 'y', 0, 0, 0 ), /* 273 T_Broadcastdelay */
+ S_ST( 't', 0, 0, 0 ), /* 274 T_Burst */
+ S_ST( 'e', 0, 0, 0 ), /* 275 T_Calibrate */
+ S_ST( 'g', 0, 0, 0 ), /* 276 T_Ceiling */
+ S_ST( 's', 0, 0, 0 ), /* 277 T_Clockstats */
+ S_ST( 't', 0, 0, 0 ), /* 278 T_Cohort */
+ S_ST( 'y', 0, 0, 0 ), /* 279 T_ControlKey */
+ S_ST( 'o', 0, 114, 0 ), /* 280 T_Crypto */
+ S_ST( 's', 0, 0, 0 ), /* 281 T_Cryptostats */
+ S_ST( 'l', 0, 0, 0 ), /* 282 T_Ctl */
+ S_ST( 'y', 0, 0, 0 ), /* 283 T_Day */
+ S_ST( 't', 0, 0, 0 ), /* 284 T_Default */
+ S_ST( 't', 1, 0, 0 ), /* 285 T_Digest */
+ S_ST( 'e', 0, 0, 0 ), /* 286 T_Disable */
+ S_ST( 'd', 0, 0, 0 ), /* 287 T_Discard */
+ S_ST( 'n', 0, 0, 0 ), /* 288 T_Dispersion */
+ S_ST( 'r', 3, 297, 0 ), /* 289 ke */
+ S_ST( 'e', 1, 0, 0 ), /* 290 T_Driftfile */
+ S_ST( 'p', 0, 0, 0 ), /* 291 T_Drop */
+ S_ST( 'p', 0, 0, 0 ), /* 292 T_Dscp */
+ S_ST( '.', 0, 0, 0 ), /* 293 T_Ellipsis */
+ S_ST( 'e', 0, 0, 0 ), /* 294 T_Enable */
+ S_ST( 'd', 0, 0, 161 ), /* 295 T_End */
+ S_ST( 'r', 0, 0, 0 ), /* 296 T_Epeer */
+ S_ST( 'n', 3, 319, 0 ), /* 297 ker */
+ S_ST( 'e', 1, 172, 0 ), /* 298 T_File */
+ S_ST( 'n', 0, 0, 0 ), /* 299 T_Filegen */
+ S_ST( 'm', 0, 0, 0 ), /* 300 T_Filenum */
+ S_ST( '1', 0, 0, 0 ), /* 301 T_Flag1 */
+ S_ST( '2', 0, 0, 301 ), /* 302 T_Flag2 */
+ S_ST( '3', 0, 0, 302 ), /* 303 T_Flag3 */
+ S_ST( '4', 0, 0, 303 ), /* 304 T_Flag4 */
+ S_ST( 'e', 0, 0, 0 ), /* 305 T_Flake */
+ S_ST( 'r', 0, 0, 0 ), /* 306 T_Floor */
+ S_ST( 'q', 0, 182, 0 ), /* 307 T_Freq */
+ S_ST( 'e', 1, 0, 0 ), /* 308 T_Fudge */
+ S_ST( 't', 1, 0, 0 ), /* 309 T_Host */
+ S_ST( 'f', 0, 0, 0 ), /* 310 T_Huffpuff */
+ S_ST( 't', 0, 0, 0 ), /* 311 T_Iburst */
+ S_ST( 't', 1, 0, 0 ), /* 312 T_Ident */
+ S_ST( 'e', 0, 0, 0 ), /* 313 T_Ignore */
+ S_ST( 'c', 0, 0, 0 ), /* 314 T_Incalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 315 T_Incmem */
+ S_ST( 'c', 0, 0, 0 ), /* 316 T_Initalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 317 T_Initmem */
+ S_ST( 'e', 1, 0, 0 ), /* 318 T_Includefile */
+ S_ST( 'e', 3, 328, 0 ), /* 319 kern */
+ S_ST( 'e', 0, 0, 0 ), /* 320 T_Interface */
+ S_ST( 'd', 3, 419, 0 ), /* 321 keys */
+ S_ST( 'o', 0, 0, 212 ), /* 322 T_Io */
+ S_ST( 't', 0, 0, 0 ), /* 323 T_Ippeerlimit */
+ S_ST( '4', 0, 0, 0 ), /* 324 T_Ipv4 */
+ S_ST( '4', 0, 0, 0 ), /* 325 T_Ipv4_flag */
+ S_ST( '6', 0, 0, 324 ), /* 326 T_Ipv6 */
+ S_ST( '6', 0, 0, 325 ), /* 327 T_Ipv6_flag */
+ S_ST( 'l', 0, 0, 0 ), /* 328 T_Kernel */
+ S_ST( 'y', 0, 330, 289 ), /* 329 T_Key */
+ S_ST( 's', 1, 321, 0 ), /* 330 T_Keys */
+ S_ST( 'r', 1, 0, 0 ), /* 331 T_Keysdir */
+ S_ST( 'd', 0, 0, 0 ), /* 332 T_Kod */
+ S_ST( 'p', 0, 0, 0 ), /* 333 T_Mssntp */
+ S_ST( 'e', 1, 0, 0 ), /* 334 T_Leapfile */
+ S_ST( 'l', 0, 0, 0 ), /* 335 T_Leapsmearinterval */
+ S_ST( 'd', 0, 0, 0 ), /* 336 T_Limited */
+ S_ST( 'k', 0, 0, 0 ), /* 337 T_Link */
+ S_ST( 'n', 0, 0, 0 ), /* 338 T_Listen */
+ S_ST( 'g', 2, 0, 0 ), /* 339 T_Logconfig */
+ S_ST( 'e', 1, 0, 0 ), /* 340 T_Logfile */
+ S_ST( 's', 0, 0, 0 ), /* 341 T_Loopstats */
+ S_ST( 'p', 0, 0, 0 ), /* 342 T_Lowpriotrap */
+ S_ST( 't', 1, 0, 0 ), /* 343 T_Manycastclient */
+ S_ST( 'r', 2, 0, 0 ), /* 344 T_Manycastserver */
+ S_ST( 'k', 0, 0, 0 ), /* 345 T_Mask */
+ S_ST( 'e', 0, 0, 0 ), /* 346 T_Maxage */
+ S_ST( 'k', 0, 0, 0 ), /* 347 T_Maxclock */
+ S_ST( 'h', 0, 0, 0 ), /* 348 T_Maxdepth */
+ S_ST( 't', 0, 0, 0 ), /* 349 T_Maxdist */
+ S_ST( 'm', 0, 0, 0 ), /* 350 T_Maxmem */
+ S_ST( 'l', 0, 0, 0 ), /* 351 T_Maxpoll */
+ S_ST( 's', 0, 0, 0 ), /* 352 T_Mdnstries */
+ S_ST( 'm', 0, 552, 0 ), /* 353 T_Mem */
+ S_ST( 'k', 0, 0, 0 ), /* 354 T_Memlock */
+ S_ST( 'k', 0, 0, 0 ), /* 355 T_Minclock */
+ S_ST( 'h', 0, 0, 0 ), /* 356 T_Mindepth */
+ S_ST( 't', 0, 0, 0 ), /* 357 T_Mindist */
+ S_ST( 'm', 0, 0, 0 ), /* 358 T_Minimum */
+ S_ST( 'l', 0, 0, 0 ), /* 359 T_Minpoll */
+ S_ST( 'e', 0, 0, 0 ), /* 360 T_Minsane */
+ S_ST( 'e', 0, 362, 0 ), /* 361 T_Mode */
+ S_ST( '7', 0, 0, 0 ), /* 362 T_Mode7 */
+ S_ST( 'r', 0, 0, 0 ), /* 363 T_Monitor */
+ S_ST( 'h', 0, 0, 0 ), /* 364 T_Month */
+ S_ST( 'u', 0, 0, 0 ), /* 365 T_Mru */
+ S_ST( 't', 2, 0, 0 ), /* 366 T_Multicastclient */
+ S_ST( 'c', 0, 0, 0 ), /* 367 T_Nic */
+ S_ST( 'k', 0, 0, 0 ), /* 368 T_Nolink */
+ S_ST( 'y', 0, 0, 0 ), /* 369 T_Nomodify */
+ S_ST( 't', 0, 0, 0 ), /* 370 T_Nomrulist */
+ S_ST( 'e', 0, 0, 0 ), /* 371 T_None */
+ S_ST( 'e', 0, 0, 0 ), /* 372 T_Nonvolatile */
+ S_ST( 'r', 0, 0, 0 ), /* 373 T_Noepeer */
+ S_ST( 'r', 0, 0, 0 ), /* 374 T_Nopeer */
+ S_ST( 'y', 0, 0, 0 ), /* 375 T_Noquery */
+ S_ST( 't', 0, 0, 0 ), /* 376 T_Noselect */
+ S_ST( 'e', 0, 0, 0 ), /* 377 T_Noserve */
+ S_ST( 'p', 0, 0, 0 ), /* 378 T_Notrap */
+ S_ST( 't', 0, 0, 0 ), /* 379 T_Notrust */
+ S_ST( 'p', 0, 652, 0 ), /* 380 T_Ntp */
+ S_ST( 't', 0, 0, 0 ), /* 381 T_Ntpport */
+ S_ST( 't', 1, 0, 0 ), /* 382 T_NtpSignDsocket */
+ S_ST( 'n', 0, 667, 0 ), /* 383 T_Orphan */
+ S_ST( 't', 0, 0, 0 ), /* 384 T_Orphanwait */
+ S_ST( 'y', 0, 0, 0 ), /* 385 T_PCEdigest */
+ S_ST( 'c', 0, 0, 0 ), /* 386 T_Panic */
+ S_ST( 'r', 1, 694, 0 ), /* 387 T_Peer */
+ S_ST( 's', 0, 0, 0 ), /* 388 T_Peerstats */
+ S_ST( 'e', 2, 0, 0 ), /* 389 T_Phone */
+ S_ST( 'd', 0, 702, 0 ), /* 390 T_Pid */
+ S_ST( 'e', 1, 0, 0 ), /* 391 T_Pidfile */
+ S_ST( 'l', 1, 0, 0 ), /* 392 T_Pool */
+ S_ST( 't', 0, 0, 0 ), /* 393 T_Port */
+ S_ST( 't', 0, 0, 0 ), /* 394 T_Preempt */
+ S_ST( 'r', 0, 0, 0 ), /* 395 T_Prefer */
+ S_ST( 's', 0, 0, 0 ), /* 396 T_Protostats */
+ S_ST( 'w', 1, 0, 708 ), /* 397 T_Pw */
+ S_ST( 'e', 1, 0, 0 ), /* 398 T_Randfile */
+ S_ST( 's', 0, 0, 0 ), /* 399 T_Rawstats */
+ S_ST( 'd', 1, 0, 0 ), /* 400 T_Refid */
+ S_ST( 'y', 0, 0, 0 ), /* 401 T_Requestkey */
+ S_ST( 't', 0, 0, 0 ), /* 402 T_Reset */
+ S_ST( 't', 0, 0, 0 ), /* 403 T_Restrict */
+ S_ST( 'e', 0, 0, 0 ), /* 404 T_Revoke */
+ S_ST( 't', 0, 0, 0 ), /* 405 T_Rlimit */
+ S_ST( 'r', 1, 0, 0 ), /* 406 T_Saveconfigdir */
+ S_ST( 'r', 1, 785, 0 ), /* 407 T_Server */
+ S_ST( 'r', 1, 0, 0 ), /* 408 T_Setvar */
+ S_ST( 'e', 0, 0, 0 ), /* 409 T_Source */
+ S_ST( 'e', 0, 0, 0 ), /* 410 T_Stacksize */
+ S_ST( 's', 0, 0, 0 ), /* 411 T_Statistics */
+ S_ST( 's', 0, 828, 823 ), /* 412 T_Stats */
+ S_ST( 'r', 1, 0, 0 ), /* 413 T_Statsdir */
+ S_ST( 'p', 0, 836, 0 ), /* 414 T_Step */
+ S_ST( 'k', 0, 0, 0 ), /* 415 T_Stepback */
+ S_ST( 'd', 0, 0, 0 ), /* 416 T_Stepfwd */
+ S_ST( 't', 0, 0, 0 ), /* 417 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 418 T_Stratum */
+ S_ST( 'i', 3, 331, 0 ), /* 419 keysd */
+ S_ST( 's', 0, 843, 0 ), /* 420 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 421 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 422 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 423 T_Time1 */
+ S_ST( '2', 0, 0, 423 ), /* 424 T_Time2 */
+ S_ST( 'r', 0, 0, 424 ), /* 425 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 426 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 427 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 428 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 429 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 430 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 431 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 432 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 433 T_Type */
+ S_ST( 'o', 3, 332, 257 ), /* 434 k */
+ S_ST( 'y', 0, 0, 0 ), /* 435 T_UEcrypto */
+ S_ST( 'y', 0, 0, 0 ), /* 436 T_UEcryptonak */
+ S_ST( 'y', 0, 0, 0 ), /* 437 T_UEdigest */
+ S_ST( 'g', 1, 0, 0 ), /* 438 T_Unconfig */
+ S_ST( 'r', 1, 885, 0 ), /* 439 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 440 T_Version */
+ S_ST( 'l', 3, 483, 256 ), /* 441 */
+ S_ST( 'k', 0, 0, 0 ), /* 442 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 443 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 444 T_Xleave */
+ S_ST( 'r', 0, 0, 0 ), /* 445 T_Year */
+ S_ST( 'e', 3, 447, 0 ), /* 446 l */
+ S_ST( 'a', 3, 458, 0 ), /* 447 le */
+ S_ST( 'e', 0, 0, 0 ), /* 448 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 449 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 450 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 451 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 452 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 453 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 454 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 455 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 456 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 457 T_Proc_Delay */
+ S_ST( 'p', 3, 462, 0 ), /* 458 lea */
+ S_ST( 'f', 3, 460, 0 ), /* 459 leap */
+ S_ST( 'i', 3, 461, 0 ), /* 460 leapf */
+ S_ST( 'l', 3, 334, 0 ), /* 461 leapfi */
+ S_ST( 's', 3, 463, 459 ), /* 462 leap */
+ S_ST( 'm', 3, 464, 0 ), /* 463 leaps */
+ S_ST( 'e', 3, 465, 0 ), /* 464 leapsm */
+ S_ST( 'a', 3, 466, 0 ), /* 465 leapsme */
+ S_ST( 'r', 3, 467, 0 ), /* 466 leapsmea */
+ S_ST( 'i', 3, 468, 0 ), /* 467 leapsmear */
+ S_ST( 'n', 3, 469, 0 ), /* 468 leapsmeari */
+ S_ST( 't', 3, 470, 0 ), /* 469 leapsmearin */
+ S_ST( 'e', 3, 471, 0 ), /* 470 leapsmearint */
+ S_ST( 'r', 3, 472, 0 ), /* 471 leapsmearinte */
+ S_ST( 'v', 3, 473, 0 ), /* 472 leapsmearinter */
+ S_ST( 'a', 3, 335, 0 ), /* 473 leapsmearinterv */
+ S_ST( 'i', 3, 480, 446 ), /* 474 l */
+ S_ST( 'm', 3, 476, 0 ), /* 475 li */
+ S_ST( 'i', 3, 477, 0 ), /* 476 lim */
+ S_ST( 't', 3, 478, 0 ), /* 477 limi */
+ S_ST( 'e', 3, 336, 0 ), /* 478 limit */
+ S_ST( 'n', 3, 337, 475 ), /* 479 li */
+ S_ST( 's', 3, 481, 479 ), /* 480 li */
+ S_ST( 't', 3, 482, 0 ), /* 481 lis */
+ S_ST( 'e', 3, 338, 0 ), /* 482 list */
+ S_ST( 'o', 3, 499, 474 ), /* 483 l */
+ S_ST( 'g', 3, 490, 0 ), /* 484 lo */
+ S_ST( 'c', 3, 486, 0 ), /* 485 log */
+ S_ST( 'o', 3, 487, 0 ), /* 486 logc */
+ S_ST( 'n', 3, 488, 0 ), /* 487 logco */
+ S_ST( 'f', 3, 489, 0 ), /* 488 logcon */
+ S_ST( 'i', 3, 339, 0 ), /* 489 logconf */
+ S_ST( 'f', 3, 491, 485 ), /* 490 log */
+ S_ST( 'i', 3, 492, 0 ), /* 491 logf */
+ S_ST( 'l', 3, 340, 0 ), /* 492 logfi */
+ S_ST( 'o', 3, 494, 484 ), /* 493 lo */
+ S_ST( 'p', 3, 495, 0 ), /* 494 loo */
+ S_ST( 's', 3, 496, 0 ), /* 495 loop */
+ S_ST( 't', 3, 497, 0 ), /* 496 loops */
+ S_ST( 'a', 3, 498, 0 ), /* 497 loopst */
+ S_ST( 't', 3, 341, 0 ), /* 498 loopsta */
+ S_ST( 'w', 3, 500, 493 ), /* 499 lo */
+ S_ST( 'p', 3, 501, 0 ), /* 500 low */
+ S_ST( 'r', 3, 502, 0 ), /* 501 lowp */
+ S_ST( 'i', 3, 503, 0 ), /* 502 lowpr */
+ S_ST( 'o', 3, 504, 0 ), /* 503 lowpri */
+ S_ST( 't', 3, 505, 0 ), /* 504 lowprio */
+ S_ST( 'r', 3, 506, 0 ), /* 505 lowpriot */
+ S_ST( 'a', 3, 342, 0 ), /* 506 lowpriotr */
+ S_ST( 'm', 3, 588, 441 ), /* 507 */
+ S_ST( 'a', 3, 526, 0 ), /* 508 m */
+ S_ST( 'n', 3, 510, 0 ), /* 509 ma */
+ S_ST( 'y', 3, 511, 0 ), /* 510 man */
+ S_ST( 'c', 3, 512, 0 ), /* 511 many */
+ S_ST( 'a', 3, 513, 0 ), /* 512 manyc */
+ S_ST( 's', 3, 514, 0 ), /* 513 manyca */
+ S_ST( 't', 3, 520, 0 ), /* 514 manycas */
+ S_ST( 'c', 3, 516, 0 ), /* 515 manycast */
+ S_ST( 'l', 3, 517, 0 ), /* 516 manycastc */
+ S_ST( 'i', 3, 518, 0 ), /* 517 manycastcl */
+ S_ST( 'e', 3, 519, 0 ), /* 518 manycastcli */
+ S_ST( 'n', 3, 343, 0 ), /* 519 manycastclie */
+ S_ST( 's', 3, 521, 515 ), /* 520 manycast */
+ S_ST( 'e', 3, 522, 0 ), /* 521 manycasts */
+ S_ST( 'r', 3, 523, 0 ), /* 522 manycastse */
+ S_ST( 'v', 3, 524, 0 ), /* 523 manycastser */
+ S_ST( 'e', 3, 344, 0 ), /* 524 manycastserv */
+ S_ST( 's', 3, 345, 509 ), /* 525 ma */
+ S_ST( 'x', 3, 541, 525 ), /* 526 ma */
+ S_ST( 'a', 3, 528, 0 ), /* 527 max */
+ S_ST( 'g', 3, 346, 0 ), /* 528 maxa */
+ S_ST( 'c', 3, 530, 527 ), /* 529 max */
+ S_ST( 'l', 3, 531, 0 ), /* 530 maxc */
+ S_ST( 'o', 3, 532, 0 ), /* 531 maxcl */
+ S_ST( 'c', 3, 347, 0 ), /* 532 maxclo */
+ S_ST( 'd', 3, 537, 529 ), /* 533 max */
+ S_ST( 'e', 3, 535, 0 ), /* 534 maxd */
+ S_ST( 'p', 3, 536, 0 ), /* 535 maxde */
+ S_ST( 't', 3, 348, 0 ), /* 536 maxdep */
+ S_ST( 'i', 3, 538, 534 ), /* 537 maxd */
+ S_ST( 's', 3, 349, 0 ), /* 538 maxdi */
+ S_ST( 'm', 3, 540, 533 ), /* 539 max */
+ S_ST( 'e', 3, 350, 0 ), /* 540 maxm */
+ S_ST( 'p', 3, 542, 539 ), /* 541 max */
+ S_ST( 'o', 3, 543, 0 ), /* 542 maxp */
+ S_ST( 'l', 3, 351, 0 ), /* 543 maxpo */
+ S_ST( 'd', 3, 545, 508 ), /* 544 m */
+ S_ST( 'n', 3, 546, 0 ), /* 545 md */
+ S_ST( 's', 3, 547, 0 ), /* 546 mdn */
+ S_ST( 't', 3, 548, 0 ), /* 547 mdns */
+ S_ST( 'r', 3, 549, 0 ), /* 548 mdnst */
+ S_ST( 'i', 3, 550, 0 ), /* 549 mdnstr */
+ S_ST( 'e', 3, 352, 0 ), /* 550 mdnstri */
+ S_ST( 'e', 3, 353, 544 ), /* 551 m */
+ S_ST( 'l', 3, 553, 0 ), /* 552 mem */
+ S_ST( 'o', 3, 554, 0 ), /* 553 meml */
+ S_ST( 'c', 3, 354, 0 ), /* 554 memlo */
+ S_ST( 'i', 3, 556, 551 ), /* 555 m */
+ S_ST( 'n', 3, 573, 0 ), /* 556 mi */
+ S_ST( 'c', 3, 558, 0 ), /* 557 min */
+ S_ST( 'l', 3, 559, 0 ), /* 558 minc */
+ S_ST( 'o', 3, 560, 0 ), /* 559 mincl */
+ S_ST( 'c', 3, 355, 0 ), /* 560 minclo */
+ S_ST( 'd', 3, 565, 557 ), /* 561 min */
+ S_ST( 'e', 3, 563, 0 ), /* 562 mind */
+ S_ST( 'p', 3, 564, 0 ), /* 563 minde */
+ S_ST( 't', 3, 356, 0 ), /* 564 mindep */
+ S_ST( 'i', 3, 566, 562 ), /* 565 mind */
+ S_ST( 's', 3, 357, 0 ), /* 566 mindi */
+ S_ST( 'i', 3, 568, 561 ), /* 567 min */
+ S_ST( 'm', 3, 569, 0 ), /* 568 mini */
+ S_ST( 'u', 3, 358, 0 ), /* 569 minim */
+ S_ST( 'p', 3, 571, 567 ), /* 570 min */
+ S_ST( 'o', 3, 572, 0 ), /* 571 minp */
+ S_ST( 'l', 3, 359, 0 ), /* 572 minpo */
+ S_ST( 's', 3, 574, 570 ), /* 573 min */
+ S_ST( 'a', 3, 575, 0 ), /* 574 mins */
+ S_ST( 'n', 3, 360, 0 ), /* 575 minsa */
+ S_ST( 'o', 3, 578, 555 ), /* 576 m */
+ S_ST( 'd', 3, 361, 0 ), /* 577 mo */
+ S_ST( 'n', 3, 582, 577 ), /* 578 mo */
+ S_ST( 'i', 3, 580, 0 ), /* 579 mon */
+ S_ST( 't', 3, 581, 0 ), /* 580 moni */
+ S_ST( 'o', 3, 363, 0 ), /* 581 monit */
+ S_ST( 't', 3, 364, 579 ), /* 582 mon */
+ S_ST( 'r', 3, 365, 576 ), /* 583 m */
+ S_ST( 's', 3, 585, 583 ), /* 584 m */
+ S_ST( 's', 3, 586, 0 ), /* 585 ms */
+ S_ST( 'n', 3, 587, 0 ), /* 586 mss */
+ S_ST( 't', 3, 333, 0 ), /* 587 mssn */
+ S_ST( 'u', 3, 589, 584 ), /* 588 m */
+ S_ST( 'l', 3, 590, 0 ), /* 589 mu */
+ S_ST( 't', 3, 591, 0 ), /* 590 mul */
+ S_ST( 'i', 3, 592, 0 ), /* 591 mult */
+ S_ST( 'c', 3, 593, 0 ), /* 592 multi */
+ S_ST( 'a', 3, 594, 0 ), /* 593 multic */
+ S_ST( 's', 3, 595, 0 ), /* 594 multica */
+ S_ST( 't', 3, 596, 0 ), /* 595 multicas */
+ S_ST( 'c', 3, 597, 0 ), /* 596 multicast */
+ S_ST( 'l', 3, 598, 0 ), /* 597 multicastc */
+ S_ST( 'i', 3, 599, 0 ), /* 598 multicastcl */
+ S_ST( 'e', 3, 600, 0 ), /* 599 multicastcli */
+ S_ST( 'n', 3, 366, 0 ), /* 600 multicastclie */
+ S_ST( 'n', 3, 648, 507 ), /* 601 */
+ S_ST( 'i', 3, 367, 0 ), /* 602 n */
+ S_ST( 'o', 3, 643, 602 ), /* 603 n */
+ S_ST( 'e', 3, 605, 0 ), /* 604 no */
+ S_ST( 'p', 3, 606, 0 ), /* 605 noe */
+ S_ST( 'e', 3, 607, 0 ), /* 606 noep */
+ S_ST( 'e', 3, 373, 0 ), /* 607 noepe */
+ S_ST( 'l', 3, 609, 604 ), /* 608 no */
+ S_ST( 'i', 3, 610, 0 ), /* 609 nol */
+ S_ST( 'n', 3, 368, 0 ), /* 610 noli */
+ S_ST( 'm', 3, 616, 608 ), /* 611 no */
+ S_ST( 'o', 3, 613, 0 ), /* 612 nom */
+ S_ST( 'd', 3, 614, 0 ), /* 613 nomo */
+ S_ST( 'i', 3, 615, 0 ), /* 614 nomod */
+ S_ST( 'f', 3, 369, 0 ), /* 615 nomodi */
+ S_ST( 'r', 3, 617, 612 ), /* 616 nom */
+ S_ST( 'u', 3, 618, 0 ), /* 617 nomr */
+ S_ST( 'l', 3, 619, 0 ), /* 618 nomru */
+ S_ST( 'i', 3, 620, 0 ), /* 619 nomrul */
+ S_ST( 's', 3, 370, 0 ), /* 620 nomruli */
+ S_ST( 'n', 3, 622, 611 ), /* 621 no */
+ S_ST( 'v', 3, 623, 371 ), /* 622 non */
+ S_ST( 'o', 3, 624, 0 ), /* 623 nonv */
+ S_ST( 'l', 3, 625, 0 ), /* 624 nonvo */
+ S_ST( 'a', 3, 626, 0 ), /* 625 nonvol */
+ S_ST( 't', 3, 627, 0 ), /* 626 nonvola */
+ S_ST( 'i', 3, 628, 0 ), /* 627 nonvolat */
+ S_ST( 'l', 3, 372, 0 ), /* 628 nonvolati */
+ S_ST( 'p', 3, 630, 621 ), /* 629 no */
+ S_ST( 'e', 3, 631, 0 ), /* 630 nop */
+ S_ST( 'e', 3, 374, 0 ), /* 631 nope */
+ S_ST( 'q', 3, 633, 629 ), /* 632 no */
+ S_ST( 'u', 3, 634, 0 ), /* 633 noq */
+ S_ST( 'e', 3, 635, 0 ), /* 634 noqu */
+ S_ST( 'r', 3, 375, 0 ), /* 635 noque */
+ S_ST( 's', 3, 637, 632 ), /* 636 no */
+ S_ST( 'e', 3, 641, 0 ), /* 637 nos */
+ S_ST( 'l', 3, 639, 0 ), /* 638 nose */
+ S_ST( 'e', 3, 640, 0 ), /* 639 nosel */
+ S_ST( 'c', 3, 376, 0 ), /* 640 nosele */
+ S_ST( 'r', 3, 642, 638 ), /* 641 nose */
+ S_ST( 'v', 3, 377, 0 ), /* 642 noser */
+ S_ST( 't', 3, 644, 636 ), /* 643 no */
+ S_ST( 'r', 3, 646, 0 ), /* 644 not */
+ S_ST( 'a', 3, 378, 0 ), /* 645 notr */
+ S_ST( 'u', 3, 647, 645 ), /* 646 notr */
+ S_ST( 's', 3, 379, 0 ), /* 647 notru */
+ S_ST( 't', 3, 380, 603 ), /* 648 n */
+ S_ST( 'p', 3, 650, 0 ), /* 649 ntp */
+ S_ST( 'o', 3, 651, 0 ), /* 650 ntpp */
+ S_ST( 'r', 3, 381, 0 ), /* 651 ntppo */
+ S_ST( 's', 3, 653, 649 ), /* 652 ntp */
+ S_ST( 'i', 3, 654, 0 ), /* 653 ntps */
+ S_ST( 'g', 3, 655, 0 ), /* 654 ntpsi */
+ S_ST( 'n', 3, 656, 0 ), /* 655 ntpsig */
+ S_ST( 'd', 3, 657, 0 ), /* 656 ntpsign */
+ S_ST( 's', 3, 658, 0 ), /* 657 ntpsignd */
+ S_ST( 'o', 3, 659, 0 ), /* 658 ntpsignds */
+ S_ST( 'c', 3, 660, 0 ), /* 659 ntpsigndso */
+ S_ST( 'k', 3, 661, 0 ), /* 660 ntpsigndsoc */
+ S_ST( 'e', 3, 382, 0 ), /* 661 ntpsigndsock */
+ S_ST( 'o', 3, 663, 601 ), /* 662 */
+ S_ST( 'r', 3, 664, 0 ), /* 663 o */
+ S_ST( 'p', 3, 665, 0 ), /* 664 or */
+ S_ST( 'h', 3, 666, 0 ), /* 665 orp */
+ S_ST( 'a', 3, 383, 0 ), /* 666 orph */
+ S_ST( 'w', 3, 668, 0 ), /* 667 orphan */
+ S_ST( 'a', 3, 669, 0 ), /* 668 orphanw */
+ S_ST( 'i', 3, 384, 0 ), /* 669 orphanwa */
+ S_ST( 'p', 3, 397, 662 ), /* 670 */
+ S_ST( 'a', 3, 672, 0 ), /* 671 p */
+ S_ST( 'n', 3, 673, 0 ), /* 672 pa */
+ S_ST( 'i', 3, 386, 0 ), /* 673 pan */
+ S_ST( 'e', 3, 675, 671 ), /* 674 p */
+ S_ST( 'e', 3, 387, 0 ), /* 675 pe */
+ S_ST( '_', 3, 677, 0 ), /* 676 peer */
+ S_ST( 'c', 3, 678, 0 ), /* 677 peer_ */
+ S_ST( 'l', 3, 679, 0 ), /* 678 peer_c */
+ S_ST( 'e', 3, 680, 0 ), /* 679 peer_cl */
+ S_ST( 'a', 3, 681, 0 ), /* 680 peer_cle */
+ S_ST( 'r', 3, 682, 0 ), /* 681 peer_clea */
+ S_ST( '_', 3, 683, 0 ), /* 682 peer_clear */
+ S_ST( 'd', 3, 684, 0 ), /* 683 peer_clear_ */
+ S_ST( 'i', 3, 685, 0 ), /* 684 peer_clear_d */
+ S_ST( 'g', 3, 686, 0 ), /* 685 peer_clear_di */
+ S_ST( 'e', 3, 687, 0 ), /* 686 peer_clear_dig */
+ S_ST( 's', 3, 688, 0 ), /* 687 peer_clear_dige */
+ S_ST( 't', 3, 689, 0 ), /* 688 peer_clear_diges */
+ S_ST( '_', 3, 690, 0 ), /* 689 peer_clear_digest */
+ S_ST( 'e', 3, 691, 0 ), /* 690 peer_clear_digest_ */
+ S_ST( 'a', 3, 692, 0 ), /* 691 peer_clear_digest_e */
+ S_ST( 'r', 3, 693, 0 ), /* 692 peer_clear_digest_ea */
+ S_ST( 'l', 3, 385, 0 ), /* 693 peer_clear_digest_ear */
+ S_ST( 's', 3, 695, 676 ), /* 694 peer */
+ S_ST( 't', 3, 696, 0 ), /* 695 peers */
+ S_ST( 'a', 3, 697, 0 ), /* 696 peerst */
+ S_ST( 't', 3, 388, 0 ), /* 697 peersta */
+ S_ST( 'h', 3, 699, 674 ), /* 698 p */
+ S_ST( 'o', 3, 700, 0 ), /* 699 ph */
+ S_ST( 'n', 3, 389, 0 ), /* 700 pho */
+ S_ST( 'i', 3, 390, 698 ), /* 701 p */
+ S_ST( 'f', 3, 703, 0 ), /* 702 pid */
+ S_ST( 'i', 3, 704, 0 ), /* 703 pidf */
+ S_ST( 'l', 3, 391, 0 ), /* 704 pidfi */
+ S_ST( 'o', 3, 707, 701 ), /* 705 p */
+ S_ST( 'o', 3, 392, 0 ), /* 706 po */
+ S_ST( 'r', 3, 393, 706 ), /* 707 po */
+ S_ST( 'r', 3, 715, 705 ), /* 708 p */
+ S_ST( 'e', 3, 713, 0 ), /* 709 pr */
+ S_ST( 'e', 3, 711, 0 ), /* 710 pre */
+ S_ST( 'm', 3, 712, 0 ), /* 711 pree */
+ S_ST( 'p', 3, 394, 0 ), /* 712 preem */
+ S_ST( 'f', 3, 714, 710 ), /* 713 pre */
+ S_ST( 'e', 3, 395, 0 ), /* 714 pref */
+ S_ST( 'o', 3, 728, 709 ), /* 715 pr */
+ S_ST( 'c', 3, 717, 0 ), /* 716 pro */
+ S_ST( '_', 3, 718, 0 ), /* 717 proc */
+ S_ST( 'd', 3, 719, 0 ), /* 718 proc_ */
+ S_ST( 'e', 3, 720, 0 ), /* 719 proc_d */
+ S_ST( 'l', 3, 721, 0 ), /* 720 proc_de */
+ S_ST( 'a', 3, 457, 0 ), /* 721 proc_del */
+ S_ST( 'p', 3, 723, 716 ), /* 722 pro */
+ S_ST( '_', 3, 724, 0 ), /* 723 prop */
+ S_ST( 'd', 3, 725, 0 ), /* 724 prop_ */
+ S_ST( 'e', 3, 726, 0 ), /* 725 prop_d */
+ S_ST( 'l', 3, 727, 0 ), /* 726 prop_de */
+ S_ST( 'a', 3, 456, 0 ), /* 727 prop_del */
+ S_ST( 't', 3, 729, 722 ), /* 728 pro */
+ S_ST( 'o', 3, 730, 0 ), /* 729 prot */
+ S_ST( 's', 3, 731, 0 ), /* 730 proto */
+ S_ST( 't', 3, 732, 0 ), /* 731 protos */
+ S_ST( 'a', 3, 733, 0 ), /* 732 protost */
+ S_ST( 't', 3, 396, 0 ), /* 733 protosta */
+ S_ST( 'r', 3, 765, 670 ), /* 734 */
+ S_ST( 'a', 3, 741, 0 ), /* 735 r */
+ S_ST( 'n', 3, 737, 0 ), /* 736 ra */
+ S_ST( 'd', 3, 738, 0 ), /* 737 ran */
+ S_ST( 'f', 3, 739, 0 ), /* 738 rand */
+ S_ST( 'i', 3, 740, 0 ), /* 739 randf */
+ S_ST( 'l', 3, 398, 0 ), /* 740 randfi */
+ S_ST( 'w', 3, 742, 736 ), /* 741 ra */
+ S_ST( 's', 3, 743, 0 ), /* 742 raw */
+ S_ST( 't', 3, 744, 0 ), /* 743 raws */
+ S_ST( 'a', 3, 745, 0 ), /* 744 rawst */
+ S_ST( 't', 3, 399, 0 ), /* 745 rawsta */
+ S_ST( 'e', 3, 762, 735 ), /* 746 r */
+ S_ST( 'f', 3, 748, 0 ), /* 747 re */
+ S_ST( 'i', 3, 400, 0 ), /* 748 ref */
+ S_ST( 'q', 3, 750, 747 ), /* 749 re */
+ S_ST( 'u', 3, 751, 0 ), /* 750 req */
+ S_ST( 'e', 3, 752, 0 ), /* 751 requ */
+ S_ST( 's', 3, 753, 0 ), /* 752 reque */
+ S_ST( 't', 3, 754, 0 ), /* 753 reques */
+ S_ST( 'k', 3, 755, 0 ), /* 754 request */
+ S_ST( 'e', 3, 401, 0 ), /* 755 requestk */
+ S_ST( 's', 3, 758, 749 ), /* 756 re */
+ S_ST( 'e', 3, 402, 0 ), /* 757 res */
+ S_ST( 't', 3, 759, 757 ), /* 758 res */
+ S_ST( 'r', 3, 760, 0 ), /* 759 rest */
+ S_ST( 'i', 3, 761, 0 ), /* 760 restr */
+ S_ST( 'c', 3, 403, 0 ), /* 761 restri */
+ S_ST( 'v', 3, 763, 756 ), /* 762 re */
+ S_ST( 'o', 3, 764, 0 ), /* 763 rev */
+ S_ST( 'k', 3, 404, 0 ), /* 764 revo */
+ S_ST( 'l', 3, 766, 746 ), /* 765 r */
+ S_ST( 'i', 3, 767, 0 ), /* 766 rl */
+ S_ST( 'm', 3, 768, 0 ), /* 767 rli */
+ S_ST( 'i', 3, 405, 0 ), /* 768 rlim */
+ S_ST( 's', 3, 842, 734 ), /* 769 */
+ S_ST( 'a', 3, 771, 0 ), /* 770 s */
+ S_ST( 'v', 3, 772, 0 ), /* 771 sa */
+ S_ST( 'e', 3, 773, 0 ), /* 772 sav */
+ S_ST( 'c', 3, 774, 0 ), /* 773 save */
+ S_ST( 'o', 3, 775, 0 ), /* 774 savec */
+ S_ST( 'n', 3, 776, 0 ), /* 775 saveco */
+ S_ST( 'f', 3, 777, 0 ), /* 776 savecon */
+ S_ST( 'i', 3, 778, 0 ), /* 777 saveconf */
+ S_ST( 'g', 3, 779, 0 ), /* 778 saveconfi */
+ S_ST( 'd', 3, 780, 0 ), /* 779 saveconfig */
+ S_ST( 'i', 3, 406, 0 ), /* 780 saveconfigd */
+ S_ST( 'e', 3, 791, 770 ), /* 781 s */
+ S_ST( 'r', 3, 783, 0 ), /* 782 se */
+ S_ST( 'v', 3, 784, 0 ), /* 783 ser */
+ S_ST( 'e', 3, 407, 0 ), /* 784 serv */
+ S_ST( '_', 3, 786, 0 ), /* 785 server */
+ S_ST( 'o', 3, 787, 0 ), /* 786 server_ */
+ S_ST( 'f', 3, 788, 0 ), /* 787 server_o */
+ S_ST( 'f', 3, 789, 0 ), /* 788 server_of */
+ S_ST( 's', 3, 790, 0 ), /* 789 server_off */
+ S_ST( 'e', 3, 451, 0 ), /* 790 server_offs */
+ S_ST( 't', 3, 792, 782 ), /* 791 se */
+ S_ST( 'v', 3, 793, 0 ), /* 792 set */
+ S_ST( 'a', 3, 408, 0 ), /* 793 setv */
+ S_ST( 'i', 3, 795, 781 ), /* 794 s */
+ S_ST( 'm', 3, 796, 0 ), /* 795 si */
+ S_ST( 'u', 3, 797, 0 ), /* 796 sim */
+ S_ST( 'l', 3, 798, 0 ), /* 797 simu */
+ S_ST( 'a', 3, 799, 0 ), /* 798 simul */
+ S_ST( 't', 3, 800, 0 ), /* 799 simula */
+ S_ST( 'i', 3, 801, 448 ), /* 800 simulat */
+ S_ST( 'o', 3, 802, 0 ), /* 801 simulati */
+ S_ST( 'n', 3, 803, 0 ), /* 802 simulatio */
+ S_ST( '_', 3, 804, 0 ), /* 803 simulation */
+ S_ST( 'd', 3, 805, 0 ), /* 804 simulation_ */
+ S_ST( 'u', 3, 806, 0 ), /* 805 simulation_d */
+ S_ST( 'r', 3, 807, 0 ), /* 806 simulation_du */
+ S_ST( 'a', 3, 808, 0 ), /* 807 simulation_dur */
+ S_ST( 't', 3, 809, 0 ), /* 808 simulation_dura */
+ S_ST( 'i', 3, 810, 0 ), /* 809 simulation_durat */
+ S_ST( 'o', 3, 450, 0 ), /* 810 simulation_durati */
+ S_ST( 'o', 3, 812, 794 ), /* 811 s */
+ S_ST( 'u', 3, 813, 0 ), /* 812 so */
+ S_ST( 'r', 3, 814, 0 ), /* 813 sou */
+ S_ST( 'c', 3, 409, 0 ), /* 814 sour */
+ S_ST( 't', 3, 838, 811 ), /* 815 s */
+ S_ST( 'a', 3, 822, 0 ), /* 816 st */
+ S_ST( 'c', 3, 818, 0 ), /* 817 sta */
+ S_ST( 'k', 3, 819, 0 ), /* 818 stac */
+ S_ST( 's', 3, 820, 0 ), /* 819 stack */
+ S_ST( 'i', 3, 821, 0 ), /* 820 stacks */
+ S_ST( 'z', 3, 410, 0 ), /* 821 stacksi */
+ S_ST( 't', 3, 412, 817 ), /* 822 sta */
+ S_ST( 'i', 3, 824, 0 ), /* 823 stat */
+ S_ST( 's', 3, 825, 0 ), /* 824 stati */
+ S_ST( 't', 3, 826, 0 ), /* 825 statis */
+ S_ST( 'i', 3, 827, 0 ), /* 826 statist */
+ S_ST( 'c', 3, 411, 0 ), /* 827 statisti */
+ S_ST( 'd', 3, 829, 0 ), /* 828 stats */
+ S_ST( 'i', 3, 413, 0 ), /* 829 statsd */
+ S_ST( 'e', 3, 414, 816 ), /* 830 st */
+ S_ST( 'b', 3, 832, 0 ), /* 831 step */
+ S_ST( 'a', 3, 833, 0 ), /* 832 stepb */
+ S_ST( 'c', 3, 415, 0 ), /* 833 stepba */
+ S_ST( 'f', 3, 835, 831 ), /* 834 step */
+ S_ST( 'w', 3, 416, 0 ), /* 835 stepf */
+ S_ST( 'o', 3, 837, 834 ), /* 836 step */
+ S_ST( 'u', 3, 417, 0 ), /* 837 stepo */
+ S_ST( 'r', 3, 839, 830 ), /* 838 st */
+ S_ST( 'a', 3, 840, 0 ), /* 839 str */
+ S_ST( 't', 3, 841, 0 ), /* 840 stra */
+ S_ST( 'u', 3, 418, 0 ), /* 841 strat */
+ S_ST( 'y', 3, 420, 815 ), /* 842 s */
+ S_ST( 's', 3, 844, 0 ), /* 843 sys */
+ S_ST( 't', 3, 845, 0 ), /* 844 syss */
+ S_ST( 'a', 3, 846, 0 ), /* 845 sysst */
+ S_ST( 't', 3, 421, 0 ), /* 846 syssta */
+ S_ST( 't', 3, 873, 769 ), /* 847 */
+ S_ST( 'i', 3, 859, 0 ), /* 848 t */
+ S_ST( 'c', 3, 422, 0 ), /* 849 ti */
+ S_ST( 'm', 3, 852, 849 ), /* 850 ti */
+ S_ST( 'e', 3, 425, 0 ), /* 851 tim */
+ S_ST( 'i', 3, 853, 851 ), /* 852 tim */
+ S_ST( 'n', 3, 854, 0 ), /* 853 timi */
+ S_ST( 'g', 3, 855, 0 ), /* 854 timin */
+ S_ST( 's', 3, 856, 0 ), /* 855 timing */
+ S_ST( 't', 3, 857, 0 ), /* 856 timings */
+ S_ST( 'a', 3, 858, 0 ), /* 857 timingst */
+ S_ST( 't', 3, 426, 0 ), /* 858 timingsta */
+ S_ST( 'n', 3, 860, 850 ), /* 859 ti */
+ S_ST( 'k', 3, 861, 0 ), /* 860 tin */
+ S_ST( 'e', 3, 427, 0 ), /* 861 tink */
+ S_ST( 'o', 3, 428, 848 ), /* 862 t */
+ S_ST( 'r', 3, 865, 862 ), /* 863 t */
+ S_ST( 'a', 3, 429, 0 ), /* 864 tr */
+ S_ST( 'u', 3, 866, 864 ), /* 865 tr */
+ S_ST( 's', 3, 867, 430 ), /* 866 tru */
+ S_ST( 't', 3, 868, 0 ), /* 867 trus */
+ S_ST( 'e', 3, 869, 0 ), /* 868 trust */
+ S_ST( 'd', 3, 870, 0 ), /* 869 truste */
+ S_ST( 'k', 3, 871, 0 ), /* 870 trusted */
+ S_ST( 'e', 3, 431, 0 ), /* 871 trustedk */
+ S_ST( 't', 3, 432, 863 ), /* 872 t */
+ S_ST( 'y', 3, 874, 872 ), /* 873 t */
+ S_ST( 'p', 3, 433, 0 ), /* 874 ty */
+ S_ST( 'u', 3, 876, 847 ), /* 875 */
+ S_ST( 'n', 3, 882, 0 ), /* 876 u */
+ S_ST( 'c', 3, 878, 0 ), /* 877 un */
+ S_ST( 'o', 3, 879, 0 ), /* 878 unc */
+ S_ST( 'n', 3, 880, 0 ), /* 879 unco */
+ S_ST( 'f', 3, 881, 0 ), /* 880 uncon */
+ S_ST( 'i', 3, 438, 0 ), /* 881 unconf */
+ S_ST( 'p', 3, 883, 877 ), /* 882 un */
+ S_ST( 'e', 3, 884, 0 ), /* 883 unp */
+ S_ST( 'e', 3, 439, 0 ), /* 884 unpe */
+ S_ST( '_', 3, 905, 0 ), /* 885 unpeer */
+ S_ST( 'c', 3, 887, 0 ), /* 886 unpeer_ */
+ S_ST( 'r', 3, 888, 0 ), /* 887 unpeer_c */
+ S_ST( 'y', 3, 889, 0 ), /* 888 unpeer_cr */
+ S_ST( 'p', 3, 890, 0 ), /* 889 unpeer_cry */
+ S_ST( 't', 3, 891, 0 ), /* 890 unpeer_cryp */
+ S_ST( 'o', 3, 892, 0 ), /* 891 unpeer_crypt */
+ S_ST( '_', 3, 897, 0 ), /* 892 unpeer_crypto */
+ S_ST( 'e', 3, 894, 0 ), /* 893 unpeer_crypto_ */
+ S_ST( 'a', 3, 895, 0 ), /* 894 unpeer_crypto_e */
+ S_ST( 'r', 3, 896, 0 ), /* 895 unpeer_crypto_ea */
+ S_ST( 'l', 3, 435, 0 ), /* 896 unpeer_crypto_ear */
+ S_ST( 'n', 3, 898, 893 ), /* 897 unpeer_crypto_ */
+ S_ST( 'a', 3, 899, 0 ), /* 898 unpeer_crypto_n */
+ S_ST( 'k', 3, 900, 0 ), /* 899 unpeer_crypto_na */
+ S_ST( '_', 3, 901, 0 ), /* 900 unpeer_crypto_nak */
+ S_ST( 'e', 3, 902, 0 ), /* 901 unpeer_crypto_nak_ */
+ S_ST( 'a', 3, 903, 0 ), /* 902 unpeer_crypto_nak_e */
+ S_ST( 'r', 3, 904, 0 ), /* 903 unpeer_crypto_nak_ea */
+ S_ST( 'l', 3, 436, 0 ), /* 904 unpeer_crypto_nak_ear */
+ S_ST( 'd', 3, 906, 886 ), /* 905 unpeer_ */
+ S_ST( 'i', 3, 907, 0 ), /* 906 unpeer_d */
+ S_ST( 'g', 3, 908, 0 ), /* 907 unpeer_di */
+ S_ST( 'e', 3, 909, 0 ), /* 908 unpeer_dig */
+ S_ST( 's', 3, 910, 0 ), /* 909 unpeer_dige */
+ S_ST( 't', 3, 911, 0 ), /* 910 unpeer_diges */
+ S_ST( '_', 3, 912, 0 ), /* 911 unpeer_digest */
+ S_ST( 'e', 3, 913, 0 ), /* 912 unpeer_digest_ */
+ S_ST( 'a', 3, 914, 0 ), /* 913 unpeer_digest_e */
+ S_ST( 'r', 3, 915, 0 ), /* 914 unpeer_digest_ea */
+ S_ST( 'l', 3, 437, 0 ), /* 915 unpeer_digest_ear */
+ S_ST( 'v', 3, 917, 875 ), /* 916 */
+ S_ST( 'e', 3, 918, 0 ), /* 917 v */
+ S_ST( 'r', 3, 919, 0 ), /* 918 ve */
+ S_ST( 's', 3, 920, 0 ), /* 919 ver */
+ S_ST( 'i', 3, 921, 0 ), /* 920 vers */
+ S_ST( 'o', 3, 440, 0 ), /* 921 versi */
+ S_ST( 'w', 3, 929, 916 ), /* 922 */
+ S_ST( 'a', 3, 924, 0 ), /* 923 w */
+ S_ST( 'n', 3, 925, 0 ), /* 924 wa */
+ S_ST( 'd', 3, 926, 0 ), /* 925 wan */
+ S_ST( 'e', 3, 454, 0 ), /* 926 wand */
+ S_ST( 'e', 3, 928, 923 ), /* 927 w */
+ S_ST( 'e', 3, 442, 0 ), /* 928 we */
+ S_ST( 'i', 3, 930, 927 ), /* 929 w */
+ S_ST( 'l', 3, 931, 0 ), /* 930 wi */
+ S_ST( 'd', 3, 932, 0 ), /* 931 wil */
+ S_ST( 'c', 3, 933, 0 ), /* 932 wild */
+ S_ST( 'a', 3, 934, 0 ), /* 933 wildc */
+ S_ST( 'r', 3, 443, 0 ), /* 934 wildca */
+ S_ST( 'x', 3, 936, 922 ), /* 935 */
+ S_ST( 'l', 3, 937, 0 ), /* 936 x */
+ S_ST( 'e', 3, 938, 0 ), /* 937 xl */
+ S_ST( 'a', 3, 939, 0 ), /* 938 xle */
+ S_ST( 'v', 3, 444, 0 ), /* 939 xlea */
+ S_ST( 'y', 3, 941, 935 ), /* 940 [initial state] */
+ S_ST( 'e', 3, 942, 0 ), /* 941 y */
+ S_ST( 'a', 3, 445, 0 ) /* 942 ye */
};
diff --git a/ntpd/ntp_leapsec.c b/ntpd/ntp_leapsec.c
index 7a652f5cf6b9..95a06736751b 100644
--- a/ntpd/ntp_leapsec.c
+++ b/ntpd/ntp_leapsec.c
@@ -743,14 +743,24 @@ add_range(
const leap_info_t * pi)
{
/* If the table is full, make room by throwing out the oldest
- * entry. But remember the accumulated leap seconds! Likewise,
- * assume a positive leap insertion if this is the first entry
- * in the table. This is not necessarily the best of all ideas,
- * but it helps a great deal if a system does not have a leap
- * table and gets updated from an upstream server.
+ * entry. But remember the accumulated leap seconds!
+ *
+ * Setting the first entry is a bit tricky, too: Simply assuming
+ * it is an insertion is wrong if the first entry is a dynamic
+ * leap second removal. So we decide on the sign -- if the first
+ * entry has a negative offset, we assume that it is a leap
+ * second removal. In both cases the table base offset is set
+ * accordingly to reflect the decision.
+ *
+ * In practice starting with a removal can only happen if the
+ * first entry is a dynamic request without having a leap file
+ * for the history proper.
*/
if (pt->head.size == 0) {
- pt->head.base_tai = pi->taiof - 1;
+ if (pi->taiof >= 0)
+ pt->head.base_tai = pi->taiof - 1;
+ else
+ pt->head.base_tai = pi->taiof + 1;
} else if (pt->head.size >= MAX_HIST) {
pt->head.size = MAX_HIST - 1;
pt->head.base_tai = pt->info[pt->head.size].taiof;
diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c
index 7114a6568996..782019cdfa0c 100644
--- a/ntpd/ntp_parser.c
+++ b/ntpd/ntp_parser.c
@@ -62,7 +62,7 @@
/* Copy the first part of user declarations. */
-#line 11 "ntp_parser.y" /* yacc.c:339 */
+#line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339 */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -116,8 +116,8 @@
/* In a future release of Bison, this section will be replaced
by #include "y.tab.h". */
-#ifndef YY_YY_Y_TAB_H_INCLUDED
-# define YY_YY_Y_TAB_H_INCLUDED
+#ifndef YY_YY_NTP_PARSER_H_INCLUDED
+# define YY_YY_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -140,193 +140,197 @@ extern int yydebug;
T_Autokey = 264,
T_Automax = 265,
T_Average = 266,
- T_Bclient = 267,
- T_Bcpollbstep = 268,
- T_Beacon = 269,
- T_Broadcast = 270,
- T_Broadcastclient = 271,
- T_Broadcastdelay = 272,
- T_Burst = 273,
- T_Calibrate = 274,
- T_Ceiling = 275,
- T_Clockstats = 276,
- T_Cohort = 277,
- T_ControlKey = 278,
- T_Crypto = 279,
- T_Cryptostats = 280,
- T_Ctl = 281,
- T_Day = 282,
- T_Default = 283,
- T_Digest = 284,
- T_Disable = 285,
- T_Discard = 286,
- T_Dispersion = 287,
- T_Double = 288,
- T_Driftfile = 289,
- T_Drop = 290,
- T_Dscp = 291,
- T_Ellipsis = 292,
- T_Enable = 293,
- T_End = 294,
- T_False = 295,
- T_File = 296,
- T_Filegen = 297,
- T_Filenum = 298,
- T_Flag1 = 299,
- T_Flag2 = 300,
- T_Flag3 = 301,
- T_Flag4 = 302,
- T_Flake = 303,
- T_Floor = 304,
- T_Freq = 305,
- T_Fudge = 306,
- T_Host = 307,
- T_Huffpuff = 308,
- T_Iburst = 309,
- T_Ident = 310,
- T_Ignore = 311,
- T_Incalloc = 312,
- T_Incmem = 313,
- T_Initalloc = 314,
- T_Initmem = 315,
- T_Includefile = 316,
- T_Integer = 317,
- T_Interface = 318,
- T_Intrange = 319,
- T_Io = 320,
- T_Ipv4 = 321,
- T_Ipv4_flag = 322,
- T_Ipv6 = 323,
- T_Ipv6_flag = 324,
- T_Kernel = 325,
- T_Key = 326,
- T_Keys = 327,
- T_Keysdir = 328,
- T_Kod = 329,
- T_Mssntp = 330,
- T_Leapfile = 331,
- T_Leapsmearinterval = 332,
- T_Limited = 333,
- T_Link = 334,
- T_Listen = 335,
- T_Logconfig = 336,
- T_Logfile = 337,
- T_Loopstats = 338,
- T_Lowpriotrap = 339,
- T_Manycastclient = 340,
- T_Manycastserver = 341,
- T_Mask = 342,
- T_Maxage = 343,
- T_Maxclock = 344,
- T_Maxdepth = 345,
- T_Maxdist = 346,
- T_Maxmem = 347,
- T_Maxpoll = 348,
- T_Mdnstries = 349,
- T_Mem = 350,
- T_Memlock = 351,
- T_Minclock = 352,
- T_Mindepth = 353,
- T_Mindist = 354,
- T_Minimum = 355,
- T_Minpoll = 356,
- T_Minsane = 357,
- T_Mode = 358,
- T_Mode7 = 359,
- T_Monitor = 360,
- T_Month = 361,
- T_Mru = 362,
- T_Multicastclient = 363,
- T_Nic = 364,
- T_Nolink = 365,
- T_Nomodify = 366,
- T_Nomrulist = 367,
- T_None = 368,
- T_Nonvolatile = 369,
- T_Nopeer = 370,
- T_Noquery = 371,
- T_Noselect = 372,
- T_Noserve = 373,
- T_Notrap = 374,
- T_Notrust = 375,
- T_Ntp = 376,
- T_Ntpport = 377,
- T_NtpSignDsocket = 378,
- T_Orphan = 379,
- T_Orphanwait = 380,
- T_PCEdigest = 381,
- T_Panic = 382,
- T_Peer = 383,
- T_Peerstats = 384,
- T_Phone = 385,
- T_Pid = 386,
- T_Pidfile = 387,
- T_Pool = 388,
- T_Port = 389,
- T_Preempt = 390,
- T_Prefer = 391,
- T_Protostats = 392,
- T_Pw = 393,
- T_Randfile = 394,
- T_Rawstats = 395,
- T_Refid = 396,
- T_Requestkey = 397,
- T_Reset = 398,
- T_Restrict = 399,
- T_Revoke = 400,
- T_Rlimit = 401,
- T_Saveconfigdir = 402,
- T_Server = 403,
- T_Setvar = 404,
- T_Source = 405,
- T_Stacksize = 406,
- T_Statistics = 407,
- T_Stats = 408,
- T_Statsdir = 409,
- T_Step = 410,
- T_Stepback = 411,
- T_Stepfwd = 412,
- T_Stepout = 413,
- T_Stratum = 414,
- T_String = 415,
- T_Sys = 416,
- T_Sysstats = 417,
- T_Tick = 418,
- T_Time1 = 419,
- T_Time2 = 420,
- T_Timer = 421,
- T_Timingstats = 422,
- T_Tinker = 423,
- T_Tos = 424,
- T_Trap = 425,
- T_True = 426,
- T_Trustedkey = 427,
- T_Ttl = 428,
- T_Type = 429,
- T_U_int = 430,
- T_UEcrypto = 431,
- T_UEcryptonak = 432,
- T_UEdigest = 433,
- T_Unconfig = 434,
- T_Unpeer = 435,
- T_Version = 436,
- T_WanderThreshold = 437,
- T_Week = 438,
- T_Wildcard = 439,
- T_Xleave = 440,
- T_Year = 441,
- T_Flag = 442,
- T_EOC = 443,
- T_Simulate = 444,
- T_Beep_Delay = 445,
- T_Sim_Duration = 446,
- T_Server_Offset = 447,
- T_Duration = 448,
- T_Freq_Offset = 449,
- T_Wander = 450,
- T_Jitter = 451,
- T_Prop_Delay = 452,
- T_Proc_Delay = 453
+ T_Basedate = 267,
+ T_Bclient = 268,
+ T_Bcpollbstep = 269,
+ T_Beacon = 270,
+ T_Broadcast = 271,
+ T_Broadcastclient = 272,
+ T_Broadcastdelay = 273,
+ T_Burst = 274,
+ T_Calibrate = 275,
+ T_Ceiling = 276,
+ T_Clockstats = 277,
+ T_Cohort = 278,
+ T_ControlKey = 279,
+ T_Crypto = 280,
+ T_Cryptostats = 281,
+ T_Ctl = 282,
+ T_Day = 283,
+ T_Default = 284,
+ T_Digest = 285,
+ T_Disable = 286,
+ T_Discard = 287,
+ T_Dispersion = 288,
+ T_Double = 289,
+ T_Driftfile = 290,
+ T_Drop = 291,
+ T_Dscp = 292,
+ T_Ellipsis = 293,
+ T_Enable = 294,
+ T_End = 295,
+ T_Epeer = 296,
+ T_False = 297,
+ T_File = 298,
+ T_Filegen = 299,
+ T_Filenum = 300,
+ T_Flag1 = 301,
+ T_Flag2 = 302,
+ T_Flag3 = 303,
+ T_Flag4 = 304,
+ T_Flake = 305,
+ T_Floor = 306,
+ T_Freq = 307,
+ T_Fudge = 308,
+ T_Host = 309,
+ T_Huffpuff = 310,
+ T_Iburst = 311,
+ T_Ident = 312,
+ T_Ignore = 313,
+ T_Incalloc = 314,
+ T_Incmem = 315,
+ T_Initalloc = 316,
+ T_Initmem = 317,
+ T_Includefile = 318,
+ T_Integer = 319,
+ T_Interface = 320,
+ T_Intrange = 321,
+ T_Io = 322,
+ T_Ippeerlimit = 323,
+ T_Ipv4 = 324,
+ T_Ipv4_flag = 325,
+ T_Ipv6 = 326,
+ T_Ipv6_flag = 327,
+ T_Kernel = 328,
+ T_Key = 329,
+ T_Keys = 330,
+ T_Keysdir = 331,
+ T_Kod = 332,
+ T_Mssntp = 333,
+ T_Leapfile = 334,
+ T_Leapsmearinterval = 335,
+ T_Limited = 336,
+ T_Link = 337,
+ T_Listen = 338,
+ T_Logconfig = 339,
+ T_Logfile = 340,
+ T_Loopstats = 341,
+ T_Lowpriotrap = 342,
+ T_Manycastclient = 343,
+ T_Manycastserver = 344,
+ T_Mask = 345,
+ T_Maxage = 346,
+ T_Maxclock = 347,
+ T_Maxdepth = 348,
+ T_Maxdist = 349,
+ T_Maxmem = 350,
+ T_Maxpoll = 351,
+ T_Mdnstries = 352,
+ T_Mem = 353,
+ T_Memlock = 354,
+ T_Minclock = 355,
+ T_Mindepth = 356,
+ T_Mindist = 357,
+ T_Minimum = 358,
+ T_Minpoll = 359,
+ T_Minsane = 360,
+ T_Mode = 361,
+ T_Mode7 = 362,
+ T_Monitor = 363,
+ T_Month = 364,
+ T_Mru = 365,
+ T_Multicastclient = 366,
+ T_Nic = 367,
+ T_Nolink = 368,
+ T_Nomodify = 369,
+ T_Nomrulist = 370,
+ T_None = 371,
+ T_Nonvolatile = 372,
+ T_Noepeer = 373,
+ T_Nopeer = 374,
+ T_Noquery = 375,
+ T_Noselect = 376,
+ T_Noserve = 377,
+ T_Notrap = 378,
+ T_Notrust = 379,
+ T_Ntp = 380,
+ T_Ntpport = 381,
+ T_NtpSignDsocket = 382,
+ T_Orphan = 383,
+ T_Orphanwait = 384,
+ T_PCEdigest = 385,
+ T_Panic = 386,
+ T_Peer = 387,
+ T_Peerstats = 388,
+ T_Phone = 389,
+ T_Pid = 390,
+ T_Pidfile = 391,
+ T_Pool = 392,
+ T_Port = 393,
+ T_Preempt = 394,
+ T_Prefer = 395,
+ T_Protostats = 396,
+ T_Pw = 397,
+ T_Randfile = 398,
+ T_Rawstats = 399,
+ T_Refid = 400,
+ T_Requestkey = 401,
+ T_Reset = 402,
+ T_Restrict = 403,
+ T_Revoke = 404,
+ T_Rlimit = 405,
+ T_Saveconfigdir = 406,
+ T_Server = 407,
+ T_Setvar = 408,
+ T_Source = 409,
+ T_Stacksize = 410,
+ T_Statistics = 411,
+ T_Stats = 412,
+ T_Statsdir = 413,
+ T_Step = 414,
+ T_Stepback = 415,
+ T_Stepfwd = 416,
+ T_Stepout = 417,
+ T_Stratum = 418,
+ T_String = 419,
+ T_Sys = 420,
+ T_Sysstats = 421,
+ T_Tick = 422,
+ T_Time1 = 423,
+ T_Time2 = 424,
+ T_Timer = 425,
+ T_Timingstats = 426,
+ T_Tinker = 427,
+ T_Tos = 428,
+ T_Trap = 429,
+ T_True = 430,
+ T_Trustedkey = 431,
+ T_Ttl = 432,
+ T_Type = 433,
+ T_U_int = 434,
+ T_UEcrypto = 435,
+ T_UEcryptonak = 436,
+ T_UEdigest = 437,
+ T_Unconfig = 438,
+ T_Unpeer = 439,
+ T_Version = 440,
+ T_WanderThreshold = 441,
+ T_Week = 442,
+ T_Wildcard = 443,
+ T_Xleave = 444,
+ T_Year = 445,
+ T_Flag = 446,
+ T_EOC = 447,
+ T_Simulate = 448,
+ T_Beep_Delay = 449,
+ T_Sim_Duration = 450,
+ T_Server_Offset = 451,
+ T_Duration = 452,
+ T_Freq_Offset = 453,
+ T_Wander = 454,
+ T_Jitter = 455,
+ T_Prop_Delay = 456,
+ T_Proc_Delay = 457
};
#endif
/* Tokens. */
@@ -339,200 +343,204 @@ extern int yydebug;
#define T_Autokey 264
#define T_Automax 265
#define T_Average 266
-#define T_Bclient 267
-#define T_Bcpollbstep 268
-#define T_Beacon 269
-#define T_Broadcast 270
-#define T_Broadcastclient 271
-#define T_Broadcastdelay 272
-#define T_Burst 273
-#define T_Calibrate 274
-#define T_Ceiling 275
-#define T_Clockstats 276
-#define T_Cohort 277
-#define T_ControlKey 278
-#define T_Crypto 279
-#define T_Cryptostats 280
-#define T_Ctl 281
-#define T_Day 282
-#define T_Default 283
-#define T_Digest 284
-#define T_Disable 285
-#define T_Discard 286
-#define T_Dispersion 287
-#define T_Double 288
-#define T_Driftfile 289
-#define T_Drop 290
-#define T_Dscp 291
-#define T_Ellipsis 292
-#define T_Enable 293
-#define T_End 294
-#define T_False 295
-#define T_File 296
-#define T_Filegen 297
-#define T_Filenum 298
-#define T_Flag1 299
-#define T_Flag2 300
-#define T_Flag3 301
-#define T_Flag4 302
-#define T_Flake 303
-#define T_Floor 304
-#define T_Freq 305
-#define T_Fudge 306
-#define T_Host 307
-#define T_Huffpuff 308
-#define T_Iburst 309
-#define T_Ident 310
-#define T_Ignore 311
-#define T_Incalloc 312
-#define T_Incmem 313
-#define T_Initalloc 314
-#define T_Initmem 315
-#define T_Includefile 316
-#define T_Integer 317
-#define T_Interface 318
-#define T_Intrange 319
-#define T_Io 320
-#define T_Ipv4 321
-#define T_Ipv4_flag 322
-#define T_Ipv6 323
-#define T_Ipv6_flag 324
-#define T_Kernel 325
-#define T_Key 326
-#define T_Keys 327
-#define T_Keysdir 328
-#define T_Kod 329
-#define T_Mssntp 330
-#define T_Leapfile 331
-#define T_Leapsmearinterval 332
-#define T_Limited 333
-#define T_Link 334
-#define T_Listen 335
-#define T_Logconfig 336
-#define T_Logfile 337
-#define T_Loopstats 338
-#define T_Lowpriotrap 339
-#define T_Manycastclient 340
-#define T_Manycastserver 341
-#define T_Mask 342
-#define T_Maxage 343
-#define T_Maxclock 344
-#define T_Maxdepth 345
-#define T_Maxdist 346
-#define T_Maxmem 347
-#define T_Maxpoll 348
-#define T_Mdnstries 349
-#define T_Mem 350
-#define T_Memlock 351
-#define T_Minclock 352
-#define T_Mindepth 353
-#define T_Mindist 354
-#define T_Minimum 355
-#define T_Minpoll 356
-#define T_Minsane 357
-#define T_Mode 358
-#define T_Mode7 359
-#define T_Monitor 360
-#define T_Month 361
-#define T_Mru 362
-#define T_Multicastclient 363
-#define T_Nic 364
-#define T_Nolink 365
-#define T_Nomodify 366
-#define T_Nomrulist 367
-#define T_None 368
-#define T_Nonvolatile 369
-#define T_Nopeer 370
-#define T_Noquery 371
-#define T_Noselect 372
-#define T_Noserve 373
-#define T_Notrap 374
-#define T_Notrust 375
-#define T_Ntp 376
-#define T_Ntpport 377
-#define T_NtpSignDsocket 378
-#define T_Orphan 379
-#define T_Orphanwait 380
-#define T_PCEdigest 381
-#define T_Panic 382
-#define T_Peer 383
-#define T_Peerstats 384
-#define T_Phone 385
-#define T_Pid 386
-#define T_Pidfile 387
-#define T_Pool 388
-#define T_Port 389
-#define T_Preempt 390
-#define T_Prefer 391
-#define T_Protostats 392
-#define T_Pw 393
-#define T_Randfile 394
-#define T_Rawstats 395
-#define T_Refid 396
-#define T_Requestkey 397
-#define T_Reset 398
-#define T_Restrict 399
-#define T_Revoke 400
-#define T_Rlimit 401
-#define T_Saveconfigdir 402
-#define T_Server 403
-#define T_Setvar 404
-#define T_Source 405
-#define T_Stacksize 406
-#define T_Statistics 407
-#define T_Stats 408
-#define T_Statsdir 409
-#define T_Step 410
-#define T_Stepback 411
-#define T_Stepfwd 412
-#define T_Stepout 413
-#define T_Stratum 414
-#define T_String 415
-#define T_Sys 416
-#define T_Sysstats 417
-#define T_Tick 418
-#define T_Time1 419
-#define T_Time2 420
-#define T_Timer 421
-#define T_Timingstats 422
-#define T_Tinker 423
-#define T_Tos 424
-#define T_Trap 425
-#define T_True 426
-#define T_Trustedkey 427
-#define T_Ttl 428
-#define T_Type 429
-#define T_U_int 430
-#define T_UEcrypto 431
-#define T_UEcryptonak 432
-#define T_UEdigest 433
-#define T_Unconfig 434
-#define T_Unpeer 435
-#define T_Version 436
-#define T_WanderThreshold 437
-#define T_Week 438
-#define T_Wildcard 439
-#define T_Xleave 440
-#define T_Year 441
-#define T_Flag 442
-#define T_EOC 443
-#define T_Simulate 444
-#define T_Beep_Delay 445
-#define T_Sim_Duration 446
-#define T_Server_Offset 447
-#define T_Duration 448
-#define T_Freq_Offset 449
-#define T_Wander 450
-#define T_Jitter 451
-#define T_Prop_Delay 452
-#define T_Proc_Delay 453
+#define T_Basedate 267
+#define T_Bclient 268
+#define T_Bcpollbstep 269
+#define T_Beacon 270
+#define T_Broadcast 271
+#define T_Broadcastclient 272
+#define T_Broadcastdelay 273
+#define T_Burst 274
+#define T_Calibrate 275
+#define T_Ceiling 276
+#define T_Clockstats 277
+#define T_Cohort 278
+#define T_ControlKey 279
+#define T_Crypto 280
+#define T_Cryptostats 281
+#define T_Ctl 282
+#define T_Day 283
+#define T_Default 284
+#define T_Digest 285
+#define T_Disable 286
+#define T_Discard 287
+#define T_Dispersion 288
+#define T_Double 289
+#define T_Driftfile 290
+#define T_Drop 291
+#define T_Dscp 292
+#define T_Ellipsis 293
+#define T_Enable 294
+#define T_End 295
+#define T_Epeer 296
+#define T_False 297
+#define T_File 298
+#define T_Filegen 299
+#define T_Filenum 300
+#define T_Flag1 301
+#define T_Flag2 302
+#define T_Flag3 303
+#define T_Flag4 304
+#define T_Flake 305
+#define T_Floor 306
+#define T_Freq 307
+#define T_Fudge 308
+#define T_Host 309
+#define T_Huffpuff 310
+#define T_Iburst 311
+#define T_Ident 312
+#define T_Ignore 313
+#define T_Incalloc 314
+#define T_Incmem 315
+#define T_Initalloc 316
+#define T_Initmem 317
+#define T_Includefile 318
+#define T_Integer 319
+#define T_Interface 320
+#define T_Intrange 321
+#define T_Io 322
+#define T_Ippeerlimit 323
+#define T_Ipv4 324
+#define T_Ipv4_flag 325
+#define T_Ipv6 326
+#define T_Ipv6_flag 327
+#define T_Kernel 328
+#define T_Key 329
+#define T_Keys 330
+#define T_Keysdir 331
+#define T_Kod 332
+#define T_Mssntp 333
+#define T_Leapfile 334
+#define T_Leapsmearinterval 335
+#define T_Limited 336
+#define T_Link 337
+#define T_Listen 338
+#define T_Logconfig 339
+#define T_Logfile 340
+#define T_Loopstats 341
+#define T_Lowpriotrap 342
+#define T_Manycastclient 343
+#define T_Manycastserver 344
+#define T_Mask 345
+#define T_Maxage 346
+#define T_Maxclock 347
+#define T_Maxdepth 348
+#define T_Maxdist 349
+#define T_Maxmem 350
+#define T_Maxpoll 351
+#define T_Mdnstries 352
+#define T_Mem 353
+#define T_Memlock 354
+#define T_Minclock 355
+#define T_Mindepth 356
+#define T_Mindist 357
+#define T_Minimum 358
+#define T_Minpoll 359
+#define T_Minsane 360
+#define T_Mode 361
+#define T_Mode7 362
+#define T_Monitor 363
+#define T_Month 364
+#define T_Mru 365
+#define T_Multicastclient 366
+#define T_Nic 367
+#define T_Nolink 368
+#define T_Nomodify 369
+#define T_Nomrulist 370
+#define T_None 371
+#define T_Nonvolatile 372
+#define T_Noepeer 373
+#define T_Nopeer 374
+#define T_Noquery 375
+#define T_Noselect 376
+#define T_Noserve 377
+#define T_Notrap 378
+#define T_Notrust 379
+#define T_Ntp 380
+#define T_Ntpport 381
+#define T_NtpSignDsocket 382
+#define T_Orphan 383
+#define T_Orphanwait 384
+#define T_PCEdigest 385
+#define T_Panic 386
+#define T_Peer 387
+#define T_Peerstats 388
+#define T_Phone 389
+#define T_Pid 390
+#define T_Pidfile 391
+#define T_Pool 392
+#define T_Port 393
+#define T_Preempt 394
+#define T_Prefer 395
+#define T_Protostats 396
+#define T_Pw 397
+#define T_Randfile 398
+#define T_Rawstats 399
+#define T_Refid 400
+#define T_Requestkey 401
+#define T_Reset 402
+#define T_Restrict 403
+#define T_Revoke 404
+#define T_Rlimit 405
+#define T_Saveconfigdir 406
+#define T_Server 407
+#define T_Setvar 408
+#define T_Source 409
+#define T_Stacksize 410
+#define T_Statistics 411
+#define T_Stats 412
+#define T_Statsdir 413
+#define T_Step 414
+#define T_Stepback 415
+#define T_Stepfwd 416
+#define T_Stepout 417
+#define T_Stratum 418
+#define T_String 419
+#define T_Sys 420
+#define T_Sysstats 421
+#define T_Tick 422
+#define T_Time1 423
+#define T_Time2 424
+#define T_Timer 425
+#define T_Timingstats 426
+#define T_Tinker 427
+#define T_Tos 428
+#define T_Trap 429
+#define T_True 430
+#define T_Trustedkey 431
+#define T_Ttl 432
+#define T_Type 433
+#define T_U_int 434
+#define T_UEcrypto 435
+#define T_UEcryptonak 436
+#define T_UEdigest 437
+#define T_Unconfig 438
+#define T_Unpeer 439
+#define T_Version 440
+#define T_WanderThreshold 441
+#define T_Week 442
+#define T_Wildcard 443
+#define T_Xleave 444
+#define T_Year 445
+#define T_Flag 446
+#define T_EOC 447
+#define T_Simulate 448
+#define T_Beep_Delay 449
+#define T_Sim_Duration 450
+#define T_Server_Offset 451
+#define T_Duration 452
+#define T_Freq_Offset 453
+#define T_Wander 454
+#define T_Jitter 455
+#define T_Prop_Delay 456
+#define T_Proc_Delay 457
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
-#line 51 "ntp_parser.y" /* yacc.c:355 */
+#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
char * String;
double Double;
@@ -551,7 +559,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 555 "ntp_parser.c" /* yacc.c:355 */
+#line 563 "ntp_parser.c" /* yacc.c:355 */
};
typedef union YYSTYPE YYSTYPE;
@@ -564,11 +572,11 @@ extern YYSTYPE yylval;
int yyparse (void);
-#endif /* !YY_YY_Y_TAB_H_INCLUDED */
+#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
/* Copy the second part of user declarations. */
-#line 572 "ntp_parser.c" /* yacc.c:358 */
+#line 580 "ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -808,23 +816,23 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 215
+#define YYFINAL 216
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 654
+#define YYLAST 662
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 204
+#define YYNTOKENS 208
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 105
+#define YYNNTS 107
/* YYNRULES -- Number of rules. */
-#define YYNRULES 318
+#define YYNRULES 324
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 424
+#define YYNSTATES 436
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 453
+#define YYMAXUTOK 457
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -837,15 +845,15 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 200, 201, 2, 2, 2, 2, 2, 2, 2, 2,
+ 204, 205, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 199, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 203, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 202, 2, 203, 2, 2, 2, 2,
+ 2, 2, 2, 206, 2, 207, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -878,45 +886,46 @@ static const yytype_uint8 yytranslate[] =
165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
- 195, 196, 197, 198
+ 195, 196, 197, 198, 199, 200, 201, 202
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 371, 371, 375, 376, 377, 392, 393, 394, 395,
- 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
- 413, 423, 424, 425, 426, 427, 431, 432, 437, 442,
- 444, 450, 451, 459, 460, 461, 465, 470, 471, 472,
- 473, 474, 475, 476, 477, 481, 483, 488, 489, 490,
- 491, 492, 493, 497, 502, 511, 521, 522, 532, 534,
- 536, 538, 549, 556, 558, 563, 565, 567, 569, 571,
- 580, 586, 587, 595, 597, 609, 610, 611, 612, 613,
- 622, 627, 632, 640, 642, 644, 649, 650, 651, 652,
- 653, 654, 655, 656, 657, 661, 662, 671, 673, 682,
- 692, 697, 705, 706, 707, 708, 709, 710, 711, 712,
- 717, 718, 726, 736, 745, 760, 765, 766, 770, 771,
- 775, 776, 777, 778, 779, 780, 781, 790, 794, 798,
- 806, 814, 822, 837, 852, 865, 866, 874, 875, 876,
- 877, 878, 879, 880, 881, 882, 883, 884, 885, 886,
- 887, 888, 892, 897, 905, 910, 911, 912, 916, 921,
- 929, 934, 935, 936, 937, 938, 939, 940, 941, 949,
- 959, 964, 972, 974, 976, 985, 987, 992, 993, 997,
- 998, 999, 1000, 1008, 1013, 1018, 1026, 1031, 1032, 1033,
- 1042, 1044, 1049, 1054, 1062, 1064, 1081, 1082, 1083, 1084,
- 1085, 1086, 1090, 1091, 1092, 1093, 1094, 1095, 1103, 1108,
- 1113, 1121, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133,
- 1134, 1135, 1144, 1145, 1146, 1153, 1160, 1167, 1183, 1202,
- 1204, 1206, 1208, 1210, 1212, 1219, 1224, 1225, 1226, 1230,
- 1234, 1243, 1244, 1248, 1249, 1250, 1254, 1265, 1279, 1291,
- 1296, 1298, 1303, 1304, 1312, 1314, 1322, 1327, 1335, 1360,
- 1367, 1377, 1378, 1382, 1383, 1384, 1385, 1389, 1390, 1391,
- 1395, 1400, 1405, 1413, 1414, 1415, 1416, 1417, 1418, 1419,
- 1429, 1434, 1442, 1447, 1455, 1457, 1461, 1466, 1471, 1479,
- 1484, 1492, 1501, 1502, 1506, 1507, 1516, 1534, 1538, 1543,
- 1551, 1556, 1557, 1561, 1566, 1574, 1579, 1584, 1589, 1594,
- 1602, 1607, 1612, 1620, 1625, 1626, 1627, 1628, 1629
+ 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
};
#endif
@@ -927,53 +936,54 @@ static const char *const yytname[] =
{
"$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
"T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
- "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
+ "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
"T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
"T_Ceiling", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto",
"T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable",
"T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop",
- "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_False", "T_File",
- "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4",
- "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff",
- "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc", "T_Incmem",
- "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer", "T_Interface",
- "T_Intrange", "T_Io", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag",
- "T_Kernel", "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp",
- "T_Leapfile", "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen",
- "T_Logconfig", "T_Logfile", "T_Loopstats", "T_Lowpriotrap",
- "T_Manycastclient", "T_Manycastserver", "T_Mask", "T_Maxage",
- "T_Maxclock", "T_Maxdepth", "T_Maxdist", "T_Maxmem", "T_Maxpoll",
- "T_Mdnstries", "T_Mem", "T_Memlock", "T_Minclock", "T_Mindepth",
- "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
- "T_Monitor", "T_Month", "T_Mru", "T_Multicastclient", "T_Nic",
- "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None", "T_Nonvolatile",
- "T_Nopeer", "T_Noquery", "T_Noselect", "T_Noserve", "T_Notrap",
- "T_Notrust", "T_Ntp", "T_Ntpport", "T_NtpSignDsocket", "T_Orphan",
- "T_Orphanwait", "T_PCEdigest", "T_Panic", "T_Peer", "T_Peerstats",
- "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port", "T_Preempt",
- "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile", "T_Rawstats",
- "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict", "T_Revoke",
- "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar", "T_Source",
- "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir", "T_Step",
- "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum", "T_String", "T_Sys",
- "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats",
- "T_Tinker", "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl",
- "T_Type", "T_U_int", "T_UEcrypto", "T_UEcryptonak", "T_UEdigest",
- "T_Unconfig", "T_Unpeer", "T_Version", "T_WanderThreshold", "T_Week",
- "T_Wildcard", "T_Xleave", "T_Year", "T_Flag", "T_EOC", "T_Simulate",
- "T_Beep_Delay", "T_Sim_Duration", "T_Server_Offset", "T_Duration",
- "T_Freq_Offset", "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay",
- "'='", "'('", "')'", "'{'", "'}'", "$accept", "configuration",
- "command_list", "command", "server_command", "client_type", "address",
- "ip_address", "address_fam", "option_list", "option", "option_flag",
- "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
- "option_str_keyword", "unpeer_command", "unpeer_keyword",
- "other_mode_command", "authentication_command", "crypto_command_list",
- "crypto_command", "crypto_str_keyword", "orphan_mode_command",
- "tos_option_list", "tos_option", "tos_option_int_keyword",
- "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
- "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
- "filegen_type", "access_control_command", "ac_flag_list",
+ "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False",
+ "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3",
+ "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host",
+ "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc",
+ "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer",
+ "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit", "T_Ipv4",
+ "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key", "T_Keys",
+ "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Leapsmearinterval",
+ "T_Limited", "T_Link", "T_Listen", "T_Logconfig", "T_Logfile",
+ "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver",
+ "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist",
+ "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock",
+ "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll",
+ "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
+ "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
+ "T_None", "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery",
+ "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
+ "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
+ "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool",
+ "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
+ "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
+ "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
+ "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
+ "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
+ "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
+ "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
+ "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto",
+ "T_UEcryptonak", "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version",
+ "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
+ "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
+ "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
+ "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
+ "$accept", "configuration", "command_list", "command", "server_command",
+ "client_type", "address", "ip_address", "address_fam", "option_list",
+ "option", "option_flag", "option_flag_keyword", "option_int",
+ "option_int_keyword", "option_str", "option_str_keyword",
+ "unpeer_command", "unpeer_keyword", "other_mode_command",
+ "authentication_command", "crypto_command_list", "crypto_command",
+ "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
+ "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
+ "monitoring_command", "stats_list", "stat", "filegen_option_list",
+ "filegen_option", "link_nolink", "enable_disable", "filegen_type",
+ "access_control_command", "res_ippeerlimit", "ac_flag_list",
"access_control_flag", "discard_option_list", "discard_option",
"discard_option_keyword", "mru_option_list", "mru_option",
"mru_option_keyword", "fudge_command", "fudge_factor_list",
@@ -991,7 +1001,7 @@ static const char *const yytname[] =
"nic_rule_action", "reset_command", "counter_set_list",
"counter_set_keyword", "integer_list", "integer_list_range",
"integer_list_range_elt", "integer_range", "string_list", "address_list",
- "boolean", "number", "simulate_command", "sim_conf_start",
+ "boolean", "number", "basedate", "simulate_command", "sim_conf_start",
"sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
"sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
"sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
@@ -1023,15 +1033,15 @@ static const yytype_uint16 yytoknum[] =
415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
- 445, 446, 447, 448, 449, 450, 451, 452, 453, 61,
- 40, 41, 123, 125
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 61, 40, 41, 123, 125
};
# endif
-#define YYPACT_NINF -189
+#define YYPACT_NINF -215
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-189)))
+ (!!((Yystate) == (-215)))
#define YYTABLE_NINF -7
@@ -1042,49 +1052,50 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 18, -177, -45, -189, -189, -189, -40, -189, 32, 5,
- -129, -189, 32, -189, 204, -44, -189, -117, -189, -110,
- -101, -189, -189, -97, -189, -189, -44, -4, 495, -44,
- -189, -189, -96, -189, -94, -189, -189, 8, 54, 258,
- 10, -28, -189, -189, -89, 204, -86, -189, 270, 529,
- -85, -56, 14, -189, -189, -189, 83, 207, -95, -189,
- -44, -189, -44, -189, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, -7, 24, -73, -68, -189, -3, -189,
- -189, -106, -189, -189, -189, 313, -189, -189, -189, -189,
- -189, -189, -189, -189, -189, -189, -189, -189, 32, -189,
- -189, -189, -189, -189, -189, 5, -189, 35, 65, -189,
- 32, -189, -189, -189, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, 110, -189, -59, 368, -189, -189, -189,
- -97, -189, -189, -44, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, 495, -189, 44, -44, -189, -189, -51,
- -189, -189, -189, -189, -189, -189, -189, -189, 54, -189,
- -189, 86, 89, -189, -189, 33, -189, -189, -189, -189,
- -28, -189, 49, -75, -189, 204, -189, -189, -189, -189,
- -189, -189, -189, -189, -189, -189, -189, -189, 270, -189,
- -7, -189, -189, -189, -33, -189, -189, -189, -189, -189,
- -189, -189, -189, 529, -189, 66, -7, -189, -189, 67,
- -56, -189, -189, -189, 68, -189, -53, -189, -189, -189,
- -189, -189, -189, -189, -189, -189, -189, -189, -189, 16,
- -153, -189, -189, -189, -189, -189, 77, -189, -18, -189,
- -189, -189, -189, 226, -13, -189, -189, -189, -189, -8,
- 97, -189, -189, 110, -189, -7, -33, -189, -189, -189,
- -189, -189, -189, -189, -189, 449, -189, -189, 449, 449,
- -85, -189, -189, 11, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, -189, -49, 108, -189, -189, -189, 125,
- -189, -189, -189, -189, -189, -189, -189, -189, -102, -20,
- -30, -189, -189, -189, -189, 13, -189, -189, 9, -189,
- -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, -189, 449, 449, -189, 146, -85, 113,
- -189, 116, -189, -189, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
- -189, -54, -189, 23, -10, 6, -138, -189, -9, -189,
- -7, -189, -189, -189, -189, -189, -189, -189, -189, -189,
- 449, -189, -189, -189, -189, -17, -189, -189, -189, -44,
- -189, -189, -189, 20, -189, -189, -189, 0, 21, -7,
- 22, -173, -189, 25, -7, -189, -189, -189, 17, 7,
- -189, -189, -189, -189, -189, 217, 39, 36, -189, 46,
- -189, -7, -189, -189
+ 11, -175, 2, -215, -215, -215, 3, -215, 93, 9,
+ -138, -215, 93, -215, 66, -40, -215, -93, -215, -87,
+ -82, -215, -215, -81, -215, -215, -40, 20, 210, -40,
+ -215, -215, -70, -215, -67, -215, -215, 34, 6, -13,
+ 47, -6, -215, -215, -48, 66, -45, -215, 412, 483,
+ -39, -60, 62, -215, -215, -215, 127, 203, -63, -215,
+ -40, -215, -40, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -11, 75, -24, -22, -215, -18, -215,
+ -215, -53, -215, -215, -215, 48, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, 93, -215,
+ -215, -215, -215, -215, -215, 9, -215, 82, 120, -215,
+ 93, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, 86, -215, 4, 373, -215, -215, -215,
+ -81, -215, -215, -40, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, 210, -215, 106, -40, -215, -215, 15,
+ -215, -215, -215, -215, -215, -215, -215, -215, 6, -215,
+ 105, 146, 151, 105, -30, -215, -215, -215, -215, -6,
+ -215, 117, -21, -215, 66, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, 412, -215, -11,
+ 22, -215, -215, -215, -20, -215, -215, -215, -215, -215,
+ -215, -215, -215, 483, -215, 128, -11, -215, -215, -215,
+ 129, -60, -215, -215, -215, 132, -215, 10, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ 1, -133, -215, -215, -215, -215, -215, 134, -215, 41,
+ -215, -215, -215, -215, -28, 42, -215, -215, -215, -215,
+ 45, 148, -215, -215, 86, -215, -11, -20, -215, -215,
+ -215, -215, -215, -215, -215, -215, 150, -215, 105, 105,
+ -215, -39, -215, -215, -215, 51, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -57, 178, -215,
+ -215, -215, 288, -215, -215, -215, -215, -215, -215, -215,
+ -215, -115, 25, 23, -215, -215, -215, -215, 61, -215,
+ -215, 21, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, 477, -215, -215, 477, 105, 477, 201, -39,
+ 169, -215, 172, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -59, -215, 77, 36, 52, -100, -215, 39,
+ -215, -11, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, 477,
+ 477, -215, -215, -215, -215, -215, 43, -215, -215, -215,
+ -40, -215, -215, -215, 55, -215, 477, -215, -215, 49,
+ 56, -11, 54, -166, -215, 67, -11, -215, -215, -215,
+ 70, 63, -215, -215, -215, -215, -215, 124, 85, 64,
+ -215, 89, -215, -11, -215, -215
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1092,81 +1103,82 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 0, 0, 24, 58, 236, 0, 71, 0, 0,
- 248, 239, 0, 229, 0, 0, 241, 0, 261, 0,
- 0, 242, 240, 0, 243, 25, 0, 0, 0, 0,
- 262, 237, 0, 23, 0, 244, 22, 0, 0, 0,
- 0, 0, 245, 21, 0, 0, 0, 238, 0, 0,
- 0, 0, 0, 56, 57, 297, 0, 2, 0, 7,
+ 0, 0, 0, 24, 58, 241, 0, 71, 0, 0,
+ 253, 244, 0, 234, 0, 0, 246, 0, 266, 0,
+ 0, 247, 245, 0, 248, 25, 0, 0, 0, 0,
+ 267, 242, 0, 23, 0, 249, 22, 0, 0, 0,
+ 0, 0, 250, 21, 0, 0, 0, 243, 0, 0,
+ 0, 0, 0, 56, 57, 303, 0, 2, 0, 7,
0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
- 16, 17, 18, 0, 0, 0, 0, 222, 0, 223,
- 19, 0, 5, 62, 63, 64, 196, 197, 198, 199,
- 202, 200, 201, 203, 204, 205, 206, 207, 191, 193,
- 194, 195, 155, 156, 157, 127, 153, 0, 246, 230,
- 190, 102, 103, 104, 105, 109, 106, 107, 108, 110,
- 29, 30, 28, 0, 26, 0, 6, 65, 66, 258,
- 231, 257, 290, 59, 61, 161, 162, 163, 164, 165,
- 166, 167, 168, 128, 159, 0, 60, 70, 288, 232,
- 67, 273, 274, 275, 276, 277, 278, 279, 270, 272,
- 135, 29, 30, 135, 135, 26, 68, 189, 187, 188,
- 183, 185, 0, 0, 233, 97, 101, 98, 212, 213,
- 214, 215, 216, 217, 218, 219, 220, 221, 208, 210,
- 0, 86, 87, 88, 0, 89, 90, 96, 91, 95,
- 92, 93, 94, 80, 82, 0, 0, 252, 284, 0,
- 69, 283, 285, 281, 235, 1, 0, 4, 31, 55,
- 295, 294, 224, 225, 226, 227, 269, 268, 267, 0,
- 0, 79, 75, 76, 77, 78, 0, 72, 0, 192,
- 152, 154, 247, 99, 0, 179, 180, 181, 182, 0,
- 0, 177, 178, 169, 171, 0, 0, 27, 228, 256,
- 289, 158, 160, 287, 271, 131, 135, 135, 134, 129,
- 0, 184, 186, 0, 100, 209, 211, 293, 291, 292,
- 85, 81, 83, 84, 234, 0, 282, 280, 3, 20,
- 263, 264, 265, 260, 266, 259, 301, 302, 0, 0,
- 0, 74, 73, 119, 118, 0, 116, 117, 0, 111,
- 114, 115, 175, 176, 174, 170, 172, 173, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 136, 132, 133, 135, 251, 0, 0,
- 253, 0, 37, 38, 39, 54, 47, 49, 48, 51,
- 40, 41, 42, 43, 50, 52, 44, 32, 33, 36,
- 34, 0, 35, 0, 0, 0, 0, 304, 0, 299,
- 0, 112, 126, 122, 124, 120, 121, 123, 125, 113,
- 130, 250, 249, 255, 254, 0, 45, 46, 53, 0,
- 298, 296, 303, 0, 300, 286, 307, 0, 0, 0,
- 0, 0, 309, 0, 0, 305, 308, 306, 0, 0,
- 314, 315, 316, 317, 318, 0, 0, 0, 310, 0,
- 312, 0, 311, 313
+ 16, 17, 18, 0, 0, 0, 0, 227, 0, 228,
+ 19, 0, 5, 62, 63, 64, 201, 202, 203, 204,
+ 207, 205, 206, 208, 209, 210, 211, 212, 196, 198,
+ 199, 200, 160, 161, 162, 128, 158, 0, 251, 235,
+ 195, 103, 104, 105, 106, 110, 107, 108, 109, 111,
+ 29, 30, 28, 0, 26, 0, 6, 65, 66, 263,
+ 236, 262, 295, 59, 61, 166, 167, 168, 169, 170,
+ 171, 172, 173, 129, 164, 0, 60, 70, 293, 237,
+ 67, 278, 279, 280, 281, 282, 283, 284, 275, 277,
+ 136, 29, 30, 136, 136, 68, 194, 192, 193, 188,
+ 190, 0, 0, 238, 98, 102, 99, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 213, 215, 0,
+ 0, 87, 88, 89, 0, 90, 91, 97, 92, 96,
+ 93, 94, 95, 80, 82, 0, 0, 86, 257, 289,
+ 0, 69, 288, 290, 286, 240, 1, 0, 4, 31,
+ 55, 300, 299, 229, 230, 231, 232, 274, 273, 272,
+ 0, 0, 79, 75, 76, 77, 78, 0, 72, 0,
+ 197, 157, 159, 252, 100, 0, 184, 185, 186, 187,
+ 0, 0, 182, 183, 174, 176, 0, 0, 27, 233,
+ 261, 294, 163, 165, 292, 276, 0, 138, 136, 136,
+ 138, 0, 138, 189, 191, 0, 101, 214, 216, 301,
+ 298, 296, 297, 85, 81, 83, 84, 239, 0, 287,
+ 285, 3, 20, 268, 269, 270, 265, 271, 264, 307,
+ 308, 0, 0, 0, 74, 73, 120, 119, 0, 117,
+ 118, 0, 112, 115, 116, 180, 181, 179, 175, 177,
+ 178, 137, 132, 138, 138, 135, 136, 130, 256, 0,
+ 0, 258, 0, 37, 38, 39, 54, 47, 49, 48,
+ 51, 40, 41, 42, 43, 50, 52, 44, 32, 33,
+ 36, 34, 0, 35, 0, 0, 0, 0, 310, 0,
+ 305, 0, 113, 127, 123, 125, 121, 122, 124, 126,
+ 114, 140, 141, 142, 143, 144, 145, 146, 148, 149,
+ 147, 150, 151, 152, 153, 154, 155, 156, 139, 133,
+ 134, 138, 255, 254, 260, 259, 0, 45, 46, 53,
+ 0, 304, 302, 309, 0, 306, 131, 291, 313, 0,
+ 0, 0, 0, 0, 315, 0, 0, 311, 314, 312,
+ 0, 0, 320, 321, 322, 323, 324, 0, 0, 0,
+ 316, 0, 318, 0, 317, 319
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -189, -189, -189, -48, -189, -189, -15, -38, -189, -189,
- -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, -189, -189, -189, 37, -189, -189, -189,
- -189, -42, -189, -189, -189, -189, -189, -189, -159, -189,
- -189, 131, -189, -189, 96, -189, -189, -189, -6, -189,
- -189, -189, -189, 74, -189, -189, 236, -71, -189, -189,
- -189, -189, 62, -189, -189, -189, -189, -189, -189, -189,
- -189, -189, -189, -189, -189, 122, -189, -189, -189, -189,
- -189, -189, 95, -189, -189, 45, -189, -189, 225, 1,
- -188, -189, -189, -189, -39, -189, -189, -103, -189, -189,
- -189, -136, -189, -149, -189
+ -215, -215, -215, -23, -215, -215, -15, -49, -215, -215,
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, 81, -215, -215, -215,
+ -215, -38, -215, -215, -215, -215, -215, -215, -154, -214,
+ -215, -215, 153, -215, -215, 142, -215, -215, -215, 32,
+ -215, -215, -215, -215, 121, -215, -215, 277, -35, -215,
+ -215, -215, -215, 107, -215, -215, -215, -215, -215, -215,
+ -215, -215, -215, -215, -215, -215, 163, -215, -215, -215,
+ -215, -215, -215, 137, -215, -215, 87, -215, -215, 267,
+ 53, -187, -215, -215, -215, -215, -2, -215, -215, -55,
+ -215, -215, -215, -109, -215, -121, -215
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 56, 57, 58, 59, 60, 132, 124, 125, 289,
- 357, 358, 359, 360, 361, 362, 363, 61, 62, 63,
- 64, 85, 237, 238, 65, 203, 204, 205, 206, 66,
- 175, 119, 243, 309, 310, 311, 379, 67, 265, 333,
- 105, 106, 107, 143, 144, 145, 68, 253, 254, 255,
- 256, 69, 170, 171, 172, 70, 98, 99, 100, 101,
- 71, 188, 189, 190, 72, 73, 74, 75, 76, 109,
- 174, 382, 284, 340, 130, 131, 77, 78, 295, 229,
- 79, 158, 159, 214, 210, 211, 212, 149, 133, 280,
- 222, 80, 81, 298, 299, 300, 366, 367, 398, 368,
- 401, 402, 415, 416, 417
+ -1, 56, 57, 58, 59, 60, 132, 124, 125, 292,
+ 348, 349, 350, 351, 352, 353, 354, 61, 62, 63,
+ 64, 85, 238, 239, 65, 203, 204, 205, 206, 66,
+ 174, 119, 244, 312, 313, 314, 370, 67, 267, 322,
+ 388, 105, 106, 107, 143, 144, 145, 68, 254, 255,
+ 256, 257, 69, 169, 170, 171, 70, 98, 99, 100,
+ 101, 71, 187, 188, 189, 72, 73, 74, 75, 76,
+ 109, 173, 393, 287, 331, 130, 131, 77, 78, 298,
+ 230, 79, 158, 159, 215, 211, 212, 213, 149, 133,
+ 283, 223, 207, 80, 81, 301, 302, 303, 357, 358,
+ 410, 359, 413, 414, 427, 428, 429
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1174,228 +1186,232 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 123, 165, 276, 176, 268, 269, 208, 277, 386, 216,
- 364, 82, 207, 372, 338, 167, 102, 83, 283, 1,
- 400, 290, 84, 120, 164, 121, 220, 239, 2, 278,
- 405, 108, 226, 3, 4, 5, 373, 296, 297, 239,
- 86, 6, 7, 126, 87, 218, 364, 219, 8, 9,
- 127, 88, 10, 227, 11, 221, 12, 13, 134, 128,
- 14, 151, 152, 129, 147, 391, 148, 316, 168, 15,
- 150, 173, 166, 16, 177, 122, 213, 228, 258, 17,
- 153, 18, 291, 215, 292, 339, 223, 224, 296, 297,
- 19, 20, 225, 217, 21, 22, 230, 241, 242, 23,
- 24, 257, 89, 25, 26, 103, 262, 334, 335, 263,
- 104, 272, 27, 244, 266, 374, 122, 267, 260, 154,
- 270, 387, 375, 169, 273, 28, 29, 30, 282, 285,
- 287, 260, 31, 274, 342, 288, 90, 91, 279, 301,
- 376, 32, 302, 343, 209, 341, 33, 312, 34, 155,
- 35, 36, 313, 92, 245, 246, 247, 248, 93, 314,
- 37, 38, 39, 40, 41, 42, 43, 44, 369, 370,
- 45, 337, 46, 371, 381, 384, 293, 380, 385, 344,
- 345, 47, 394, 388, 395, 94, 48, 49, 50, 389,
- 51, 52, 377, 393, 390, 378, 346, 53, 54, 399,
- 294, 410, 411, 412, 413, 414, -6, 55, 95, 96,
- 97, 403, 397, 407, 400, 156, 408, 2, 347, 409,
- 157, 404, 3, 4, 5, 111, 348, 420, 349, 112,
- 6, 7, 336, 423, 422, 421, 240, 8, 9, 261,
- 281, 10, 350, 11, 271, 12, 13, 315, 110, 14,
- 275, 249, 259, 264, 146, 286, 303, 317, 15, 365,
- 351, 352, 16, 392, 304, 406, 419, 305, 17, 250,
- 18, 0, 0, 0, 251, 252, 178, 0, 0, 19,
- 20, 0, 0, 21, 22, 0, 160, 113, 23, 24,
- 0, 0, 25, 26, 0, 0, 353, 0, 354, 0,
- 383, 27, 179, 0, 0, 306, 355, 0, 0, 0,
- 356, 0, 0, 0, 28, 29, 30, 0, 0, 0,
- 180, 31, 0, 181, 0, 161, 0, 162, 0, 0,
- 32, 0, 0, 114, 0, 33, 307, 34, 0, 35,
- 36, 115, 231, 0, 116, 0, 0, 0, 0, 37,
+ 123, 208, 278, 306, 209, 397, 293, 175, 329, 270,
+ 272, 307, 1, 151, 152, 308, 160, 82, 227, 286,
+ 102, 2, 280, 221, 164, 363, 108, 3, 4, 5,
+ 120, 412, 121, 153, 217, 6, 7, 355, 266, 166,
+ 228, 417, 8, 9, 281, 219, 10, 220, 11, 364,
+ 12, 13, 355, 222, 309, 14, 325, 161, 327, 162,
+ 271, 299, 300, 240, 15, 229, 83, 84, 16, 319,
+ 294, 126, 295, 154, 17, 240, 18, 127, 232, 299,
+ 300, 330, 128, 129, 134, 310, 19, 20, 111, 245,
+ 21, 22, 112, 167, 147, 23, 24, 148, 150, 25,
+ 26, 86, 233, 259, 155, 234, 87, 402, 27, 389,
+ 390, 165, 103, 88, 323, 324, 172, 104, 261, 176,
+ 398, 28, 29, 30, 122, 122, 214, 216, 31, 218,
+ 365, 261, 246, 247, 248, 249, 276, 366, 32, 224,
+ 225, 163, 226, 33, 210, 34, 242, 35, 36, 168,
+ 311, 122, 113, 231, 243, 282, 367, 37, 38, 39,
+ 40, 41, 42, 43, 44, 296, 89, 45, 258, 46,
+ 263, 156, 391, 266, 405, 268, 157, 406, 47, 264,
+ 269, 274, 275, 48, 49, 50, 279, 51, 52, 297,
+ 235, 236, 285, 288, 53, 54, 290, 237, 304, 114,
+ 90, 91, 291, -6, 55, 305, 315, 115, 368, 316,
+ 116, 369, 317, 2, 321, 328, 332, 360, 92, 3,
+ 4, 5, 326, 93, 415, 362, 361, 6, 7, 420,
+ 392, 250, 117, 395, 8, 9, 396, 118, 10, 400,
+ 11, 399, 12, 13, 401, 404, 435, 14, 407, 251,
+ 94, 409, 411, 412, 252, 253, 15, 416, 241, 419,
+ 16, 422, 423, 424, 425, 426, 17, 433, 18, 135,
+ 136, 137, 138, 95, 96, 97, 421, 432, 19, 20,
+ 394, 434, 21, 22, 284, 262, 318, 23, 24, 110,
+ 273, 25, 26, 260, 277, 265, 146, 333, 289, 356,
+ 27, 139, 403, 140, 418, 141, 431, 334, 0, 0,
+ 320, 142, 0, 28, 29, 30, 0, 0, 0, 0,
+ 31, 0, 422, 423, 424, 425, 426, 0, 0, 0,
+ 32, 430, 0, 0, 0, 33, 0, 34, 0, 35,
+ 36, 0, 0, 0, 335, 336, 0, 0, 0, 37,
38, 39, 40, 41, 42, 43, 44, 0, 0, 45,
- 0, 46, 0, 0, 0, 232, 117, 0, 233, 0,
- 47, 118, 0, 0, 396, 48, 49, 50, 2, 51,
- 52, 0, 0, 3, 4, 5, 53, 54, 0, 0,
- 0, 6, 7, 0, 0, -6, 55, 182, 8, 9,
- 308, 0, 10, 0, 11, 0, 12, 13, 163, 0,
- 14, 410, 411, 412, 413, 414, 0, 0, 122, 15,
- 418, 0, 0, 16, 0, 183, 184, 185, 186, 17,
- 0, 18, 0, 187, 0, 0, 0, 0, 0, 0,
- 19, 20, 0, 0, 21, 22, 0, 0, 0, 23,
- 24, 234, 235, 25, 26, 0, 0, 0, 236, 0,
- 0, 0, 27, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 28, 29, 30, 0, 0,
- 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
- 0, 32, 0, 0, 0, 0, 33, 318, 34, 0,
- 35, 36, 0, 0, 0, 319, 0, 0, 0, 0,
- 37, 38, 39, 40, 41, 42, 43, 44, 0, 0,
- 45, 0, 46, 320, 321, 0, 0, 322, 0, 0,
- 0, 47, 0, 323, 0, 0, 48, 49, 50, 0,
- 51, 52, 191, 192, 0, 0, 0, 53, 54, 193,
- 0, 194, 135, 136, 137, 138, 0, 55, 0, 0,
- 324, 325, 0, 0, 326, 327, 0, 328, 329, 330,
- 0, 331, 0, 0, 0, 0, 0, 0, 195, 0,
- 0, 0, 0, 139, 0, 140, 0, 141, 0, 0,
- 0, 0, 0, 142, 0, 0, 0, 0, 0, 0,
+ 0, 46, 337, 0, 0, 0, 0, 0, 0, 0,
+ 47, 0, 0, 0, 0, 48, 49, 50, 0, 51,
+ 52, 0, 0, 2, 338, 408, 53, 54, 0, 3,
+ 4, 5, 339, 0, 340, -6, 55, 6, 7, 0,
+ 0, 0, 0, 0, 8, 9, 0, 0, 10, 341,
+ 11, 0, 12, 13, 0, 0, 0, 14, 177, 0,
+ 0, 0, 0, 0, 0, 0, 15, 342, 343, 0,
+ 16, 0, 0, 0, 0, 0, 17, 0, 18, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 19, 20,
+ 0, 0, 21, 22, 0, 0, 0, 23, 24, 0,
+ 0, 25, 26, 344, 179, 345, 0, 180, 0, 0,
+ 27, 0, 0, 346, 0, 0, 0, 347, 0, 0,
+ 0, 0, 0, 28, 29, 30, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 190, 0, 191, 192, 0,
+ 32, 0, 0, 0, 193, 33, 194, 34, 0, 35,
+ 36, 0, 0, 0, 0, 0, 0, 0, 371, 37,
+ 38, 39, 40, 41, 42, 43, 44, 372, 0, 45,
+ 0, 46, 0, 0, 195, 373, 0, 0, 0, 0,
+ 47, 0, 0, 181, 0, 48, 49, 50, 0, 51,
+ 52, 0, 0, 0, 374, 375, 53, 54, 376, 0,
+ 0, 0, 0, 0, 377, 0, 55, 0, 0, 0,
+ 0, 182, 183, 184, 185, 196, 0, 197, 0, 186,
+ 0, 0, 0, 198, 0, 199, 0, 0, 200, 0,
+ 0, 378, 379, 0, 0, 380, 381, 382, 0, 383,
+ 384, 385, 0, 386, 0, 0, 0, 0, 0, 0,
+ 0, 201, 202, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 196, 0,
- 197, 0, 0, 0, 0, 0, 198, 0, 199, 0,
- 332, 200, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 201, 202
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 387
};
static const yytype_int16 yycheck[] =
{
- 15, 39, 190, 45, 163, 164, 62, 40, 62, 57,
- 148, 188, 50, 4, 63, 43, 11, 62, 206, 1,
- 193, 5, 62, 67, 39, 69, 33, 98, 10, 62,
- 203, 160, 35, 15, 16, 17, 27, 190, 191, 110,
- 8, 23, 24, 160, 12, 60, 148, 62, 30, 31,
- 160, 19, 34, 56, 36, 62, 38, 39, 62, 160,
- 42, 7, 8, 160, 160, 203, 160, 255, 96, 51,
- 62, 160, 62, 55, 160, 160, 62, 80, 126, 61,
- 26, 63, 66, 0, 68, 134, 62, 160, 190, 191,
- 72, 73, 160, 188, 76, 77, 202, 62, 33, 81,
- 82, 160, 70, 85, 86, 100, 62, 266, 267, 160,
- 105, 62, 94, 3, 28, 106, 160, 28, 133, 65,
- 87, 175, 113, 151, 199, 107, 108, 109, 62, 62,
- 62, 146, 114, 175, 9, 188, 104, 105, 171, 62,
- 131, 123, 160, 18, 200, 37, 128, 160, 130, 95,
- 132, 133, 160, 121, 44, 45, 46, 47, 126, 62,
- 142, 143, 144, 145, 146, 147, 148, 149, 188, 199,
- 152, 160, 154, 160, 28, 62, 160, 336, 62, 54,
- 55, 163, 370, 160, 201, 153, 168, 169, 170, 199,
- 172, 173, 183, 202, 188, 186, 71, 179, 180, 199,
- 184, 194, 195, 196, 197, 198, 188, 189, 176, 177,
- 178, 399, 192, 188, 193, 161, 404, 10, 93, 202,
- 166, 199, 15, 16, 17, 21, 101, 188, 103, 25,
- 23, 24, 270, 421, 188, 199, 105, 30, 31, 143,
- 203, 34, 117, 36, 170, 38, 39, 253, 12, 42,
- 188, 141, 130, 158, 29, 210, 30, 256, 51, 298,
- 135, 136, 55, 366, 38, 401, 415, 41, 61, 159,
- 63, -1, -1, -1, 164, 165, 6, -1, -1, 72,
- 73, -1, -1, 76, 77, -1, 28, 83, 81, 82,
- -1, -1, 85, 86, -1, -1, 171, -1, 173, -1,
- 338, 94, 32, -1, -1, 79, 181, -1, -1, -1,
- 185, -1, -1, -1, 107, 108, 109, -1, -1, -1,
- 50, 114, -1, 53, -1, 67, -1, 69, -1, -1,
- 123, -1, -1, 129, -1, 128, 110, 130, -1, 132,
- 133, 137, 29, -1, 140, -1, -1, -1, -1, 142,
- 143, 144, 145, 146, 147, 148, 149, -1, -1, 152,
- -1, 154, -1, -1, -1, 52, 162, -1, 55, -1,
- 163, 167, -1, -1, 389, 168, 169, 170, 10, 172,
- 173, -1, -1, 15, 16, 17, 179, 180, -1, -1,
- -1, 23, 24, -1, -1, 188, 189, 127, 30, 31,
- 174, -1, 34, -1, 36, -1, 38, 39, 150, -1,
- 42, 194, 195, 196, 197, 198, -1, -1, 160, 51,
- 203, -1, -1, 55, -1, 155, 156, 157, 158, 61,
- -1, 63, -1, 163, -1, -1, -1, -1, -1, -1,
- 72, 73, -1, -1, 76, 77, -1, -1, -1, 81,
- 82, 138, 139, 85, 86, -1, -1, -1, 145, -1,
- -1, -1, 94, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 107, 108, 109, -1, -1,
- -1, -1, 114, -1, -1, -1, -1, -1, -1, -1,
- -1, 123, -1, -1, -1, -1, 128, 48, 130, -1,
- 132, 133, -1, -1, -1, 56, -1, -1, -1, -1,
- 142, 143, 144, 145, 146, 147, 148, 149, -1, -1,
- 152, -1, 154, 74, 75, -1, -1, 78, -1, -1,
- -1, 163, -1, 84, -1, -1, 168, 169, 170, -1,
- 172, 173, 13, 14, -1, -1, -1, 179, 180, 20,
- -1, 22, 57, 58, 59, 60, -1, 189, -1, -1,
- 111, 112, -1, -1, 115, 116, -1, 118, 119, 120,
- -1, 122, -1, -1, -1, -1, -1, -1, 49, -1,
- -1, -1, -1, 88, -1, 90, -1, 92, -1, -1,
- -1, -1, -1, 98, -1, -1, -1, -1, -1, -1,
+ 15, 50, 189, 31, 64, 64, 5, 45, 65, 163,
+ 164, 39, 1, 7, 8, 43, 29, 192, 36, 206,
+ 11, 10, 42, 34, 39, 4, 164, 16, 17, 18,
+ 70, 197, 72, 27, 57, 24, 25, 152, 68, 45,
+ 58, 207, 31, 32, 64, 60, 35, 62, 37, 28,
+ 39, 40, 152, 64, 82, 44, 270, 70, 272, 72,
+ 90, 194, 195, 98, 53, 83, 64, 64, 57, 256,
+ 69, 164, 71, 67, 63, 110, 65, 164, 30, 194,
+ 195, 138, 164, 164, 64, 113, 75, 76, 22, 3,
+ 79, 80, 26, 99, 164, 84, 85, 164, 64, 88,
+ 89, 8, 54, 126, 98, 57, 13, 207, 97, 323,
+ 324, 64, 103, 20, 268, 269, 164, 108, 133, 164,
+ 179, 110, 111, 112, 164, 164, 64, 0, 117, 192,
+ 109, 146, 46, 47, 48, 49, 174, 116, 127, 64,
+ 164, 154, 164, 132, 204, 134, 64, 136, 137, 155,
+ 178, 164, 86, 206, 34, 175, 135, 146, 147, 148,
+ 149, 150, 151, 152, 153, 164, 73, 156, 164, 158,
+ 64, 165, 326, 68, 361, 29, 170, 391, 167, 164,
+ 29, 64, 203, 172, 173, 174, 164, 176, 177, 188,
+ 142, 143, 64, 64, 183, 184, 64, 149, 64, 133,
+ 107, 108, 192, 192, 193, 164, 164, 141, 187, 164,
+ 144, 190, 64, 10, 64, 164, 38, 192, 125, 16,
+ 17, 18, 271, 130, 411, 164, 203, 24, 25, 416,
+ 29, 145, 166, 64, 31, 32, 64, 171, 35, 203,
+ 37, 164, 39, 40, 192, 206, 433, 44, 205, 163,
+ 157, 196, 203, 197, 168, 169, 53, 203, 105, 192,
+ 57, 198, 199, 200, 201, 202, 63, 203, 65, 59,
+ 60, 61, 62, 180, 181, 182, 206, 192, 75, 76,
+ 329, 192, 79, 80, 203, 143, 254, 84, 85, 12,
+ 169, 88, 89, 130, 187, 158, 29, 9, 211, 301,
+ 97, 91, 357, 93, 413, 95, 427, 19, -1, -1,
+ 257, 101, -1, 110, 111, 112, -1, -1, -1, -1,
+ 117, -1, 198, 199, 200, 201, 202, -1, -1, -1,
+ 127, 207, -1, -1, -1, 132, -1, 134, -1, 136,
+ 137, -1, -1, -1, 56, 57, -1, -1, -1, 146,
+ 147, 148, 149, 150, 151, 152, 153, -1, -1, 156,
+ -1, 158, 74, -1, -1, -1, -1, -1, -1, -1,
+ 167, -1, -1, -1, -1, 172, 173, 174, -1, 176,
+ 177, -1, -1, 10, 96, 400, 183, 184, -1, 16,
+ 17, 18, 104, -1, 106, 192, 193, 24, 25, -1,
+ -1, -1, -1, -1, 31, 32, -1, -1, 35, 121,
+ 37, -1, 39, 40, -1, -1, -1, 44, 6, -1,
+ -1, -1, -1, -1, -1, -1, 53, 139, 140, -1,
+ 57, -1, -1, -1, -1, -1, 63, -1, 65, -1,
+ -1, -1, -1, -1, -1, 33, -1, -1, 75, 76,
+ -1, -1, 79, 80, -1, -1, -1, 84, 85, -1,
+ -1, 88, 89, 175, 52, 177, -1, 55, -1, -1,
+ 97, -1, -1, 185, -1, -1, -1, 189, -1, -1,
+ -1, -1, -1, 110, 111, 112, -1, -1, -1, -1,
+ 117, -1, -1, -1, -1, 12, -1, 14, 15, -1,
+ 127, -1, -1, -1, 21, 132, 23, 134, -1, 136,
+ 137, -1, -1, -1, -1, -1, -1, -1, 41, 146,
+ 147, 148, 149, 150, 151, 152, 153, 50, -1, 156,
+ -1, 158, -1, -1, 51, 58, -1, -1, -1, -1,
+ 167, -1, -1, 131, -1, 172, 173, 174, -1, 176,
+ 177, -1, -1, -1, 77, 78, 183, 184, 81, -1,
+ -1, -1, -1, -1, 87, -1, 193, -1, -1, -1,
+ -1, 159, 160, 161, 162, 92, -1, 94, -1, 167,
+ -1, -1, -1, 100, -1, 102, -1, -1, 105, -1,
+ -1, 114, 115, -1, -1, 118, 119, 120, -1, 122,
+ 123, 124, -1, 126, -1, -1, -1, -1, -1, -1,
+ -1, 128, 129, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 89, -1,
- 91, -1, -1, -1, -1, -1, 97, -1, 99, -1,
- 181, 102, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 124, 125
+ -1, -1, 185
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 1, 10, 15, 16, 17, 23, 24, 30, 31,
- 34, 36, 38, 39, 42, 51, 55, 61, 63, 72,
- 73, 76, 77, 81, 82, 85, 86, 94, 107, 108,
- 109, 114, 123, 128, 130, 132, 133, 142, 143, 144,
- 145, 146, 147, 148, 149, 152, 154, 163, 168, 169,
- 170, 172, 173, 179, 180, 189, 205, 206, 207, 208,
- 209, 221, 222, 223, 224, 228, 233, 241, 250, 255,
- 259, 264, 268, 269, 270, 271, 272, 280, 281, 284,
- 295, 296, 188, 62, 62, 225, 8, 12, 19, 70,
- 104, 105, 121, 126, 153, 176, 177, 178, 260, 261,
- 262, 263, 11, 100, 105, 244, 245, 246, 160, 273,
- 260, 21, 25, 83, 129, 137, 140, 162, 167, 235,
- 67, 69, 160, 210, 211, 212, 160, 160, 160, 160,
- 278, 279, 210, 292, 62, 57, 58, 59, 60, 88,
- 90, 92, 98, 247, 248, 249, 292, 160, 160, 291,
- 62, 7, 8, 26, 65, 95, 161, 166, 285, 286,
- 28, 67, 69, 150, 210, 211, 62, 43, 96, 151,
- 256, 257, 258, 160, 274, 234, 235, 160, 6, 32,
- 50, 53, 127, 155, 156, 157, 158, 163, 265, 266,
- 267, 13, 14, 20, 22, 49, 89, 91, 97, 99,
- 102, 124, 125, 229, 230, 231, 232, 211, 62, 200,
- 288, 289, 290, 62, 287, 0, 207, 188, 210, 210,
- 33, 62, 294, 62, 160, 160, 35, 56, 80, 283,
- 202, 29, 52, 55, 138, 139, 145, 226, 227, 261,
- 245, 62, 33, 236, 3, 44, 45, 46, 47, 141,
- 159, 164, 165, 251, 252, 253, 254, 160, 207, 279,
- 210, 248, 62, 160, 286, 242, 28, 28, 242, 242,
- 87, 257, 62, 199, 235, 266, 294, 40, 62, 171,
- 293, 230, 62, 294, 276, 62, 289, 62, 188, 213,
- 5, 66, 68, 160, 184, 282, 190, 191, 297, 298,
- 299, 62, 160, 30, 38, 41, 79, 110, 174, 237,
- 238, 239, 160, 160, 62, 252, 294, 293, 48, 56,
- 74, 75, 78, 84, 111, 112, 115, 116, 118, 119,
- 120, 122, 181, 243, 242, 242, 211, 160, 63, 134,
- 277, 37, 9, 18, 54, 55, 71, 93, 101, 103,
- 117, 135, 136, 171, 173, 181, 185, 214, 215, 216,
- 217, 218, 219, 220, 148, 298, 300, 301, 303, 188,
- 199, 160, 4, 27, 106, 113, 131, 183, 186, 240,
- 242, 28, 275, 211, 62, 62, 62, 175, 160, 199,
- 188, 203, 301, 202, 294, 201, 210, 192, 302, 199,
- 193, 304, 305, 294, 199, 203, 305, 188, 294, 202,
- 194, 195, 196, 197, 198, 306, 307, 308, 203, 307,
- 188, 199, 188, 294
+ 0, 1, 10, 16, 17, 18, 24, 25, 31, 32,
+ 35, 37, 39, 40, 44, 53, 57, 63, 65, 75,
+ 76, 79, 80, 84, 85, 88, 89, 97, 110, 111,
+ 112, 117, 127, 132, 134, 136, 137, 146, 147, 148,
+ 149, 150, 151, 152, 153, 156, 158, 167, 172, 173,
+ 174, 176, 177, 183, 184, 193, 209, 210, 211, 212,
+ 213, 225, 226, 227, 228, 232, 237, 245, 255, 260,
+ 264, 269, 273, 274, 275, 276, 277, 285, 286, 289,
+ 301, 302, 192, 64, 64, 229, 8, 13, 20, 73,
+ 107, 108, 125, 130, 157, 180, 181, 182, 265, 266,
+ 267, 268, 11, 103, 108, 249, 250, 251, 164, 278,
+ 265, 22, 26, 86, 133, 141, 144, 166, 171, 239,
+ 70, 72, 164, 214, 215, 216, 164, 164, 164, 164,
+ 283, 284, 214, 297, 64, 59, 60, 61, 62, 91,
+ 93, 95, 101, 252, 253, 254, 297, 164, 164, 296,
+ 64, 7, 8, 27, 67, 98, 165, 170, 290, 291,
+ 29, 70, 72, 154, 214, 64, 45, 99, 155, 261,
+ 262, 263, 164, 279, 238, 239, 164, 6, 33, 52,
+ 55, 131, 159, 160, 161, 162, 167, 270, 271, 272,
+ 12, 14, 15, 21, 23, 51, 92, 94, 100, 102,
+ 105, 128, 129, 233, 234, 235, 236, 300, 215, 64,
+ 204, 293, 294, 295, 64, 292, 0, 211, 192, 214,
+ 214, 34, 64, 299, 64, 164, 164, 36, 58, 83,
+ 288, 206, 30, 54, 57, 142, 143, 149, 230, 231,
+ 266, 250, 64, 34, 240, 3, 46, 47, 48, 49,
+ 145, 163, 168, 169, 256, 257, 258, 259, 164, 211,
+ 284, 214, 253, 64, 164, 291, 68, 246, 29, 29,
+ 246, 90, 246, 262, 64, 203, 239, 271, 299, 164,
+ 42, 64, 175, 298, 234, 64, 299, 281, 64, 294,
+ 64, 192, 217, 5, 69, 71, 164, 188, 287, 194,
+ 195, 303, 304, 305, 64, 164, 31, 39, 43, 82,
+ 113, 178, 241, 242, 243, 164, 164, 64, 257, 299,
+ 298, 64, 247, 246, 246, 247, 215, 247, 164, 65,
+ 138, 282, 38, 9, 19, 56, 57, 74, 96, 104,
+ 106, 121, 139, 140, 175, 177, 185, 189, 218, 219,
+ 220, 221, 222, 223, 224, 152, 304, 306, 307, 309,
+ 192, 203, 164, 4, 28, 109, 116, 135, 187, 190,
+ 244, 41, 50, 58, 77, 78, 81, 87, 114, 115,
+ 118, 119, 120, 122, 123, 124, 126, 185, 248, 247,
+ 247, 246, 29, 280, 215, 64, 64, 64, 179, 164,
+ 203, 192, 207, 307, 206, 299, 247, 205, 214, 196,
+ 308, 203, 197, 310, 311, 299, 203, 207, 311, 192,
+ 299, 206, 198, 199, 200, 201, 202, 312, 313, 314,
+ 207, 313, 192, 203, 192, 299
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 204, 205, 206, 206, 206, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 208, 209, 209, 209, 209, 209, 210, 210, 211, 212,
- 212, 213, 213, 214, 214, 214, 215, 216, 216, 216,
- 216, 216, 216, 216, 216, 217, 217, 218, 218, 218,
- 218, 218, 218, 219, 220, 221, 222, 222, 223, 223,
- 223, 223, 224, 224, 224, 224, 224, 224, 224, 224,
- 224, 225, 225, 226, 226, 227, 227, 227, 227, 227,
- 228, 229, 229, 230, 230, 230, 231, 231, 231, 231,
- 231, 231, 231, 231, 231, 232, 232, 233, 233, 233,
- 234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
- 236, 236, 237, 237, 237, 237, 238, 238, 239, 239,
- 240, 240, 240, 240, 240, 240, 240, 241, 241, 241,
- 241, 241, 241, 241, 241, 242, 242, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 243, 244, 244, 245, 246, 246, 246, 247, 247,
- 248, 249, 249, 249, 249, 249, 249, 249, 249, 250,
- 251, 251, 252, 252, 252, 252, 252, 253, 253, 254,
- 254, 254, 254, 255, 256, 256, 257, 258, 258, 258,
- 259, 259, 260, 260, 261, 261, 262, 262, 262, 262,
- 262, 262, 263, 263, 263, 263, 263, 263, 264, 265,
- 265, 266, 267, 267, 267, 267, 267, 267, 267, 267,
- 267, 267, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 268, 268, 268, 269, 269, 269, 270,
- 270, 271, 271, 272, 272, 272, 273, 273, 273, 274,
- 275, 275, 276, 276, 277, 277, 278, 278, 279, 280,
- 280, 281, 281, 282, 282, 282, 282, 283, 283, 283,
- 284, 285, 285, 286, 286, 286, 286, 286, 286, 286,
- 287, 287, 288, 288, 289, 289, 290, 291, 291, 292,
- 292, 293, 293, 293, 294, 294, 295, 296, 297, 297,
- 298, 299, 299, 300, 300, 301, 302, 303, 304, 304,
- 305, 306, 306, 307, 308, 308, 308, 308, 308
+ 0, 208, 209, 210, 210, 210, 211, 211, 211, 211,
+ 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
+ 212, 213, 213, 213, 213, 213, 214, 214, 215, 216,
+ 216, 217, 217, 218, 218, 218, 219, 220, 220, 220,
+ 220, 220, 220, 220, 220, 221, 221, 222, 222, 222,
+ 222, 222, 222, 223, 224, 225, 226, 226, 227, 227,
+ 227, 227, 228, 228, 228, 228, 228, 228, 228, 228,
+ 228, 229, 229, 230, 230, 231, 231, 231, 231, 231,
+ 232, 233, 233, 234, 234, 234, 234, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 236, 236, 237, 237,
+ 237, 238, 238, 239, 239, 239, 239, 239, 239, 239,
+ 239, 240, 240, 241, 241, 241, 241, 242, 242, 243,
+ 243, 244, 244, 244, 244, 244, 244, 244, 245, 245,
+ 245, 245, 245, 245, 245, 245, 246, 246, 247, 247,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 249, 249, 250,
+ 251, 251, 251, 252, 252, 253, 254, 254, 254, 254,
+ 254, 254, 254, 254, 255, 256, 256, 257, 257, 257,
+ 257, 257, 258, 258, 259, 259, 259, 259, 260, 261,
+ 261, 262, 263, 263, 263, 264, 264, 265, 265, 266,
+ 266, 267, 267, 267, 267, 267, 267, 268, 268, 268,
+ 268, 268, 268, 269, 270, 270, 271, 272, 272, 272,
+ 272, 272, 272, 272, 272, 272, 272, 273, 273, 273,
+ 273, 273, 273, 273, 273, 273, 273, 273, 273, 273,
+ 273, 274, 274, 274, 275, 275, 276, 276, 277, 277,
+ 277, 278, 278, 278, 279, 280, 280, 281, 281, 282,
+ 282, 283, 283, 284, 285, 285, 286, 286, 287, 287,
+ 287, 287, 288, 288, 288, 289, 290, 290, 291, 291,
+ 291, 291, 291, 291, 291, 292, 292, 293, 293, 294,
+ 294, 295, 296, 296, 297, 297, 298, 298, 298, 299,
+ 299, 300, 301, 302, 303, 303, 304, 305, 305, 306,
+ 306, 307, 308, 309, 310, 310, 311, 312, 312, 313,
+ 314, 314, 314, 314, 314
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1410,29 +1426,30 @@ static const yytype_uint8 yyr2[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 2, 2, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
- 5, 3, 4, 4, 3, 0, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
+ 3, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 2, 2, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
+ 4, 6, 4, 5, 5, 4, 0, 2, 0, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
+ 1, 1, 1, 2, 1, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 2, 1, 2, 2, 2,
+ 2, 2, 1, 1, 1, 1, 1, 1, 2, 2,
+ 1, 2, 1, 1, 1, 2, 2, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 1, 2, 1, 1, 1, 2, 1,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 3,
- 2, 1, 2, 2, 2, 2, 2, 1, 1, 1,
1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
- 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
- 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 2, 2, 2, 3, 1,
- 2, 2, 2, 2, 3, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 0, 4,
- 1, 0, 0, 2, 2, 2, 2, 1, 1, 3,
- 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 2, 1, 1, 1, 5, 2, 1, 2,
- 1, 1, 1, 1, 1, 1, 5, 1, 3, 2,
- 3, 1, 1, 2, 1, 5, 4, 3, 2, 1,
- 6, 3, 2, 3, 1, 1, 1, 1, 1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 3, 1, 2, 2, 2, 2, 3,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 0, 4, 1, 0, 0, 2, 2,
+ 2, 2, 1, 1, 3, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
+ 1, 5, 2, 1, 2, 1, 1, 1, 1, 1,
+ 1, 2, 5, 1, 3, 2, 3, 1, 1, 2,
+ 1, 5, 4, 3, 2, 1, 6, 3, 2, 3,
+ 1, 1, 1, 1, 1
};
@@ -2109,7 +2126,7 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 378 "ntp_parser.y" /* yacc.c:1646 */
+#line 384 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2122,85 +2139,85 @@ yyreduce:
ip_ctx->errpos.nline,
ip_ctx->errpos.ncol);
}
-#line 2126 "ntp_parser.c" /* yacc.c:1646 */
+#line 2143 "ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-#line 414 "ntp_parser.y" /* yacc.c:1646 */
+#line 420 "../../ntpd/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 2137 "ntp_parser.c" /* yacc.c:1646 */
+#line 2154 "ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-#line 433 "ntp_parser.y" /* yacc.c:1646 */
+#line 439 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2143 "ntp_parser.c" /* yacc.c:1646 */
+#line 2160 "ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-#line 438 "ntp_parser.y" /* yacc.c:1646 */
+#line 444 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2149 "ntp_parser.c" /* yacc.c:1646 */
+#line 2166 "ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-#line 443 "ntp_parser.y" /* yacc.c:1646 */
+#line 449 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
-#line 2155 "ntp_parser.c" /* yacc.c:1646 */
+#line 2172 "ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-#line 445 "ntp_parser.y" /* yacc.c:1646 */
+#line 451 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
-#line 2161 "ntp_parser.c" /* yacc.c:1646 */
+#line 2178 "ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-#line 450 "ntp_parser.y" /* yacc.c:1646 */
+#line 456 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2167 "ntp_parser.c" /* yacc.c:1646 */
+#line 2184 "ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-#line 452 "ntp_parser.y" /* yacc.c:1646 */
+#line 458 "../../ntpd/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 2176 "ntp_parser.c" /* yacc.c:1646 */
+#line 2193 "ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-#line 466 "ntp_parser.y" /* yacc.c:1646 */
+#line 472 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2182 "ntp_parser.c" /* yacc.c:1646 */
+#line 2199 "ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-#line 482 "ntp_parser.y" /* yacc.c:1646 */
+#line 488 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2188 "ntp_parser.c" /* yacc.c:1646 */
+#line 2205 "ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-#line 484 "ntp_parser.y" /* yacc.c:1646 */
+#line 490 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2194 "ntp_parser.c" /* yacc.c:1646 */
+#line 2211 "ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-#line 498 "ntp_parser.y" /* yacc.c:1646 */
+#line 504 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2200 "ntp_parser.c" /* yacc.c:1646 */
+#line 2217 "ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-#line 512 "ntp_parser.y" /* yacc.c:1646 */
+#line 518 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
@@ -2208,125 +2225,126 @@ yyreduce:
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2212 "ntp_parser.c" /* yacc.c:1646 */
+#line 2229 "ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-#line 533 "ntp_parser.y" /* yacc.c:1646 */
+#line 539 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
-#line 2218 "ntp_parser.c" /* yacc.c:1646 */
+#line 2235 "ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-#line 535 "ntp_parser.y" /* yacc.c:1646 */
+#line 541 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2224 "ntp_parser.c" /* yacc.c:1646 */
+#line 2241 "ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-#line 537 "ntp_parser.y" /* yacc.c:1646 */
+#line 543 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2230 "ntp_parser.c" /* yacc.c:1646 */
+#line 2247 "ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-#line 539 "ntp_parser.y" /* yacc.c:1646 */
+#line 545 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.mdnstries = (yyvsp[0].Integer); }
-#line 2236 "ntp_parser.c" /* yacc.c:1646 */
+#line 2253 "ntp_parser.c" /* yacc.c:1646 */
break;
case 62:
-#line 550 "ntp_parser.y" /* yacc.c:1646 */
+#line 556 "../../ntpd/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 2247 "ntp_parser.c" /* yacc.c:1646 */
+#line 2264 "ntp_parser.c" /* yacc.c:1646 */
break;
case 63:
-#line 557 "ntp_parser.y" /* yacc.c:1646 */
+#line 563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2253 "ntp_parser.c" /* yacc.c:1646 */
+#line 2270 "ntp_parser.c" /* yacc.c:1646 */
break;
case 64:
-#line 559 "ntp_parser.y" /* yacc.c:1646 */
+#line 565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2262 "ntp_parser.c" /* yacc.c:1646 */
+#line 2279 "ntp_parser.c" /* yacc.c:1646 */
break;
case 65:
-#line 564 "ntp_parser.y" /* yacc.c:1646 */
+#line 570 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keys = (yyvsp[0].String); }
-#line 2268 "ntp_parser.c" /* yacc.c:1646 */
+#line 2285 "ntp_parser.c" /* yacc.c:1646 */
break;
case 66:
-#line 566 "ntp_parser.y" /* yacc.c:1646 */
+#line 572 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2274 "ntp_parser.c" /* yacc.c:1646 */
+#line 2291 "ntp_parser.c" /* yacc.c:1646 */
break;
case 67:
-#line 568 "ntp_parser.y" /* yacc.c:1646 */
+#line 574 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2280 "ntp_parser.c" /* yacc.c:1646 */
+#line 2297 "ntp_parser.c" /* yacc.c:1646 */
break;
case 68:
-#line 570 "ntp_parser.y" /* yacc.c:1646 */
+#line 576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2286 "ntp_parser.c" /* yacc.c:1646 */
+#line 2303 "ntp_parser.c" /* yacc.c:1646 */
break;
case 69:
-#line 572 "ntp_parser.y" /* yacc.c:1646 */
+#line 578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
- cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
-
- // if (!cfgt.auth.trusted_key_list)
- // cfgt.auth.trusted_key_list = $2;
- // else
- // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
+ /* [Bug 948] leaves it open if appending or
+ * replacing the trusted key list is the right
+ * way. In any case, either alternative should
+ * be coded correctly!
+ */
+ 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 2299 "ntp_parser.c" /* yacc.c:1646 */
+#line 2317 "ntp_parser.c" /* yacc.c:1646 */
break;
case 70:
-#line 581 "ntp_parser.y" /* yacc.c:1646 */
+#line 588 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2305 "ntp_parser.c" /* yacc.c:1646 */
+#line 2323 "ntp_parser.c" /* yacc.c:1646 */
break;
case 71:
-#line 586 "ntp_parser.y" /* yacc.c:1646 */
+#line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2311 "ntp_parser.c" /* yacc.c:1646 */
+#line 2329 "ntp_parser.c" /* yacc.c:1646 */
break;
case 72:
-#line 588 "ntp_parser.y" /* yacc.c:1646 */
+#line 595 "../../ntpd/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 2320 "ntp_parser.c" /* yacc.c:1646 */
+#line 2338 "ntp_parser.c" /* yacc.c:1646 */
break;
case 73:
-#line 596 "ntp_parser.y" /* yacc.c:1646 */
+#line 603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2326 "ntp_parser.c" /* yacc.c:1646 */
+#line 2344 "ntp_parser.c" /* yacc.c:1646 */
break;
case 74:
-#line 598 "ntp_parser.y" /* yacc.c:1646 */
+#line 605 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2335,59 +2353,65 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2339 "ntp_parser.c" /* yacc.c:1646 */
+#line 2357 "ntp_parser.c" /* yacc.c:1646 */
break;
case 80:
-#line 623 "ntp_parser.y" /* yacc.c:1646 */
+#line 630 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2345 "ntp_parser.c" /* yacc.c:1646 */
+#line 2363 "ntp_parser.c" /* yacc.c:1646 */
break;
case 81:
-#line 628 "ntp_parser.y" /* yacc.c:1646 */
+#line 635 "../../ntpd/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 2354 "ntp_parser.c" /* yacc.c:1646 */
+#line 2372 "ntp_parser.c" /* yacc.c:1646 */
break;
case 82:
-#line 633 "ntp_parser.y" /* yacc.c:1646 */
+#line 640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2363 "ntp_parser.c" /* yacc.c:1646 */
+#line 2381 "ntp_parser.c" /* yacc.c:1646 */
break;
case 83:
-#line 641 "ntp_parser.y" /* yacc.c:1646 */
+#line 648 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2369 "ntp_parser.c" /* yacc.c:1646 */
+#line 2387 "ntp_parser.c" /* yacc.c:1646 */
break;
case 84:
-#line 643 "ntp_parser.y" /* yacc.c:1646 */
+#line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2375 "ntp_parser.c" /* yacc.c:1646 */
+#line 2393 "ntp_parser.c" /* yacc.c:1646 */
break;
case 85:
-#line 645 "ntp_parser.y" /* yacc.c:1646 */
+#line 652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2381 "ntp_parser.c" /* yacc.c:1646 */
+#line 2399 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 97:
-#line 672 "ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2387 "ntp_parser.c" /* yacc.c:1646 */
+ case 86:
+#line 654 "../../ntpd/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 */
break;
case 98:
-#line 674 "ntp_parser.y" /* yacc.c:1646 */
+#line 681 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
+#line 2411 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 99:
+#line 683 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2396,55 +2420,55 @@ yyreduce:
yyerror("statsdir remote configuration ignored");
}
}
-#line 2400 "ntp_parser.c" /* yacc.c:1646 */
+#line 2424 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 99:
-#line 683 "ntp_parser.y" /* yacc.c:1646 */
+ case 100:
+#line 692 "../../ntpd/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 2411 "ntp_parser.c" /* yacc.c:1646 */
+#line 2435 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 100:
-#line 693 "ntp_parser.y" /* yacc.c:1646 */
+ case 101:
+#line 702 "../../ntpd/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 2420 "ntp_parser.c" /* yacc.c:1646 */
+#line 2444 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 101:
-#line 698 "ntp_parser.y" /* yacc.c:1646 */
+ case 102:
+#line 707 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2429 "ntp_parser.c" /* yacc.c:1646 */
+#line 2453 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 110:
-#line 717 "ntp_parser.y" /* yacc.c:1646 */
+ case 111:
+#line 726 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2435 "ntp_parser.c" /* yacc.c:1646 */
+#line 2459 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 111:
-#line 719 "ntp_parser.y" /* yacc.c:1646 */
+ case 112:
+#line 728 "../../ntpd/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 2444 "ntp_parser.c" /* yacc.c:1646 */
+#line 2468 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 112:
-#line 727 "ntp_parser.y" /* yacc.c:1646 */
+ case 113:
+#line 736 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2454,11 +2478,11 @@ yyreduce:
yyerror("filegen file remote config ignored");
}
}
-#line 2458 "ntp_parser.c" /* yacc.c:1646 */
+#line 2482 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 113:
-#line 737 "ntp_parser.y" /* yacc.c:1646 */
+ case 114:
+#line 746 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2467,11 +2491,11 @@ yyreduce:
yyerror("filegen type remote config ignored");
}
}
-#line 2471 "ntp_parser.c" /* yacc.c:1646 */
+#line 2495 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 114:
-#line 746 "ntp_parser.y" /* yacc.c:1646 */
+ case 115:
+#line 755 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
@@ -2486,69 +2510,69 @@ yyreduce:
yyerror(err);
}
}
-#line 2490 "ntp_parser.c" /* yacc.c:1646 */
+#line 2514 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 115:
-#line 761 "ntp_parser.y" /* yacc.c:1646 */
+ case 116:
+#line 770 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2496 "ntp_parser.c" /* yacc.c:1646 */
+#line 2520 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 127:
-#line 791 "ntp_parser.y" /* yacc.c:1646 */
+ case 128:
+#line 800 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2504 "ntp_parser.c" /* yacc.c:1646 */
+#line 2528 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 128:
-#line 795 "ntp_parser.y" /* yacc.c:1646 */
+ case 129:
+#line 804 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2512 "ntp_parser.c" /* yacc.c:1646 */
+#line 2536 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 129:
-#line 799 "ntp_parser.y" /* yacc.c:1646 */
+ case 130:
+#line 808 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
- rn = create_restrict_node((yyvsp[-1].Address_node), NULL, (yyvsp[0].Int_fifo),
+ rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2524 "ntp_parser.c" /* yacc.c:1646 */
+#line 2548 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 130:
-#line 807 "ntp_parser.y" /* yacc.c:1646 */
+ case 131:
+#line 816 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
- rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-1].Address_node), (yyvsp[0].Int_fifo),
+ rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2536 "ntp_parser.c" /* yacc.c:1646 */
+#line 2560 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 131:
-#line 815 "ntp_parser.y" /* yacc.c:1646 */
+ case 132:
+#line 824 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
- rn = create_restrict_node(NULL, NULL, (yyvsp[0].Int_fifo),
+ rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2548 "ntp_parser.c" /* yacc.c:1646 */
+#line 2572 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 132:
-#line 823 "ntp_parser.y" /* yacc.c:1646 */
+ case 133:
+#line 832 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2559,15 +2583,15 @@ yyreduce:
create_address_node(
estrdup("0.0.0.0"),
AF_INET),
- (yyvsp[0].Int_fifo),
+ (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2567 "ntp_parser.c" /* yacc.c:1646 */
+#line 2591 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 133:
-#line 838 "ntp_parser.y" /* yacc.c:1646 */
+ case 134:
+#line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2578,132 +2602,158 @@ yyreduce:
create_address_node(
estrdup("::"),
AF_INET6),
- (yyvsp[0].Int_fifo),
+ (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2586 "ntp_parser.c" /* yacc.c:1646 */
+#line 2610 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 134:
-#line 853 "ntp_parser.y" /* yacc.c:1646 */
+ case 135:
+#line 862 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
- APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-1].Integer)));
+ APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-2].Integer)));
rn = create_restrict_node(
- NULL, NULL, (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
+ NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2599 "ntp_parser.c" /* yacc.c:1646 */
+#line 2623 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 135:
-#line 865 "ntp_parser.y" /* yacc.c:1646 */
+ case 136:
+#line 874 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Integer) = -1; }
+#line 2629 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 137:
+#line 876 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
+ {
+ if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
+ struct FILE_INFO * ip_ctx;
+
+ ip_ctx = lex_current();
+ msyslog(LOG_ERR,
+ "Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.",
+ (yyvsp[0].Integer),
+ ip_ctx->fname,
+ ip_ctx->errpos.nline,
+ ip_ctx->errpos.ncol);
+ (yyvsp[0].Integer) = 0;
+ }
+ (yyval.Integer) = (yyvsp[0].Integer);
+ }
+#line 2649 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 138:
+#line 895 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
-#line 2605 "ntp_parser.c" /* yacc.c:1646 */
+#line 2655 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 136:
-#line 867 "ntp_parser.y" /* yacc.c:1646 */
+ case 139:
+#line 897 "../../ntpd/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 2614 "ntp_parser.c" /* yacc.c:1646 */
+#line 2664 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 152:
-#line 893 "ntp_parser.y" /* yacc.c:1646 */
+ case 157:
+#line 925 "../../ntpd/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 2623 "ntp_parser.c" /* yacc.c:1646 */
+#line 2673 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 153:
-#line 898 "ntp_parser.y" /* yacc.c:1646 */
+ case 158:
+#line 930 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2632 "ntp_parser.c" /* yacc.c:1646 */
+#line 2682 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 154:
-#line 906 "ntp_parser.y" /* yacc.c:1646 */
+ case 159:
+#line 938 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2638 "ntp_parser.c" /* yacc.c:1646 */
+#line 2688 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 158:
-#line 917 "ntp_parser.y" /* yacc.c:1646 */
+ case 163:
+#line 949 "../../ntpd/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 2647 "ntp_parser.c" /* yacc.c:1646 */
+#line 2697 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 159:
-#line 922 "ntp_parser.y" /* yacc.c:1646 */
+ case 164:
+#line 954 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2656 "ntp_parser.c" /* yacc.c:1646 */
+#line 2706 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 160:
-#line 930 "ntp_parser.y" /* yacc.c:1646 */
+ case 165:
+#line 962 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2662 "ntp_parser.c" /* yacc.c:1646 */
+#line 2712 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 169:
-#line 950 "ntp_parser.y" /* yacc.c:1646 */
+ case 174:
+#line 982 "../../ntpd/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 2673 "ntp_parser.c" /* yacc.c:1646 */
+#line 2723 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 170:
-#line 960 "ntp_parser.y" /* yacc.c:1646 */
+ case 175:
+#line 992 "../../ntpd/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 2682 "ntp_parser.c" /* yacc.c:1646 */
+#line 2732 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 171:
-#line 965 "ntp_parser.y" /* yacc.c:1646 */
+ case 176:
+#line 997 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2691 "ntp_parser.c" /* yacc.c:1646 */
+#line 2741 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 172:
-#line 973 "ntp_parser.y" /* yacc.c:1646 */
+ case 177:
+#line 1005 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2697 "ntp_parser.c" /* yacc.c:1646 */
+#line 2747 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 173:
-#line 975 "ntp_parser.y" /* yacc.c:1646 */
+ case 178:
+#line 1007 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2703 "ntp_parser.c" /* yacc.c:1646 */
+#line 2753 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 174:
-#line 977 "ntp_parser.y" /* yacc.c:1646 */
+ case 179:
+#line 1009 "../../ntpd/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));
@@ -2712,89 +2762,89 @@ yyreduce:
yyerror("fudge factor: stratum value not in [0..16], ignored");
}
}
-#line 2716 "ntp_parser.c" /* yacc.c:1646 */
+#line 2766 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 175:
-#line 986 "ntp_parser.y" /* yacc.c:1646 */
+ case 180:
+#line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2722 "ntp_parser.c" /* yacc.c:1646 */
+#line 2772 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 176:
-#line 988 "ntp_parser.y" /* yacc.c:1646 */
+ case 181:
+#line 1020 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2728 "ntp_parser.c" /* yacc.c:1646 */
+#line 2778 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 183:
-#line 1009 "ntp_parser.y" /* yacc.c:1646 */
+ case 188:
+#line 1041 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 2734 "ntp_parser.c" /* yacc.c:1646 */
+#line 2784 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 184:
-#line 1014 "ntp_parser.y" /* yacc.c:1646 */
+ case 189:
+#line 1046 "../../ntpd/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 2743 "ntp_parser.c" /* yacc.c:1646 */
+#line 2793 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 185:
-#line 1019 "ntp_parser.y" /* yacc.c:1646 */
+ case 190:
+#line 1051 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2752 "ntp_parser.c" /* yacc.c:1646 */
+#line 2802 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 186:
-#line 1027 "ntp_parser.y" /* yacc.c:1646 */
+ case 191:
+#line 1059 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2758 "ntp_parser.c" /* yacc.c:1646 */
+#line 2808 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 190:
-#line 1043 "ntp_parser.y" /* yacc.c:1646 */
+ case 195:
+#line 1075 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2764 "ntp_parser.c" /* yacc.c:1646 */
+#line 2814 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 191:
-#line 1045 "ntp_parser.y" /* yacc.c:1646 */
+ case 196:
+#line 1077 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2770 "ntp_parser.c" /* yacc.c:1646 */
+#line 2820 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 192:
-#line 1050 "ntp_parser.y" /* yacc.c:1646 */
+ case 197:
+#line 1082 "../../ntpd/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 2779 "ntp_parser.c" /* yacc.c:1646 */
+#line 2829 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 193:
-#line 1055 "ntp_parser.y" /* yacc.c:1646 */
+ case 198:
+#line 1087 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2788 "ntp_parser.c" /* yacc.c:1646 */
+#line 2838 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 194:
-#line 1063 "ntp_parser.y" /* yacc.c:1646 */
+ case 199:
+#line 1095 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2794 "ntp_parser.c" /* yacc.c:1646 */
+#line 2844 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 195:
-#line 1065 "ntp_parser.y" /* yacc.c:1646 */
+ case 200:
+#line 1097 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2808,74 +2858,74 @@ yyreduce:
yyerror(err_str);
}
}
-#line 2812 "ntp_parser.c" /* yacc.c:1646 */
+#line 2862 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 208:
-#line 1104 "ntp_parser.y" /* yacc.c:1646 */
+ case 213:
+#line 1136 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 2818 "ntp_parser.c" /* yacc.c:1646 */
+#line 2868 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 209:
-#line 1109 "ntp_parser.y" /* yacc.c:1646 */
+ case 214:
+#line 1141 "../../ntpd/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 2827 "ntp_parser.c" /* yacc.c:1646 */
+#line 2877 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 210:
-#line 1114 "ntp_parser.y" /* yacc.c:1646 */
+ case 215:
+#line 1146 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2836 "ntp_parser.c" /* yacc.c:1646 */
+#line 2886 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 211:
-#line 1122 "ntp_parser.y" /* yacc.c:1646 */
+ case 216:
+#line 1154 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2842 "ntp_parser.c" /* yacc.c:1646 */
+#line 2892 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 224:
-#line 1147 "ntp_parser.y" /* yacc.c:1646 */
+ case 229:
+#line 1179 "../../ntpd/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 2853 "ntp_parser.c" /* yacc.c:1646 */
+#line 2903 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 225:
-#line 1154 "ntp_parser.y" /* yacc.c:1646 */
+ case 230:
+#line 1186 "../../ntpd/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 2864 "ntp_parser.c" /* yacc.c:1646 */
+#line 2914 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 226:
-#line 1161 "ntp_parser.y" /* yacc.c:1646 */
+ case 231:
+#line 1193 "../../ntpd/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 2875 "ntp_parser.c" /* yacc.c:1646 */
+#line 2925 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 227:
-#line 1168 "ntp_parser.y" /* yacc.c:1646 */
+ case 232:
+#line 1200 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
@@ -2891,11 +2941,11 @@ yyreduce:
yyerror(error_text);
}
}
-#line 2895 "ntp_parser.c" /* yacc.c:1646 */
+#line 2945 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 228:
-#line 1184 "ntp_parser.y" /* yacc.c:1646 */
+ case 233:
+#line 1216 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (!lex_from_file()) {
YYFREE((yyvsp[-1].String)); /* avoid leak */
@@ -2914,68 +2964,68 @@ yyreduce:
}
YYFREE((yyvsp[-1].String)); /* avoid leak */
}
-#line 2918 "ntp_parser.c" /* yacc.c:1646 */
+#line 2968 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 229:
-#line 1203 "ntp_parser.y" /* yacc.c:1646 */
+ case 234:
+#line 1235 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ lex_flush_stack(); }
-#line 2924 "ntp_parser.c" /* yacc.c:1646 */
+#line 2974 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 230:
-#line 1205 "ntp_parser.y" /* yacc.c:1646 */
+ case 235:
+#line 1237 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
-#line 2930 "ntp_parser.c" /* yacc.c:1646 */
+#line 2980 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 231:
-#line 1207 "ntp_parser.y" /* yacc.c:1646 */
+ case 236:
+#line 1239 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 2936 "ntp_parser.c" /* yacc.c:1646 */
+#line 2986 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 232:
-#line 1209 "ntp_parser.y" /* yacc.c:1646 */
+ case 237:
+#line 1241 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 2942 "ntp_parser.c" /* yacc.c:1646 */
+#line 2992 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 233:
-#line 1211 "ntp_parser.y" /* yacc.c:1646 */
+ case 238:
+#line 1243 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 2948 "ntp_parser.c" /* yacc.c:1646 */
+#line 2998 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 234:
-#line 1213 "ntp_parser.y" /* yacc.c:1646 */
+ case 239:
+#line 1245 "../../ntpd/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 2959 "ntp_parser.c" /* yacc.c:1646 */
+#line 3009 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 235:
-#line 1220 "ntp_parser.y" /* yacc.c:1646 */
+ case 240:
+#line 1252 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 2965 "ntp_parser.c" /* yacc.c:1646 */
+#line 3015 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 240:
-#line 1235 "ntp_parser.y" /* yacc.c:1646 */
+ case 245:
+#line 1267 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
#ifndef LEAP_SMEAR
yyerror("Built without LEAP_SMEAR support.");
#endif
}
-#line 2975 "ntp_parser.c" /* yacc.c:1646 */
+#line 3025 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 246:
-#line 1255 "ntp_parser.y" /* yacc.c:1646 */
+ case 251:
+#line 1287 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -2986,11 +3036,11 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 2990 "ntp_parser.c" /* yacc.c:1646 */
+#line 3040 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 247:
-#line 1266 "ntp_parser.y" /* yacc.c:1646 */
+ case 252:
+#line 1298 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -2998,16 +3048,20 @@ yyreduce:
APPEND_G_FIFO(cfgt.vars, av);
av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
+ msyslog(LOG_WARNING,
+ "'driftfile FILENAME WanderValue' is deprecated, "
+ "please use separate 'driftfile FILENAME' and "
+ "'nonvolatile WanderValue' lines instead.");
} else {
YYFREE((yyvsp[-1].String));
yyerror("driftfile remote configuration ignored");
}
}
-#line 3007 "ntp_parser.c" /* yacc.c:1646 */
+#line 3061 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 248:
-#line 1279 "ntp_parser.y" /* yacc.c:1646 */
+ case 253:
+#line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
if (lex_from_file()) {
attr_val *av;
@@ -3017,71 +3071,71 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3021 "ntp_parser.c" /* yacc.c:1646 */
+#line 3075 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 249:
-#line 1292 "ntp_parser.y" /* yacc.c:1646 */
+ case 254:
+#line 1328 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 3027 "ntp_parser.c" /* yacc.c:1646 */
+#line 3081 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 251:
-#line 1298 "ntp_parser.y" /* yacc.c:1646 */
+ case 256:
+#line 1334 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 3033 "ntp_parser.c" /* yacc.c:1646 */
+#line 3087 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 252:
-#line 1303 "ntp_parser.y" /* yacc.c:1646 */
+ case 257:
+#line 1339 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 3039 "ntp_parser.c" /* yacc.c:1646 */
+#line 3093 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 253:
-#line 1305 "ntp_parser.y" /* yacc.c:1646 */
+ case 258:
+#line 1341 "../../ntpd/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 3048 "ntp_parser.c" /* yacc.c:1646 */
+#line 3102 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 254:
-#line 1313 "ntp_parser.y" /* yacc.c:1646 */
+ case 259:
+#line 1349 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3054 "ntp_parser.c" /* yacc.c:1646 */
+#line 3108 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 255:
-#line 1315 "ntp_parser.y" /* yacc.c:1646 */
+ case 260:
+#line 1351 "../../ntpd/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 3063 "ntp_parser.c" /* yacc.c:1646 */
+#line 3117 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 256:
-#line 1323 "ntp_parser.y" /* yacc.c:1646 */
+ case 261:
+#line 1359 "../../ntpd/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 3072 "ntp_parser.c" /* yacc.c:1646 */
+#line 3126 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 257:
-#line 1328 "ntp_parser.y" /* yacc.c:1646 */
+ case 262:
+#line 1364 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3081 "ntp_parser.c" /* yacc.c:1646 */
+#line 3135 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 258:
-#line 1336 "ntp_parser.y" /* yacc.c:1646 */
+ case 263:
+#line 1372 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
@@ -3103,141 +3157,141 @@ yyreduce:
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
YYFREE((yyvsp[0].String));
}
-#line 3107 "ntp_parser.c" /* yacc.c:1646 */
+#line 3161 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 259:
-#line 1361 "ntp_parser.y" /* yacc.c:1646 */
+ case 264:
+#line 1397 "../../ntpd/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 3118 "ntp_parser.c" /* yacc.c:1646 */
+#line 3172 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 260:
-#line 1368 "ntp_parser.y" /* yacc.c:1646 */
+ case 265:
+#line 1404 "../../ntpd/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 3129 "ntp_parser.c" /* yacc.c:1646 */
+#line 3183 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 270:
-#line 1396 "ntp_parser.y" /* yacc.c:1646 */
+ case 275:
+#line 1432 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3135 "ntp_parser.c" /* yacc.c:1646 */
+#line 3189 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 271:
-#line 1401 "ntp_parser.y" /* yacc.c:1646 */
+ case 276:
+#line 1437 "../../ntpd/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 3144 "ntp_parser.c" /* yacc.c:1646 */
+#line 3198 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 272:
-#line 1406 "ntp_parser.y" /* yacc.c:1646 */
+ case 277:
+#line 1442 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3153 "ntp_parser.c" /* yacc.c:1646 */
+#line 3207 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 280:
-#line 1430 "ntp_parser.y" /* yacc.c:1646 */
+ case 285:
+#line 1466 "../../ntpd/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 3162 "ntp_parser.c" /* yacc.c:1646 */
+#line 3216 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 281:
-#line 1435 "ntp_parser.y" /* yacc.c:1646 */
+ case 286:
+#line 1471 "../../ntpd/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 3171 "ntp_parser.c" /* yacc.c:1646 */
+#line 3225 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 282:
-#line 1443 "ntp_parser.y" /* yacc.c:1646 */
+ case 287:
+#line 1479 "../../ntpd/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 3180 "ntp_parser.c" /* yacc.c:1646 */
+#line 3234 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 283:
-#line 1448 "ntp_parser.y" /* yacc.c:1646 */
+ case 288:
+#line 1484 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3189 "ntp_parser.c" /* yacc.c:1646 */
+#line 3243 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 284:
-#line 1456 "ntp_parser.y" /* yacc.c:1646 */
+ case 289:
+#line 1492 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3195 "ntp_parser.c" /* yacc.c:1646 */
+#line 3249 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 286:
-#line 1462 "ntp_parser.y" /* yacc.c:1646 */
+ case 291:
+#line 1498 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3201 "ntp_parser.c" /* yacc.c:1646 */
+#line 3255 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 287:
-#line 1467 "ntp_parser.y" /* yacc.c:1646 */
+ case 292:
+#line 1503 "../../ntpd/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 3210 "ntp_parser.c" /* yacc.c:1646 */
+#line 3264 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 288:
-#line 1472 "ntp_parser.y" /* yacc.c:1646 */
+ case 293:
+#line 1508 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3219 "ntp_parser.c" /* yacc.c:1646 */
+#line 3273 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 289:
-#line 1480 "ntp_parser.y" /* yacc.c:1646 */
+ case 294:
+#line 1516 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3228 "ntp_parser.c" /* yacc.c:1646 */
+#line 3282 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 290:
-#line 1485 "ntp_parser.y" /* yacc.c:1646 */
+ case 295:
+#line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3237 "ntp_parser.c" /* yacc.c:1646 */
+#line 3291 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 291:
-#line 1493 "ntp_parser.y" /* yacc.c:1646 */
+ case 296:
+#line 1529 "../../ntpd/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");
@@ -3246,29 +3300,35 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3250 "ntp_parser.c" /* yacc.c:1646 */
+#line 3304 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 292:
-#line 1501 "ntp_parser.y" /* yacc.c:1646 */
+ case 297:
+#line 1537 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
-#line 3256 "ntp_parser.c" /* yacc.c:1646 */
+#line 3310 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 293:
-#line 1502 "ntp_parser.y" /* yacc.c:1646 */
+ case 298:
+#line 1538 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 3262 "ntp_parser.c" /* yacc.c:1646 */
+#line 3316 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 294:
-#line 1506 "ntp_parser.y" /* yacc.c:1646 */
+ case 299:
+#line 1542 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3268 "ntp_parser.c" /* yacc.c:1646 */
+#line 3322 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 296:
-#line 1517 "ntp_parser.y" /* yacc.c:1646 */
+ case 301:
+#line 1548 "../../ntpd/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 */
+ break;
+
+ case 302:
+#line 1556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
@@ -3278,125 +3338,125 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3282 "ntp_parser.c" /* yacc.c:1646 */
+#line 3342 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 297:
-#line 1534 "ntp_parser.y" /* yacc.c:1646 */
+ case 303:
+#line 1573 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
-#line 3288 "ntp_parser.c" /* yacc.c:1646 */
+#line 3348 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 298:
-#line 1539 "ntp_parser.y" /* yacc.c:1646 */
+ case 304:
+#line 1578 "../../ntpd/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 3297 "ntp_parser.c" /* yacc.c:1646 */
+#line 3357 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 299:
-#line 1544 "ntp_parser.y" /* yacc.c:1646 */
+ case 305:
+#line 1583 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3306 "ntp_parser.c" /* yacc.c:1646 */
+#line 3366 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 300:
-#line 1552 "ntp_parser.y" /* yacc.c:1646 */
+ case 306:
+#line 1591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3312 "ntp_parser.c" /* yacc.c:1646 */
+#line 3372 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 303:
-#line 1562 "ntp_parser.y" /* yacc.c:1646 */
+ case 309:
+#line 1601 "../../ntpd/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 3321 "ntp_parser.c" /* yacc.c:1646 */
+#line 3381 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 304:
-#line 1567 "ntp_parser.y" /* yacc.c:1646 */
+ case 310:
+#line 1606 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3330 "ntp_parser.c" /* yacc.c:1646 */
+#line 3390 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 305:
-#line 1575 "ntp_parser.y" /* yacc.c:1646 */
+ case 311:
+#line 1614 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
-#line 3336 "ntp_parser.c" /* yacc.c:1646 */
+#line 3396 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 306:
-#line 1580 "ntp_parser.y" /* yacc.c:1646 */
+ case 312:
+#line 1619 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (yyvsp[-1].Double); }
-#line 3342 "ntp_parser.c" /* yacc.c:1646 */
+#line 3402 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 307:
-#line 1585 "ntp_parser.y" /* yacc.c:1646 */
+ case 313:
+#line 1624 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3348 "ntp_parser.c" /* yacc.c:1646 */
+#line 3408 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 308:
-#line 1590 "ntp_parser.y" /* yacc.c:1646 */
+ case 314:
+#line 1629 "../../ntpd/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 3357 "ntp_parser.c" /* yacc.c:1646 */
+#line 3417 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 309:
-#line 1595 "ntp_parser.y" /* yacc.c:1646 */
+ case 315:
+#line 1634 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3366 "ntp_parser.c" /* yacc.c:1646 */
+#line 3426 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 310:
-#line 1603 "ntp_parser.y" /* yacc.c:1646 */
+ case 316:
+#line 1642 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3372 "ntp_parser.c" /* yacc.c:1646 */
+#line 3432 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 311:
-#line 1608 "ntp_parser.y" /* yacc.c:1646 */
+ case 317:
+#line 1647 "../../ntpd/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 3381 "ntp_parser.c" /* yacc.c:1646 */
+#line 3441 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 312:
-#line 1613 "ntp_parser.y" /* yacc.c:1646 */
+ case 318:
+#line 1652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3390 "ntp_parser.c" /* yacc.c:1646 */
+#line 3450 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 313:
-#line 1621 "ntp_parser.y" /* yacc.c:1646 */
+ case 319:
+#line 1660 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3396 "ntp_parser.c" /* yacc.c:1646 */
+#line 3456 "ntp_parser.c" /* yacc.c:1646 */
break;
-#line 3400 "ntp_parser.c" /* yacc.c:1646 */
+#line 3460 "ntp_parser.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3624,7 +3684,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1632 "ntp_parser.y" /* yacc.c:1906 */
+#line 1671 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h
index 10c0cfdaf6f2..308c2d40583a 100644
--- a/ntpd/ntp_parser.h
+++ b/ntpd/ntp_parser.h
@@ -30,8 +30,8 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_YY_Y_TAB_H_INCLUDED
-# define YY_YY_Y_TAB_H_INCLUDED
+#ifndef YY_YY_NTP_PARSER_H_INCLUDED
+# define YY_YY_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -54,193 +54,197 @@ extern int yydebug;
T_Autokey = 264,
T_Automax = 265,
T_Average = 266,
- T_Bclient = 267,
- T_Bcpollbstep = 268,
- T_Beacon = 269,
- T_Broadcast = 270,
- T_Broadcastclient = 271,
- T_Broadcastdelay = 272,
- T_Burst = 273,
- T_Calibrate = 274,
- T_Ceiling = 275,
- T_Clockstats = 276,
- T_Cohort = 277,
- T_ControlKey = 278,
- T_Crypto = 279,
- T_Cryptostats = 280,
- T_Ctl = 281,
- T_Day = 282,
- T_Default = 283,
- T_Digest = 284,
- T_Disable = 285,
- T_Discard = 286,
- T_Dispersion = 287,
- T_Double = 288,
- T_Driftfile = 289,
- T_Drop = 290,
- T_Dscp = 291,
- T_Ellipsis = 292,
- T_Enable = 293,
- T_End = 294,
- T_False = 295,
- T_File = 296,
- T_Filegen = 297,
- T_Filenum = 298,
- T_Flag1 = 299,
- T_Flag2 = 300,
- T_Flag3 = 301,
- T_Flag4 = 302,
- T_Flake = 303,
- T_Floor = 304,
- T_Freq = 305,
- T_Fudge = 306,
- T_Host = 307,
- T_Huffpuff = 308,
- T_Iburst = 309,
- T_Ident = 310,
- T_Ignore = 311,
- T_Incalloc = 312,
- T_Incmem = 313,
- T_Initalloc = 314,
- T_Initmem = 315,
- T_Includefile = 316,
- T_Integer = 317,
- T_Interface = 318,
- T_Intrange = 319,
- T_Io = 320,
- T_Ipv4 = 321,
- T_Ipv4_flag = 322,
- T_Ipv6 = 323,
- T_Ipv6_flag = 324,
- T_Kernel = 325,
- T_Key = 326,
- T_Keys = 327,
- T_Keysdir = 328,
- T_Kod = 329,
- T_Mssntp = 330,
- T_Leapfile = 331,
- T_Leapsmearinterval = 332,
- T_Limited = 333,
- T_Link = 334,
- T_Listen = 335,
- T_Logconfig = 336,
- T_Logfile = 337,
- T_Loopstats = 338,
- T_Lowpriotrap = 339,
- T_Manycastclient = 340,
- T_Manycastserver = 341,
- T_Mask = 342,
- T_Maxage = 343,
- T_Maxclock = 344,
- T_Maxdepth = 345,
- T_Maxdist = 346,
- T_Maxmem = 347,
- T_Maxpoll = 348,
- T_Mdnstries = 349,
- T_Mem = 350,
- T_Memlock = 351,
- T_Minclock = 352,
- T_Mindepth = 353,
- T_Mindist = 354,
- T_Minimum = 355,
- T_Minpoll = 356,
- T_Minsane = 357,
- T_Mode = 358,
- T_Mode7 = 359,
- T_Monitor = 360,
- T_Month = 361,
- T_Mru = 362,
- T_Multicastclient = 363,
- T_Nic = 364,
- T_Nolink = 365,
- T_Nomodify = 366,
- T_Nomrulist = 367,
- T_None = 368,
- T_Nonvolatile = 369,
- T_Nopeer = 370,
- T_Noquery = 371,
- T_Noselect = 372,
- T_Noserve = 373,
- T_Notrap = 374,
- T_Notrust = 375,
- T_Ntp = 376,
- T_Ntpport = 377,
- T_NtpSignDsocket = 378,
- T_Orphan = 379,
- T_Orphanwait = 380,
- T_PCEdigest = 381,
- T_Panic = 382,
- T_Peer = 383,
- T_Peerstats = 384,
- T_Phone = 385,
- T_Pid = 386,
- T_Pidfile = 387,
- T_Pool = 388,
- T_Port = 389,
- T_Preempt = 390,
- T_Prefer = 391,
- T_Protostats = 392,
- T_Pw = 393,
- T_Randfile = 394,
- T_Rawstats = 395,
- T_Refid = 396,
- T_Requestkey = 397,
- T_Reset = 398,
- T_Restrict = 399,
- T_Revoke = 400,
- T_Rlimit = 401,
- T_Saveconfigdir = 402,
- T_Server = 403,
- T_Setvar = 404,
- T_Source = 405,
- T_Stacksize = 406,
- T_Statistics = 407,
- T_Stats = 408,
- T_Statsdir = 409,
- T_Step = 410,
- T_Stepback = 411,
- T_Stepfwd = 412,
- T_Stepout = 413,
- T_Stratum = 414,
- T_String = 415,
- T_Sys = 416,
- T_Sysstats = 417,
- T_Tick = 418,
- T_Time1 = 419,
- T_Time2 = 420,
- T_Timer = 421,
- T_Timingstats = 422,
- T_Tinker = 423,
- T_Tos = 424,
- T_Trap = 425,
- T_True = 426,
- T_Trustedkey = 427,
- T_Ttl = 428,
- T_Type = 429,
- T_U_int = 430,
- T_UEcrypto = 431,
- T_UEcryptonak = 432,
- T_UEdigest = 433,
- T_Unconfig = 434,
- T_Unpeer = 435,
- T_Version = 436,
- T_WanderThreshold = 437,
- T_Week = 438,
- T_Wildcard = 439,
- T_Xleave = 440,
- T_Year = 441,
- T_Flag = 442,
- T_EOC = 443,
- T_Simulate = 444,
- T_Beep_Delay = 445,
- T_Sim_Duration = 446,
- T_Server_Offset = 447,
- T_Duration = 448,
- T_Freq_Offset = 449,
- T_Wander = 450,
- T_Jitter = 451,
- T_Prop_Delay = 452,
- T_Proc_Delay = 453
+ T_Basedate = 267,
+ T_Bclient = 268,
+ T_Bcpollbstep = 269,
+ T_Beacon = 270,
+ T_Broadcast = 271,
+ T_Broadcastclient = 272,
+ T_Broadcastdelay = 273,
+ T_Burst = 274,
+ T_Calibrate = 275,
+ T_Ceiling = 276,
+ T_Clockstats = 277,
+ T_Cohort = 278,
+ T_ControlKey = 279,
+ T_Crypto = 280,
+ T_Cryptostats = 281,
+ T_Ctl = 282,
+ T_Day = 283,
+ T_Default = 284,
+ T_Digest = 285,
+ T_Disable = 286,
+ T_Discard = 287,
+ T_Dispersion = 288,
+ T_Double = 289,
+ T_Driftfile = 290,
+ T_Drop = 291,
+ T_Dscp = 292,
+ T_Ellipsis = 293,
+ T_Enable = 294,
+ T_End = 295,
+ T_Epeer = 296,
+ T_False = 297,
+ T_File = 298,
+ T_Filegen = 299,
+ T_Filenum = 300,
+ T_Flag1 = 301,
+ T_Flag2 = 302,
+ T_Flag3 = 303,
+ T_Flag4 = 304,
+ T_Flake = 305,
+ T_Floor = 306,
+ T_Freq = 307,
+ T_Fudge = 308,
+ T_Host = 309,
+ T_Huffpuff = 310,
+ T_Iburst = 311,
+ T_Ident = 312,
+ T_Ignore = 313,
+ T_Incalloc = 314,
+ T_Incmem = 315,
+ T_Initalloc = 316,
+ T_Initmem = 317,
+ T_Includefile = 318,
+ T_Integer = 319,
+ T_Interface = 320,
+ T_Intrange = 321,
+ T_Io = 322,
+ T_Ippeerlimit = 323,
+ T_Ipv4 = 324,
+ T_Ipv4_flag = 325,
+ T_Ipv6 = 326,
+ T_Ipv6_flag = 327,
+ T_Kernel = 328,
+ T_Key = 329,
+ T_Keys = 330,
+ T_Keysdir = 331,
+ T_Kod = 332,
+ T_Mssntp = 333,
+ T_Leapfile = 334,
+ T_Leapsmearinterval = 335,
+ T_Limited = 336,
+ T_Link = 337,
+ T_Listen = 338,
+ T_Logconfig = 339,
+ T_Logfile = 340,
+ T_Loopstats = 341,
+ T_Lowpriotrap = 342,
+ T_Manycastclient = 343,
+ T_Manycastserver = 344,
+ T_Mask = 345,
+ T_Maxage = 346,
+ T_Maxclock = 347,
+ T_Maxdepth = 348,
+ T_Maxdist = 349,
+ T_Maxmem = 350,
+ T_Maxpoll = 351,
+ T_Mdnstries = 352,
+ T_Mem = 353,
+ T_Memlock = 354,
+ T_Minclock = 355,
+ T_Mindepth = 356,
+ T_Mindist = 357,
+ T_Minimum = 358,
+ T_Minpoll = 359,
+ T_Minsane = 360,
+ T_Mode = 361,
+ T_Mode7 = 362,
+ T_Monitor = 363,
+ T_Month = 364,
+ T_Mru = 365,
+ T_Multicastclient = 366,
+ T_Nic = 367,
+ T_Nolink = 368,
+ T_Nomodify = 369,
+ T_Nomrulist = 370,
+ T_None = 371,
+ T_Nonvolatile = 372,
+ T_Noepeer = 373,
+ T_Nopeer = 374,
+ T_Noquery = 375,
+ T_Noselect = 376,
+ T_Noserve = 377,
+ T_Notrap = 378,
+ T_Notrust = 379,
+ T_Ntp = 380,
+ T_Ntpport = 381,
+ T_NtpSignDsocket = 382,
+ T_Orphan = 383,
+ T_Orphanwait = 384,
+ T_PCEdigest = 385,
+ T_Panic = 386,
+ T_Peer = 387,
+ T_Peerstats = 388,
+ T_Phone = 389,
+ T_Pid = 390,
+ T_Pidfile = 391,
+ T_Pool = 392,
+ T_Port = 393,
+ T_Preempt = 394,
+ T_Prefer = 395,
+ T_Protostats = 396,
+ T_Pw = 397,
+ T_Randfile = 398,
+ T_Rawstats = 399,
+ T_Refid = 400,
+ T_Requestkey = 401,
+ T_Reset = 402,
+ T_Restrict = 403,
+ T_Revoke = 404,
+ T_Rlimit = 405,
+ T_Saveconfigdir = 406,
+ T_Server = 407,
+ T_Setvar = 408,
+ T_Source = 409,
+ T_Stacksize = 410,
+ T_Statistics = 411,
+ T_Stats = 412,
+ T_Statsdir = 413,
+ T_Step = 414,
+ T_Stepback = 415,
+ T_Stepfwd = 416,
+ T_Stepout = 417,
+ T_Stratum = 418,
+ T_String = 419,
+ T_Sys = 420,
+ T_Sysstats = 421,
+ T_Tick = 422,
+ T_Time1 = 423,
+ T_Time2 = 424,
+ T_Timer = 425,
+ T_Timingstats = 426,
+ T_Tinker = 427,
+ T_Tos = 428,
+ T_Trap = 429,
+ T_True = 430,
+ T_Trustedkey = 431,
+ T_Ttl = 432,
+ T_Type = 433,
+ T_U_int = 434,
+ T_UEcrypto = 435,
+ T_UEcryptonak = 436,
+ T_UEdigest = 437,
+ T_Unconfig = 438,
+ T_Unpeer = 439,
+ T_Version = 440,
+ T_WanderThreshold = 441,
+ T_Week = 442,
+ T_Wildcard = 443,
+ T_Xleave = 444,
+ T_Year = 445,
+ T_Flag = 446,
+ T_EOC = 447,
+ T_Simulate = 448,
+ T_Beep_Delay = 449,
+ T_Sim_Duration = 450,
+ T_Server_Offset = 451,
+ T_Duration = 452,
+ T_Freq_Offset = 453,
+ T_Wander = 454,
+ T_Jitter = 455,
+ T_Prop_Delay = 456,
+ T_Proc_Delay = 457
};
#endif
/* Tokens. */
@@ -253,200 +257,204 @@ extern int yydebug;
#define T_Autokey 264
#define T_Automax 265
#define T_Average 266
-#define T_Bclient 267
-#define T_Bcpollbstep 268
-#define T_Beacon 269
-#define T_Broadcast 270
-#define T_Broadcastclient 271
-#define T_Broadcastdelay 272
-#define T_Burst 273
-#define T_Calibrate 274
-#define T_Ceiling 275
-#define T_Clockstats 276
-#define T_Cohort 277
-#define T_ControlKey 278
-#define T_Crypto 279
-#define T_Cryptostats 280
-#define T_Ctl 281
-#define T_Day 282
-#define T_Default 283
-#define T_Digest 284
-#define T_Disable 285
-#define T_Discard 286
-#define T_Dispersion 287
-#define T_Double 288
-#define T_Driftfile 289
-#define T_Drop 290
-#define T_Dscp 291
-#define T_Ellipsis 292
-#define T_Enable 293
-#define T_End 294
-#define T_False 295
-#define T_File 296
-#define T_Filegen 297
-#define T_Filenum 298
-#define T_Flag1 299
-#define T_Flag2 300
-#define T_Flag3 301
-#define T_Flag4 302
-#define T_Flake 303
-#define T_Floor 304
-#define T_Freq 305
-#define T_Fudge 306
-#define T_Host 307
-#define T_Huffpuff 308
-#define T_Iburst 309
-#define T_Ident 310
-#define T_Ignore 311
-#define T_Incalloc 312
-#define T_Incmem 313
-#define T_Initalloc 314
-#define T_Initmem 315
-#define T_Includefile 316
-#define T_Integer 317
-#define T_Interface 318
-#define T_Intrange 319
-#define T_Io 320
-#define T_Ipv4 321
-#define T_Ipv4_flag 322
-#define T_Ipv6 323
-#define T_Ipv6_flag 324
-#define T_Kernel 325
-#define T_Key 326
-#define T_Keys 327
-#define T_Keysdir 328
-#define T_Kod 329
-#define T_Mssntp 330
-#define T_Leapfile 331
-#define T_Leapsmearinterval 332
-#define T_Limited 333
-#define T_Link 334
-#define T_Listen 335
-#define T_Logconfig 336
-#define T_Logfile 337
-#define T_Loopstats 338
-#define T_Lowpriotrap 339
-#define T_Manycastclient 340
-#define T_Manycastserver 341
-#define T_Mask 342
-#define T_Maxage 343
-#define T_Maxclock 344
-#define T_Maxdepth 345
-#define T_Maxdist 346
-#define T_Maxmem 347
-#define T_Maxpoll 348
-#define T_Mdnstries 349
-#define T_Mem 350
-#define T_Memlock 351
-#define T_Minclock 352
-#define T_Mindepth 353
-#define T_Mindist 354
-#define T_Minimum 355
-#define T_Minpoll 356
-#define T_Minsane 357
-#define T_Mode 358
-#define T_Mode7 359
-#define T_Monitor 360
-#define T_Month 361
-#define T_Mru 362
-#define T_Multicastclient 363
-#define T_Nic 364
-#define T_Nolink 365
-#define T_Nomodify 366
-#define T_Nomrulist 367
-#define T_None 368
-#define T_Nonvolatile 369
-#define T_Nopeer 370
-#define T_Noquery 371
-#define T_Noselect 372
-#define T_Noserve 373
-#define T_Notrap 374
-#define T_Notrust 375
-#define T_Ntp 376
-#define T_Ntpport 377
-#define T_NtpSignDsocket 378
-#define T_Orphan 379
-#define T_Orphanwait 380
-#define T_PCEdigest 381
-#define T_Panic 382
-#define T_Peer 383
-#define T_Peerstats 384
-#define T_Phone 385
-#define T_Pid 386
-#define T_Pidfile 387
-#define T_Pool 388
-#define T_Port 389
-#define T_Preempt 390
-#define T_Prefer 391
-#define T_Protostats 392
-#define T_Pw 393
-#define T_Randfile 394
-#define T_Rawstats 395
-#define T_Refid 396
-#define T_Requestkey 397
-#define T_Reset 398
-#define T_Restrict 399
-#define T_Revoke 400
-#define T_Rlimit 401
-#define T_Saveconfigdir 402
-#define T_Server 403
-#define T_Setvar 404
-#define T_Source 405
-#define T_Stacksize 406
-#define T_Statistics 407
-#define T_Stats 408
-#define T_Statsdir 409
-#define T_Step 410
-#define T_Stepback 411
-#define T_Stepfwd 412
-#define T_Stepout 413
-#define T_Stratum 414
-#define T_String 415
-#define T_Sys 416
-#define T_Sysstats 417
-#define T_Tick 418
-#define T_Time1 419
-#define T_Time2 420
-#define T_Timer 421
-#define T_Timingstats 422
-#define T_Tinker 423
-#define T_Tos 424
-#define T_Trap 425
-#define T_True 426
-#define T_Trustedkey 427
-#define T_Ttl 428
-#define T_Type 429
-#define T_U_int 430
-#define T_UEcrypto 431
-#define T_UEcryptonak 432
-#define T_UEdigest 433
-#define T_Unconfig 434
-#define T_Unpeer 435
-#define T_Version 436
-#define T_WanderThreshold 437
-#define T_Week 438
-#define T_Wildcard 439
-#define T_Xleave 440
-#define T_Year 441
-#define T_Flag 442
-#define T_EOC 443
-#define T_Simulate 444
-#define T_Beep_Delay 445
-#define T_Sim_Duration 446
-#define T_Server_Offset 447
-#define T_Duration 448
-#define T_Freq_Offset 449
-#define T_Wander 450
-#define T_Jitter 451
-#define T_Prop_Delay 452
-#define T_Proc_Delay 453
+#define T_Basedate 267
+#define T_Bclient 268
+#define T_Bcpollbstep 269
+#define T_Beacon 270
+#define T_Broadcast 271
+#define T_Broadcastclient 272
+#define T_Broadcastdelay 273
+#define T_Burst 274
+#define T_Calibrate 275
+#define T_Ceiling 276
+#define T_Clockstats 277
+#define T_Cohort 278
+#define T_ControlKey 279
+#define T_Crypto 280
+#define T_Cryptostats 281
+#define T_Ctl 282
+#define T_Day 283
+#define T_Default 284
+#define T_Digest 285
+#define T_Disable 286
+#define T_Discard 287
+#define T_Dispersion 288
+#define T_Double 289
+#define T_Driftfile 290
+#define T_Drop 291
+#define T_Dscp 292
+#define T_Ellipsis 293
+#define T_Enable 294
+#define T_End 295
+#define T_Epeer 296
+#define T_False 297
+#define T_File 298
+#define T_Filegen 299
+#define T_Filenum 300
+#define T_Flag1 301
+#define T_Flag2 302
+#define T_Flag3 303
+#define T_Flag4 304
+#define T_Flake 305
+#define T_Floor 306
+#define T_Freq 307
+#define T_Fudge 308
+#define T_Host 309
+#define T_Huffpuff 310
+#define T_Iburst 311
+#define T_Ident 312
+#define T_Ignore 313
+#define T_Incalloc 314
+#define T_Incmem 315
+#define T_Initalloc 316
+#define T_Initmem 317
+#define T_Includefile 318
+#define T_Integer 319
+#define T_Interface 320
+#define T_Intrange 321
+#define T_Io 322
+#define T_Ippeerlimit 323
+#define T_Ipv4 324
+#define T_Ipv4_flag 325
+#define T_Ipv6 326
+#define T_Ipv6_flag 327
+#define T_Kernel 328
+#define T_Key 329
+#define T_Keys 330
+#define T_Keysdir 331
+#define T_Kod 332
+#define T_Mssntp 333
+#define T_Leapfile 334
+#define T_Leapsmearinterval 335
+#define T_Limited 336
+#define T_Link 337
+#define T_Listen 338
+#define T_Logconfig 339
+#define T_Logfile 340
+#define T_Loopstats 341
+#define T_Lowpriotrap 342
+#define T_Manycastclient 343
+#define T_Manycastserver 344
+#define T_Mask 345
+#define T_Maxage 346
+#define T_Maxclock 347
+#define T_Maxdepth 348
+#define T_Maxdist 349
+#define T_Maxmem 350
+#define T_Maxpoll 351
+#define T_Mdnstries 352
+#define T_Mem 353
+#define T_Memlock 354
+#define T_Minclock 355
+#define T_Mindepth 356
+#define T_Mindist 357
+#define T_Minimum 358
+#define T_Minpoll 359
+#define T_Minsane 360
+#define T_Mode 361
+#define T_Mode7 362
+#define T_Monitor 363
+#define T_Month 364
+#define T_Mru 365
+#define T_Multicastclient 366
+#define T_Nic 367
+#define T_Nolink 368
+#define T_Nomodify 369
+#define T_Nomrulist 370
+#define T_None 371
+#define T_Nonvolatile 372
+#define T_Noepeer 373
+#define T_Nopeer 374
+#define T_Noquery 375
+#define T_Noselect 376
+#define T_Noserve 377
+#define T_Notrap 378
+#define T_Notrust 379
+#define T_Ntp 380
+#define T_Ntpport 381
+#define T_NtpSignDsocket 382
+#define T_Orphan 383
+#define T_Orphanwait 384
+#define T_PCEdigest 385
+#define T_Panic 386
+#define T_Peer 387
+#define T_Peerstats 388
+#define T_Phone 389
+#define T_Pid 390
+#define T_Pidfile 391
+#define T_Pool 392
+#define T_Port 393
+#define T_Preempt 394
+#define T_Prefer 395
+#define T_Protostats 396
+#define T_Pw 397
+#define T_Randfile 398
+#define T_Rawstats 399
+#define T_Refid 400
+#define T_Requestkey 401
+#define T_Reset 402
+#define T_Restrict 403
+#define T_Revoke 404
+#define T_Rlimit 405
+#define T_Saveconfigdir 406
+#define T_Server 407
+#define T_Setvar 408
+#define T_Source 409
+#define T_Stacksize 410
+#define T_Statistics 411
+#define T_Stats 412
+#define T_Statsdir 413
+#define T_Step 414
+#define T_Stepback 415
+#define T_Stepfwd 416
+#define T_Stepout 417
+#define T_Stratum 418
+#define T_String 419
+#define T_Sys 420
+#define T_Sysstats 421
+#define T_Tick 422
+#define T_Time1 423
+#define T_Time2 424
+#define T_Timer 425
+#define T_Timingstats 426
+#define T_Tinker 427
+#define T_Tos 428
+#define T_Trap 429
+#define T_True 430
+#define T_Trustedkey 431
+#define T_Ttl 432
+#define T_Type 433
+#define T_U_int 434
+#define T_UEcrypto 435
+#define T_UEcryptonak 436
+#define T_UEdigest 437
+#define T_Unconfig 438
+#define T_Unpeer 439
+#define T_Version 440
+#define T_WanderThreshold 441
+#define T_Week 442
+#define T_Wildcard 443
+#define T_Xleave 444
+#define T_Year 445
+#define T_Flag 446
+#define T_EOC 447
+#define T_Simulate 448
+#define T_Beep_Delay 449
+#define T_Sim_Duration 450
+#define T_Server_Offset 451
+#define T_Duration 452
+#define T_Freq_Offset 453
+#define T_Wander 454
+#define T_Jitter 455
+#define T_Prop_Delay 456
+#define T_Proc_Delay 457
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
-#line 51 "ntp_parser.y" /* yacc.c:1909 */
+#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:1909 */
char * String;
double Double;
@@ -465,7 +473,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 469 "ntp_parser.h" /* yacc.c:1909 */
+#line 477 "ntp_parser.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;
@@ -478,4 +486,4 @@ extern YYSTYPE yylval;
int yyparse (void);
-#endif /* !YY_YY_Y_TAB_H_INCLUDED */
+#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y
index 0dec2dfd78b6..02c7342196e5 100644
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -77,6 +77,7 @@
%token <Integer> T_Autokey
%token <Integer> T_Automax
%token <Integer> T_Average
+%token <Integer> T_Basedate
%token <Integer> T_Bclient
%token <Integer> T_Bcpollbstep
%token <Integer> T_Beacon
@@ -105,6 +106,7 @@
%token <Integer> T_Ellipsis /* "..." not "ellipsis" */
%token <Integer> T_Enable
%token <Integer> T_End
+%token <Integer> T_Epeer
%token <Integer> T_False
%token <Integer> T_File
%token <Integer> T_Filegen
@@ -131,6 +133,7 @@
%token <Integer> T_Interface
%token <Integer> T_Intrange /* not a token */
%token <Integer> T_Io
+%token <Integer> T_Ippeerlimit
%token <Integer> T_Ipv4
%token <Integer> T_Ipv4_flag
%token <Integer> T_Ipv6
@@ -180,6 +183,7 @@
%token <Integer> T_Nomrulist
%token <Integer> T_None
%token <Integer> T_Nonvolatile
+%token <Integer> T_Noepeer
%token <Integer> T_Nopeer
%token <Integer> T_Noquery
%token <Integer> T_Noselect
@@ -276,6 +280,7 @@
%type <Address_node> address
%type <Integer> address_fam
%type <Address_fifo> address_list
+%type <Integer> basedate
%type <Integer> boolean
%type <Integer> client_type
%type <Integer> counter_set_keyword
@@ -302,6 +307,7 @@
%type <Integer> interface_command
%type <Integer> interface_nic
%type <Address_node> ip_address
+%type <Integer> res_ippeerlimit
%type <Integer> link_nolink
%type <Attr_val> log_config_command
%type <Attr_val_fifo> log_config_list
@@ -570,12 +576,13 @@ authentication_command
{ cfgt.auth.revoke = $2; }
| T_Trustedkey integer_list_range
{
- cfgt.auth.trusted_key_list = $2;
-
- // if (!cfgt.auth.trusted_key_list)
- // cfgt.auth.trusted_key_list = $2;
- // else
- // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
+ /* [Bug 948] leaves it open if appending or
+ * replacing the trusted key list is the right
+ * way. In any case, either alternative should
+ * be coded correctly!
+ */
+ DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
+ CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, $2);
}
| T_NtpSignDsocket T_String
{ cfgt.auth.ntp_signd_socket = $2; }
@@ -643,6 +650,8 @@ tos_option
{ $$ = create_attr_dval($1, $2); }
| T_Cohort boolean
{ $$ = create_attr_dval($1, (double)$2); }
+ | basedate
+ { $$ = create_attr_ival(T_Basedate, $1); }
;
tos_option_int_keyword
@@ -795,31 +804,31 @@ access_control_command
{
CONCAT_G_FIFOS(cfgt.mru_opts, $2);
}
- | T_Restrict address ac_flag_list
+ | T_Restrict address res_ippeerlimit ac_flag_list
{
restrict_node *rn;
- rn = create_restrict_node($2, NULL, $3,
+ rn = create_restrict_node($2, NULL, $3, $4,
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
- | T_Restrict address T_Mask ip_address ac_flag_list
+ | T_Restrict address T_Mask ip_address res_ippeerlimit ac_flag_list
{
restrict_node *rn;
- rn = create_restrict_node($2, $4, $5,
+ rn = create_restrict_node($2, $4, $5, $6,
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
- | T_Restrict T_Default ac_flag_list
+ | T_Restrict T_Default res_ippeerlimit ac_flag_list
{
restrict_node *rn;
- rn = create_restrict_node(NULL, NULL, $3,
+ rn = create_restrict_node(NULL, NULL, $3, $4,
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
- | T_Restrict T_Ipv4_flag T_Default ac_flag_list
+ | T_Restrict T_Ipv4_flag T_Default res_ippeerlimit ac_flag_list
{
restrict_node *rn;
@@ -830,11 +839,11 @@ access_control_command
create_address_node(
estrdup("0.0.0.0"),
AF_INET),
- $4,
+ $4, $5,
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
- | T_Restrict T_Ipv6_flag T_Default ac_flag_list
+ | T_Restrict T_Ipv6_flag T_Default res_ippeerlimit ac_flag_list
{
restrict_node *rn;
@@ -845,21 +854,42 @@ access_control_command
create_address_node(
estrdup("::"),
AF_INET6),
- $4,
+ $4, $5,
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
- | T_Restrict T_Source ac_flag_list
+ | T_Restrict T_Source res_ippeerlimit ac_flag_list
{
restrict_node * rn;
- APPEND_G_FIFO($3, create_int_node($2));
+ APPEND_G_FIFO($4, create_int_node($2));
rn = create_restrict_node(
- NULL, NULL, $3, lex_current()->curpos.nline);
+ NULL, NULL, $3, $4, lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
;
+res_ippeerlimit
+ : /* empty ippeerlimit defaults to -1 (unlimited) */
+ { $$ = -1; }
+ | T_Ippeerlimit T_Integer
+ {
+ if (($2 < -1) || ($2 > 100)) {
+ struct FILE_INFO * ip_ctx;
+
+ ip_ctx = lex_current();
+ msyslog(LOG_ERR,
+ "Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.",
+ $2,
+ ip_ctx->fname,
+ ip_ctx->errpos.nline,
+ ip_ctx->errpos.ncol);
+ $2 = 0;
+ }
+ $$ = $2;
+ }
+ ;
+
ac_flag_list
: /* empty list is allowed */
{ $$ = NULL; }
@@ -871,12 +901,14 @@ ac_flag_list
;
access_control_flag
- : T_Flake
+ : T_Epeer
+ | T_Flake
| T_Ignore
| T_Kod
| T_Mssntp
| T_Limited
| T_Lowpriotrap
+ | T_Noepeer
| T_Nomodify
| T_Nomrulist
| T_Nopeer
@@ -1270,6 +1302,10 @@ drift_parm
APPEND_G_FIFO(cfgt.vars, av);
av = create_attr_dval(T_WanderThreshold, $2);
APPEND_G_FIFO(cfgt.vars, av);
+ msyslog(LOG_WARNING,
+ "'driftfile FILENAME WanderValue' is deprecated, "
+ "please use separate 'driftfile FILENAME' and "
+ "'nonvolatile WanderValue' lines instead.");
} else {
YYFREE($1);
yyerror("driftfile remote configuration ignored");
@@ -1507,6 +1543,9 @@ number
| T_Double
;
+basedate
+ : T_Basedate T_String
+ { $$ = basedate_eval_string($2); YYFREE($2); }
/* Simulator Configuration Commands
* --------------------------------
diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c
index a296ea7dd32f..71c093683398 100644
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -117,7 +117,7 @@ static struct peer * findexistingpeer_name(const char *, u_short,
struct peer *, int);
static struct peer * findexistingpeer_addr(sockaddr_u *,
struct peer *, int,
- u_char);
+ u_char, int *);
static void free_peer(struct peer *, int);
static void getmorepeermem(void);
static int score(struct peer *);
@@ -203,17 +203,18 @@ findexistingpeer_addr(
sockaddr_u * addr,
struct peer * start_peer,
int mode,
- u_char cast_flags
+ u_char cast_flags,
+ int * ip_count
)
{
struct peer *peer;
- DPRINTF(2, ("findexistingpeer_addr(%s, %s, %d, 0x%x)\n",
+ DPRINTF(2, ("findexistingpeer_addr(%s, %s, %d, 0x%x, %p)\n",
sptoa(addr),
(start_peer)
? sptoa(&start_peer->srcadr)
: "NULL",
- mode, (u_int)cast_flags));
+ mode, (u_int)cast_flags, ip_count));
/*
* start_peer is included so we can locate instances of the
@@ -234,6 +235,11 @@ findexistingpeer_addr(
DPRINTF(3, ("%s %s %d %d 0x%x 0x%x ", sptoa(addr),
sptoa(&peer->srcadr), mode, peer->hmode,
(u_int)cast_flags, (u_int)peer->cast_flags));
+ if (ip_count) {
+ if (SOCK_EQ(addr, &peer->srcadr)) {
+ (*ip_count)++;
+ }
+ }
if ((-1 == mode || peer->hmode == mode ||
((MDF_BCLNT & peer->cast_flags) &&
(MDF_BCLNT & cast_flags))) &&
@@ -258,7 +264,8 @@ findexistingpeer(
const char * hostname,
struct peer * start_peer,
int mode,
- u_char cast_flags
+ u_char cast_flags,
+ int * ip_count
)
{
if (hostname != NULL)
@@ -266,7 +273,7 @@ findexistingpeer(
start_peer, mode);
else
return findexistingpeer_addr(addr, start_peer, mode,
- cast_flags);
+ cast_flags, ip_count);
}
@@ -561,6 +568,7 @@ peer_config(
sockaddr_u * srcadr,
const char * hostname,
endpt * dstadr,
+ int ippeerlimit,
u_char hmode,
u_char version,
u_char minpoll,
@@ -611,7 +619,7 @@ peer_config(
flags |= FLAG_IBURST;
if ((MDF_ACAST | MDF_POOL) & cast_flags)
flags &= ~FLAG_PREEMPT;
- return newpeer(srcadr, hostname, dstadr, hmode, version,
+ return newpeer(srcadr, hostname, dstadr, ippeerlimit, hmode, version,
minpoll, maxpoll, flags, cast_flags, ttl, key, ident);
}
@@ -753,6 +761,7 @@ newpeer(
sockaddr_u * srcadr,
const char * hostname,
endpt * dstadr,
+ int ippeerlimit,
u_char hmode,
u_char version,
u_char minpoll,
@@ -766,6 +775,8 @@ newpeer(
{
struct peer * peer;
u_int hash;
+ int ip_count = 0;
+
DEBUG_REQUIRE(srcadr);
@@ -799,11 +810,11 @@ newpeer(
*/
if (dstadr != NULL) {
peer = findexistingpeer(srcadr, hostname, NULL, hmode,
- cast_flags);
+ cast_flags, &ip_count);
while (peer != NULL) {
- if (peer->dstadr == dstadr ||
- ((MDF_BCLNT & cast_flags) &&
- (MDF_BCLNT & peer->cast_flags)))
+ if ( peer->dstadr == dstadr
+ || ( (MDF_BCLNT & cast_flags)
+ && (MDF_BCLNT & peer->cast_flags)))
break;
if (dstadr == ANY_INTERFACE_CHOOSE(srcadr) &&
@@ -811,12 +822,12 @@ newpeer(
break;
peer = findexistingpeer(srcadr, hostname, peer,
- hmode, cast_flags);
+ hmode, cast_flags, &ip_count);
}
} else {
/* no endpt address given */
peer = findexistingpeer(srcadr, hostname, NULL, hmode,
- cast_flags);
+ cast_flags, &ip_count);
}
/*
@@ -833,6 +844,30 @@ newpeer(
return NULL;
}
+DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n",
+ (hostname)
+ ? hostname
+ : stoa(srcadr),
+ ip_count));
+
+ /* Check ippeerlimit wrt ip_count */
+ if (ippeerlimit > -1) {
+ if (ip_count + 1 > ippeerlimit) {
+ DPRINTF(2, ("newpeer(%s) denied - ippeerlimit %d\n",
+ (hostname)
+ ? hostname
+ : stoa(srcadr),
+ ippeerlimit));
+ return NULL;
+ }
+ } else {
+ DPRINTF(1, ("newpeer(%s) - ippeerlimit %d ignored\n",
+ (hostname)
+ ? hostname
+ : stoa(srcadr),
+ ippeerlimit));
+ }
+
/*
* Allocate a new peer structure. Some dirt here, since some of
* the initialization requires knowlege of our system state.
diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index c5d7cc6db4a8..fb8a837db5c2 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -1,7 +1,8 @@
/*
* ntp_proto.c - NTP version 4 protocol machinery
*
- * ATTENTION: Get approval from Dave Mills on all changes to this file!
+ * ATTENTION: Get approval from Harlan on all changes to this file!
+ * (Harlan will be discussing these changes with Dave Mills.)
*
*/
#ifdef HAVE_CONFIG_H
@@ -37,29 +38,34 @@
#define AUTH(x, y) ((x) ? (y) == AUTH_OK \
: (y) == AUTH_OK || (y) == AUTH_NONE)
-#define AUTH_NONE 0 /* authentication not required */
-#define AUTH_OK 1 /* authentication OK */
-#define AUTH_ERROR 2 /* authentication error */
-#define AUTH_CRYPTO 3 /* crypto_NAK */
+typedef enum
+auth_state {
+ AUTH_UNKNOWN = -1, /* Unknown */
+ AUTH_NONE, /* authentication not required */
+ AUTH_OK, /* authentication OK */
+ AUTH_ERROR, /* authentication error */
+ AUTH_CRYPTO /* crypto_NAK */
+} auth_code;
/*
* Set up Kiss Code values
*/
-enum kiss_codes {
+typedef enum
+kiss_codes {
NOKISS, /* No Kiss Code */
RATEKISS, /* Rate limit Kiss Code */
DENYKISS, /* Deny Kiss */
RSTRKISS, /* Restricted Kiss */
- XKISS, /* Experimental Kiss */
- UNKNOWNKISS /* Unknown Kiss Code */
-};
+ XKISS /* Experimental Kiss */
+} kiss_code;
-enum nak_error_codes {
+typedef enum
+nak_error_codes {
NONAK, /* No NAK seen */
INVALIDNAK, /* NAK cannot be used */
VALIDNAK /* NAK is valid */
-};
+} nak_code;
/*
* traffic shaping parameters
@@ -182,7 +188,7 @@ int unpeer_digest_early = 1; /* bad digest (TEST5) */
int dynamic_interleave = DYNAMIC_INTERLEAVE; /* Bug 2978 mitigation */
int kiss_code_check(u_char hisleap, u_char hisstratum, u_char hismode, u_int32 refid);
-enum nak_error_codes valid_NAK(struct peer *peer, struct recvbuf *rbufp, u_char hismode);
+nak_code valid_NAK (struct peer *peer, struct recvbuf *rbufp, u_char hismode);
static double root_distance (struct peer *);
static void clock_combine (peer_select *, int, int);
static void peer_xmit (struct peer *);
@@ -260,19 +266,16 @@ kiss_code_check(
return (RSTRKISS);
} else if(memcmp(&refid,"X", 1) == 0) {
return (XKISS);
- } else {
- return (UNKNOWNKISS);
}
- } else {
- return (NOKISS);
}
+ return (NOKISS);
}
/*
* Check that NAK is valid
*/
-enum nak_error_codes
+nak_code
valid_NAK(
struct peer *peer,
struct recvbuf *rbufp,
@@ -583,14 +586,15 @@ receive(
u_char hisleap; /* packet leap indicator */
u_char hismode; /* packet mode */
u_char hisstratum; /* packet stratum */
+ r4addr r4a; /* address restrictions */
u_short restrict_mask; /* restrict bits */
const char *hm_str; /* hismode string */
const char *am_str; /* association match string */
int kissCode = NOKISS; /* Kiss Code */
int has_mac; /* length of MAC field */
int authlen; /* offset of MAC field */
- int is_authentic = AUTH_NONE; /* cryptosum ok */
- int crypto_nak_test; /* result of crypto-NAK check */
+ auth_code is_authentic = AUTH_UNKNOWN; /* Was AUTH_NONE */
+ nak_code crypto_nak_test; /* result of crypto-NAK check */
int retcode = AM_NOMATCH; /* match code */
keyid_t skeyid = 0; /* key IDs */
u_int32 opcode = 0; /* extension field opcode */
@@ -612,6 +616,13 @@ receive(
#endif /* HAVE_NTP_SIGND */
/*
+ * Note that there are many places we do not call record_raw_stats().
+ *
+ * We only want to call it *after* we've sent a response, or perhaps
+ * when we've decided to drop a packet.
+ */
+
+ /*
* Monitor the packet and get restrictions. Note that the packet
* length for control and private mode packets must be checked
* by the service routines. Some restrictions have to be handled
@@ -626,25 +637,33 @@ receive(
sys_badlength++;
return; /* bogus port */
}
- restrict_mask = restrictions(&rbufp->recv_srcadr);
+ restrictions(&rbufp->recv_srcadr, &r4a);
+ restrict_mask = r4a.rflags;
+
pkt = &rbufp->recv_pkt;
- DPRINTF(2, ("receive: at %ld %s<-%s flags %x restrict %03x org %#010x.%08x xmt %#010x.%08x\n",
- current_time, stoa(&rbufp->dstadr->sin),
- stoa(&rbufp->recv_srcadr), rbufp->dstadr->flags,
- restrict_mask, ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
- ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
hisversion = PKT_VERSION(pkt->li_vn_mode);
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",
+ current_time, stoa(&rbufp->dstadr->sin),
+ stoa(&rbufp->recv_srcadr), r4a.ippeerlimit, hismode,
+ build_iflags(rbufp->dstadr->flags),
+ build_rflags(restrict_mask),
+ ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
+ ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
+
+ /* See basic mode and broadcast checks, below */
INSIST(0 != hisstratum);
if (restrict_mask & RES_IGNORE) {
+ DPRINTF(2, ("receive: drop: RES_IGNORE\n"));
sys_restricted++;
return; /* ignore everything */
}
if (hismode == MODE_PRIVATE) {
if (!ntp_mode7 || (restrict_mask & RES_NOQUERY)) {
+ DPRINTF(2, ("receive: drop: RES_NOQUERY\n"));
sys_restricted++;
return; /* no query private */
}
@@ -654,6 +673,7 @@ receive(
}
if (hismode == MODE_CONTROL) {
if (restrict_mask & RES_NOQUERY) {
+ DPRINTF(2, ("receive: drop: RES_NOQUERY\n"));
sys_restricted++;
return; /* no query control */
}
@@ -661,6 +681,7 @@ receive(
return;
}
if (restrict_mask & RES_DONTSERVE) {
+ DPRINTF(2, ("receive: drop: RES_DONTSERVE\n"));
sys_restricted++;
return; /* no time serve */
}
@@ -671,12 +692,25 @@ receive(
*/
if (restrict_mask & RES_FLAKE) {
if ((double)ntp_random() / 0x7fffffff < .1) {
+ DPRINTF(2, ("receive: drop: RES_FLAKE\n"));
sys_restricted++;
return; /* no flakeway */
}
}
/*
+ ** Format Layer Checks
+ **
+ ** Validate the packet format. The packet size, packet header,
+ ** and any extension field lengths are checked. We identify
+ ** the beginning of the MAC, to identify the upper limit of
+ ** of the hash computation.
+ **
+ ** In case of a format layer check violation, the packet is
+ ** discarded with no further processing.
+ */
+
+ /*
* Version check must be after the query packets, since they
* intentionally use an early version.
*/
@@ -686,6 +720,7 @@ receive(
&& hisversion >= NTP_OLDVERSION) {
sys_oldversion++; /* previous version */
} else {
+ DPRINTF(2, ("receive: drop: RES_VERSION\n"));
sys_badlength++;
return; /* old version */
}
@@ -700,6 +735,7 @@ receive(
if (hisversion == NTP_OLDVERSION) {
hismode = MODE_CLIENT;
} else {
+ DPRINTF(2, ("receive: drop: MODE_UNSPEC\n"));
sys_badlength++;
return; /* invalid mode */
}
@@ -716,6 +752,16 @@ receive(
* is a runt and discarded forthwith. If greater than 6, an
* extension field is present, so we subtract the length of the
* field and go around again.
+ *
+ * Note the above description is lame. We should/could also check
+ * the two bytes that make up the EF type and subtype, and then
+ * check the two bytes that tell us the EF length. A legacy MAC
+ * has a 4 byte keyID, and for conforming symmetric keys its value
+ * must be <= 64k, meaning the top two bytes will always be zero.
+ * Since the EF Type of 0 is reserved/unused, there's no way a
+ * conforming legacy MAC could ever be misinterpreted as an EF.
+ *
+ * There is more, but this isn't the place to document it.
*/
authlen = LEN_PKT_NOMAC;
@@ -728,9 +774,14 @@ receive(
#endif /*AUTOKEY */
if (has_mac % 4 != 0 || has_mac < (int)MIN_MAC_LEN) {
+ DPRINTF(2, ("receive: drop: bad post-packet length\n"));
sys_badlength++;
return; /* bad length */
}
+ /*
+ * This next test is clearly wrong - it needlessly
+ * prohibits short EFs (which don't yet exist)
+ */
if (has_mac <= (int)MAX_MAC_LEN) {
skeyid = ntohl(((u_int32 *)pkt)[authlen / 4]);
break;
@@ -741,6 +792,7 @@ receive(
if ( len % 4 != 0
|| len < 4
|| (int)len + authlen > rbufp->recv_length) {
+ DPRINTF(2, ("receive: drop: bad EF length\n"));
sys_badlength++;
return; /* bad length */
}
@@ -757,6 +809,7 @@ receive(
if ( hostlen >= sizeof(hostname)
|| hostlen > len -
offsetof(struct exten, pkt)) {
+ DPRINTF(2, ("receive: drop: bad autokey hostname length\n"));
sys_badlength++;
return; /* bad length */
}
@@ -764,6 +817,7 @@ receive(
hostname[hostlen] = '\0';
groupname = strchr(hostname, '@');
if (groupname == NULL) {
+ DPRINTF(2, ("receive: drop: empty autokey groupname\n"));
sys_declined++;
return;
}
@@ -779,14 +833,27 @@ receive(
* If has_mac is < 0 we had a malformed packet.
*/
if (has_mac < 0) {
+ DPRINTF(2, ("receive: drop: post-packet under-read\n"));
sys_badlength++;
return; /* bad length */
}
/*
- * If authentication required, a MAC must be present.
+ ** Packet Data Verification Layer
+ **
+ ** 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!
+ **
+ ** If authentication fails, we're done.
+ */
+
+ /*
+ * If authentication is explicitly required, a MAC must be present.
*/
if (restrict_mask & RES_DONTTRUST && has_mac == 0) {
+ DPRINTF(2, ("receive: drop: RES_DONTTRUST\n"));
sys_restricted++;
return; /* access denied */
}
@@ -803,9 +870,12 @@ receive(
if ( !(restrict_mask & RES_KOD)
|| MODE_BROADCAST == hismode
|| MODE_SERVER == hismode) {
- if (MODE_SERVER == hismode)
+ if (MODE_SERVER == hismode) {
DPRINTF(1, ("Possibly self-induced rate limiting of MODE_SERVER from %s\n",
stoa(&rbufp->recv_srcadr)));
+ } else {
+ DPRINTF(2, ("receive: drop: RES_KOD\n"));
+ }
return; /* rate exceeded */
}
if (hismode == MODE_CLIENT)
@@ -837,6 +907,7 @@ receive(
* multicaster, the broadcast address is null, so we use the
* unicast address anyway. Don't ask.
*/
+
peer = findpeer(rbufp, hismode, &retcode);
dstadr_sin = &rbufp->dstadr->sin;
NTOHL_FP(&pkt->org, &p_org);
@@ -921,6 +992,14 @@ receive(
#endif /* HAVE_NTP_SIGND */
} else {
+ /*
+ * has_mac is not 0
+ * Not a VALID_NAK
+ * Not an MS-SNTP SIGND packet
+ *
+ * So there is a MAC here.
+ */
+
restrict_mask &= ~RES_MSSNTP;
#ifdef AUTOKEY
/*
@@ -956,6 +1035,7 @@ receive(
* % can't happen
*/
if (has_mac < (int)MAX_MD5_LEN) {
+ DPRINTF(2, ("receive: drop: MD5 digest too short\n"));
sys_badauth++;
return;
}
@@ -972,6 +1052,7 @@ receive(
if ( crypto_flags
&& rbufp->dstadr ==
ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr)) {
+ DPRINTF(2, ("receive: drop: BCAST from wildcard\n"));
sys_restricted++;
return; /* no wildcard */
}
@@ -1033,6 +1114,80 @@ receive(
ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
}
+
+ /*
+ * Bug 3454:
+ *
+ * Now come at this from a different perspective:
+ * - If we expect a MAC and it's not there, we drop it.
+ * - If we expect one keyID and get another, we drop it.
+ * - If we have a MAC ahd it hasn't been validated yet, try.
+ * - if the provided MAC doesn't validate, we drop it.
+ *
+ * There might be more to this.
+ */
+ if (0 != peer && 0 != peer->keyid) {
+ /* Should we msyslog() any of these? */
+
+ /*
+ * This should catch:
+ * - no keyID where one is expected,
+ * - different keyID than what we expect.
+ */
+ if (peer->keyid != skeyid) {
+ DPRINTF(2, ("receive: drop: Wanted keyID %d, got %d from %s\n",
+ peer->keyid, skeyid,
+ stoa(&rbufp->recv_srcadr)));
+ sys_restricted++;
+ return; /* drop: access denied */
+ }
+
+ /*
+ * if has_mac != 0 ...
+ * - If it has not yet been validated, do so.
+ * (under what circumstances might that happen?)
+ * - if missing or bad MAC, log and drop.
+ */
+ if (0 != has_mac) {
+ if (is_authentic == AUTH_UNKNOWN) {
+ /* How can this happen? */
+ DPRINTF(2, ("receive: 3454 check: AUTH_UNKNOWN from %s\n",
+ stoa(&rbufp->recv_srcadr)));
+ if (!authdecrypt(skeyid, (u_int32 *)pkt, authlen,
+ has_mac)) {
+ /* MAC invalid or not found */
+ is_authentic = AUTH_ERROR;
+ } else {
+ is_authentic = AUTH_OK;
+ }
+ }
+ if (is_authentic != AUTH_OK) {
+ DPRINTF(2, ("receive: drop: missing or bad MAC from %s\n",
+ stoa(&rbufp->recv_srcadr)));
+ sys_restricted++;
+ return; /* drop: access denied */
+ }
+ }
+ }
+ /**/
+
+ /*
+ ** On-Wire Protocol Layer
+ **
+ ** Verify protocol operations consistent with the on-wire protocol.
+ ** The protocol discards bogus and duplicate packets as well as
+ ** minimizes disruptions doe to protocol restarts and dropped
+ ** packets. The operations are controlled by two timestamps:
+ ** the transmit timestamp saved in the client state variables,
+ ** and the origin timestamp in the server packet header. The
+ ** comparison of these two timestamps is called the loopback test.
+ ** The transmit timestamp functions as a nonce to verify that the
+ ** response corresponds to the original request. The transmit
+ ** timestamp also serves to discard replays of the most recent
+ ** packet. Upon failure of either test, the packet is discarded
+ ** with no further action.
+ */
+
/*
* The association matching rules are implemented by a set of
* routines and an association table. A packet matching an
@@ -1050,6 +1205,8 @@ receive(
* an ordinary client, simply toss a server mode packet back
* over the fence. If a manycast client, we have to work a
* little harder.
+ *
+ * There are cases here where we do not call record_raw_stats().
*/
case AM_FXMIT:
@@ -1058,6 +1215,21 @@ receive(
* send a crypto-NAK.
*/
if (!(rbufp->dstadr->flags & INT_MCASTOPEN)) {
+ /* HMS: would be nice to log FAST_XMIT|BADAUTH|RESTRICTED */
+ record_raw_stats(&rbufp->recv_srcadr,
+ &rbufp->dstadr->sin,
+ &p_org, &p_rec, &p_xmt, &rbufp->recv_time,
+ PKT_LEAP(pkt->li_vn_mode),
+ PKT_VERSION(pkt->li_vn_mode),
+ PKT_MODE(pkt->li_vn_mode),
+ PKT_TO_STRATUM(pkt->stratum),
+ pkt->ppoll,
+ pkt->precision,
+ FPTOD(NTOHS_FP(pkt->rootdelay)),
+ FPTOD(NTOHS_FP(pkt->rootdisp)),
+ pkt->refid,
+ rbufp->recv_length - MIN_V4_PKT_LEN, (u_char *)&pkt->exten);
+
if (AUTH(restrict_mask & RES_DONTTRUST,
is_authentic)) {
fast_xmit(rbufp, MODE_SERVER, skeyid,
@@ -1067,8 +1239,10 @@ receive(
restrict_mask);
sys_badauth++;
} else {
+ DPRINTF(2, ("receive: AM_FXMIT drop: !mcast restricted\n"));
sys_restricted++;
}
+
return; /* hooray */
}
@@ -1077,6 +1251,7 @@ receive(
* configured as a manycast server.
*/
if (!sys_manycastserver) {
+ DPRINTF(2, ("receive: AM_FXMIT drop: Not manycastserver\n"));
sys_restricted++;
return; /* not enabled */
}
@@ -1086,6 +1261,7 @@ receive(
* Do not respond if not the same group.
*/
if (group_test(groupname, NULL)) {
+ DPRINTF(2, ("receive: AM_FXMIT drop: empty groupname\n"));
sys_declined++;
return;
}
@@ -1100,6 +1276,7 @@ receive(
|| sys_stratum >= hisstratum
|| (!sys_cohort && sys_stratum == hisstratum + 1)
|| rbufp->dstadr->addr_refid == pkt->refid) {
+ DPRINTF(2, ("receive: AM_FXMIT drop: LEAP_NOTINSYNC || stratum || loop\n"));
sys_declined++;
return; /* no help */
}
@@ -1108,9 +1285,24 @@ receive(
* Respond only if authentication succeeds. Don't do a
* crypto-NAK, as that would not be useful.
*/
- if (AUTH(restrict_mask & RES_DONTTRUST, is_authentic))
+ if (AUTH(restrict_mask & RES_DONTTRUST, is_authentic)) {
+ record_raw_stats(&rbufp->recv_srcadr,
+ &rbufp->dstadr->sin,
+ &p_org, &p_rec, &p_xmt, &rbufp->recv_time,
+ PKT_LEAP(pkt->li_vn_mode),
+ PKT_VERSION(pkt->li_vn_mode),
+ PKT_MODE(pkt->li_vn_mode),
+ PKT_TO_STRATUM(pkt->stratum),
+ pkt->ppoll,
+ pkt->precision,
+ FPTOD(NTOHS_FP(pkt->rootdelay)),
+ FPTOD(NTOHS_FP(pkt->rootdisp)),
+ pkt->refid,
+ rbufp->recv_length - MIN_V4_PKT_LEN, (u_char *)&pkt->exten);
+
fast_xmit(rbufp, MODE_SERVER, skeyid,
restrict_mask);
+ }
return; /* hooray */
/*
@@ -1131,6 +1323,8 @@ receive(
* There is an implosion hazard at the manycast client, since
* the manycast servers send the server packet immediately. If
* the guy is already here, don't fire up a duplicate.
+ *
+ * There are cases here where we do not call record_raw_stats().
*/
case AM_MANYCAST:
@@ -1139,18 +1333,23 @@ receive(
* Do not respond if not the same group.
*/
if (group_test(groupname, NULL)) {
+ DPRINTF(2, ("receive: AM_MANYCAST drop: empty groupname\n"));
sys_declined++;
return;
}
#endif /* AUTOKEY */
if ((peer2 = findmanycastpeer(rbufp)) == NULL) {
+ DPRINTF(2, ("receive: AM_MANYCAST drop: No manycast peer\n"));
sys_restricted++;
return; /* not enabled */
}
if (!AUTH( (!(peer2->cast_flags & MDF_POOL)
&& sys_authenticate)
|| (restrict_mask & (RES_NOPEER |
- RES_DONTTRUST)), is_authentic)) {
+ RES_DONTTRUST)), is_authentic)
+ /* MC: RES_NOEPEER? */
+ ) {
+ DPRINTF(2, ("receive: AM_MANYCAST drop: bad auth || (NOPEER|DONTTRUST)\n"));
sys_restricted++;
return; /* access denied */
}
@@ -1162,15 +1361,17 @@ receive(
if ( hisleap == LEAP_NOTINSYNC
|| hisstratum < sys_floor
|| hisstratum >= sys_ceiling) {
+ DPRINTF(2, ("receive: AM_MANYCAST drop: unsync/stratum\n"));
sys_declined++;
return; /* no help */
}
peer = newpeer(&rbufp->recv_srcadr, NULL, rbufp->dstadr,
- MODE_CLIENT, hisversion, peer2->minpoll,
- peer2->maxpoll, FLAG_PREEMPT |
- (FLAG_IBURST & peer2->flags), MDF_UCAST |
- MDF_UCLNT, 0, skeyid, sys_ident);
+ r4a.ippeerlimit, MODE_CLIENT, hisversion,
+ peer2->minpoll, peer2->maxpoll,
+ FLAG_PREEMPT | (FLAG_IBURST & peer2->flags),
+ MDF_UCAST | MDF_UCLNT, 0, skeyid, sys_ident);
if (NULL == peer) {
+ DPRINTF(2, ("receive: AM_MANYCAST drop: duplicate\n"));
sys_declined++;
return; /* ignore duplicate */
}
@@ -1197,6 +1398,8 @@ receive(
* the packet is authentic and we are enabled as broadcast
* client, mobilize a broadcast client association. We don't
* kiss any frogs here.
+ *
+ * There are cases here where we do not call record_raw_stats().
*/
case AM_NEWBCL:
@@ -1205,16 +1408,21 @@ receive(
* Do not respond if not the same group.
*/
if (group_test(groupname, sys_ident)) {
+ DPRINTF(2, ("receive: AM_NEWBCL drop: groupname mismatch\n"));
sys_declined++;
return;
}
#endif /* AUTOKEY */
if (sys_bclient == 0) {
+ DPRINTF(2, ("receive: AM_NEWBCL drop: not a bclient\n"));
sys_restricted++;
return; /* not enabled */
}
if (!AUTH(sys_authenticate | (restrict_mask &
- (RES_NOPEER | RES_DONTTRUST)), is_authentic)) {
+ (RES_NOPEER | RES_DONTTRUST)), is_authentic)
+ /* NEWBCL: RES_NOEPEER? */
+ ) {
+ DPRINTF(2, ("receive: AM_NEWBCL drop: AUTH failed\n"));
sys_restricted++;
return; /* access denied */
}
@@ -1226,6 +1434,7 @@ receive(
if ( hisleap == LEAP_NOTINSYNC
|| hisstratum < sys_floor
|| hisstratum >= sys_ceiling) {
+ DPRINTF(2, ("receive: AM_NEWBCL drop: Unsync or bad stratum\n"));
sys_declined++;
return; /* no help */
}
@@ -1237,6 +1446,7 @@ receive(
*/
if ( crypto_flags && skeyid > NTP_MAXKEY
&& (opcode & 0xffff0000) != (CRYPTO_ASSOC | CRYPTO_RESP)) {
+ DPRINTF(2, ("receive: AM_NEWBCL drop: Autokey but not CRYPTO_ASSOC\n"));
sys_declined++;
return; /* protocol error */
}
@@ -1267,6 +1477,7 @@ receive(
*/
if (crypto_flags && skeyid > NTP_MAXKEY) {
sys_restricted++;
+ DPRINTF(2, ("receive: AM_NEWBCL drop: Autokey but not 2-way\n"));
return; /* no autokey */
}
#endif /* AUTOKEY */
@@ -1275,11 +1486,12 @@ receive(
* Do not execute the volley. Start out in
* broadcast client mode.
*/
- peer = newpeer(&rbufp->recv_srcadr, NULL,
- match_ep, MODE_BCLIENT, hisversion,
- pkt->ppoll, pkt->ppoll, FLAG_PREEMPT,
- MDF_BCLNT, 0, skeyid, sys_ident);
+ peer = newpeer(&rbufp->recv_srcadr, NULL, match_ep,
+ r4a.ippeerlimit, MODE_BCLIENT, hisversion,
+ pkt->ppoll, pkt->ppoll,
+ FLAG_PREEMPT, MDF_BCLNT, 0, skeyid, sys_ident);
if (NULL == peer) {
+ DPRINTF(2, ("receive: AM_NEWBCL drop: duplicate\n"));
sys_restricted++;
return; /* ignore duplicate */
@@ -1299,10 +1511,12 @@ receive(
* is fixed at this value.
*/
peer = newpeer(&rbufp->recv_srcadr, NULL, match_ep,
- MODE_CLIENT, hisversion, pkt->ppoll, pkt->ppoll,
+ 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++;
return; /* ignore duplicate */
}
@@ -1316,8 +1530,11 @@ receive(
/*
* This is the first packet received from a symmetric active
- * peer. If the packet is authentic and the first he sent,
- * mobilize a passive association. If not, kiss the frog.
+ * 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.
+ *
+ * There are cases here where we do not call record_raw_stats().
*/
case AM_NEWPASS:
@@ -1326,38 +1543,42 @@ receive(
* Do not respond if not the same group.
*/
if (group_test(groupname, sys_ident)) {
+ DPRINTF(2, ("receive: AM_NEWPASS drop: Autokey group mismatch\n"));
sys_declined++;
return;
}
#endif /* AUTOKEY */
if (!AUTH(sys_authenticate | (restrict_mask &
- (RES_NOPEER | RES_DONTTRUST)), is_authentic)) {
-
- /*
- * 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;
+ (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;
+ }
}
/* [Bug 2941]
* If we got here, the packet isn't part of an
- * existing association, it isn't correctly
- * authenticated, and it didn't meet either of
- * the previous two special cases so we should
- * just drop it on the floor. For example,
+ * existing association, either isn't correctly
+ * authenticated or it is but we are refusing
+ * ephemeral peer requests, and it didn't meet
+ * either of the previous two special cases so we
+ * should just drop it on the floor. For example,
* crypto-NAKs (is_authentic == AUTH_CRYPTO)
* will make it this far. This is just
* debug-printed and not logged to avoid log
@@ -1384,18 +1605,21 @@ receive(
*/
if ( hisleap != LEAP_NOTINSYNC
&& (hisstratum < sys_floor || hisstratum >= sys_ceiling)) {
+ DPRINTF(2, ("receive: AM_NEWPASS drop: Autokey group mismatch\n"));
sys_declined++;
return; /* no help */
}
/*
* The message is correctly authenticated and allowed.
- * Mobilize a symmetric passive association.
+ * Mobilize a symmetric passive association, if we won't
+ * exceed the ippeerlimit.
*/
- if ((peer = newpeer(&rbufp->recv_srcadr, NULL,
- rbufp->dstadr, MODE_PASSIVE, hisversion, pkt->ppoll,
- NTP_MAXDPOLL, 0, MDF_UCAST, 0, skeyid,
- sys_ident)) == NULL) {
+ if ((peer = newpeer(&rbufp->recv_srcadr, NULL, rbufp->dstadr,
+ r4a.ippeerlimit, MODE_PASSIVE, hisversion,
+ pkt->ppoll, NTP_MAXDPOLL, 0, MDF_UCAST, 0,
+ skeyid, sys_ident)) == NULL) {
+ DPRINTF(2, ("receive: AM_NEWPASS drop: newpeer() failed\n"));
sys_declined++;
return; /* ignore duplicate */
}
@@ -1404,6 +1628,8 @@ receive(
/*
* Process regular packet. Nothing special.
+ *
+ * There are cases here where we do not call record_raw_stats().
*/
case AM_PROCPKT:
@@ -1412,6 +1638,7 @@ receive(
* Do not respond if not the same group.
*/
if (group_test(groupname, peer->ident)) {
+ DPRINTF(2, ("receive: AM_PROCPKT drop: Autokey group mismatch\n"));
sys_declined++;
return;
}
@@ -1437,7 +1664,7 @@ receive(
/* This is noteworthy, not error-worthy */
if (pkt->ppoll != peer->ppoll) {
- msyslog(LOG_INFO, "receive: broadcast poll from %s changed from %ud to %ud",
+ msyslog(LOG_INFO, "receive: broadcast poll from %s changed from %u to %u",
stoa(&rbufp->recv_srcadr),
peer->ppoll, pkt->ppoll);
}
@@ -1445,7 +1672,7 @@ receive(
/* This is error-worthy */
if (pkt->ppoll < peer->minpoll ||
pkt->ppoll > peer->maxpoll ) {
- msyslog(LOG_INFO, "receive: broadcast poll of %ud from %s is out-of-range (%d to %d)!",
+ 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);
++bail;
@@ -1520,6 +1747,7 @@ receive(
}
if (bail) {
+ DPRINTF(2, ("receive: AM_PROCPKT drop: bail\n"));
peer->timelastrec = current_time;
sys_declined++;
return;
@@ -1535,6 +1763,7 @@ receive(
* attempt to deny service, just ignore it.
*/
case AM_ERR:
+ DPRINTF(2, ("receive: AM_ERR drop.\n"));
sys_declined++;
return;
@@ -1542,6 +1771,7 @@ receive(
* For everything else there is the bit bucket.
*/
default:
+ DPRINTF(2, ("receive: default drop.\n"));
sys_declined++;
return;
}
@@ -1555,6 +1785,7 @@ receive(
if ( is_authentic != AUTH_CRYPTO
&& ( ((peer->flags & FLAG_SKEY) && skeyid <= NTP_MAXKEY)
|| (!(peer->flags & FLAG_SKEY) && skeyid > NTP_MAXKEY))) {
+ DPRINTF(2, ("receive: drop: Autokey but wrong/bad auth\n"));
sys_badauth++;
return;
}
@@ -1575,9 +1806,12 @@ receive(
* A KoD packet we pay attention to cannot have a 0 transmit
* timestamp.
*/
+
+ kissCode = kiss_code_check(hisleap, hisstratum, hismode, pkt->refid);
+
if (L_ISZERO(&p_xmt)) {
peer->flash |= TEST3; /* unsynch */
- if (STRATUM_UNSPEC == hisstratum) { /* KoD packet */
+ if (kissCode != NOKISS) { /* KoD packet */
peer->bogusorg++; /* for TEST2 or TEST3 */
msyslog(LOG_INFO,
"receive: Unexpected zero transmit timestamp in KoD from %s",
@@ -1591,6 +1825,7 @@ receive(
* the most recent packet, authenticated or not.
*/
} else if (L_ISEQU(&peer->xmt, &p_xmt)) {
+ DPRINTF(2, ("receive: drop: Duplicate xmit\n"));
peer->flash |= TEST1; /* duplicate */
peer->oldpkt++;
return;
@@ -1601,13 +1836,13 @@ receive(
* see if this is an interleave broadcast packet until after
* we've validated the MAC that SHOULD be provided.
*
- * hisstratum should never be 0.
+ * hisstratum cannot be 0 - see assertion above.
* If hisstratum is 15, then we'll advertise as UNSPEC but
* at least we'll be able to sync with the broadcast server.
*/
} else if (hismode == MODE_BROADCAST) {
- if ( 0 == hisstratum
- || STRATUM_UNSPEC <= hisstratum) {
+ /* 0 is unexpected too, and impossible */
+ if (STRATUM_UNSPEC <= hisstratum) {
/* Is this a ++sys_declined or ??? */
msyslog(LOG_INFO,
"receive: Unexpected stratum (%d) in broadcast from %s",
@@ -1628,7 +1863,7 @@ receive(
* (nonzero) org, rec, and xmt timestamps set to the xmt timestamp
* that we have previously sent out. Watch interleave mode.
*/
- } else if (STRATUM_UNSPEC == hisstratum) {
+ } else if (kissCode != NOKISS) {
DEBUG_INSIST(!L_ISZERO(&p_xmt));
if ( L_ISZERO(&p_org) /* We checked p_xmt above */
|| L_ISZERO(&p_rec)) {
@@ -1675,7 +1910,8 @@ receive(
* should 'aorg' be all-zero because this really was the original
* transmit timestamp, we'll ignore this reply. There is a window
* of one nanosecond once every 136 years' time where this is
- * possible. We currently ignore this situation.
+ * possible. We currently ignore this situation, as a completely
+ * zero timestamp is (quietly?) disallowed.
*
* Otherwise, check for bogus packet in basic mode.
* If it is bogus, switch to interleaved mode and resynchronize,
@@ -1684,11 +1920,11 @@ receive(
*
* This could also mean somebody is forging packets claiming to
* be from us, attempting to cause our server to KoD us.
+ *
+ * We have earlier asserted that hisstratum cannot be 0.
+ * If hisstratum is STRATUM_UNSPEC, it means he's not sync'd.
*/
} else if (peer->flip == 0) {
- INSIST(0 != hisstratum);
- INSIST(STRATUM_UNSPEC != hisstratum);
-
if (0) {
} else if (L_ISZERO(&p_org)) {
const char *action;
@@ -1767,10 +2003,13 @@ receive(
*/
} else if ( !L_ISZERO(&peer->dst)
&& !L_ISEQU(&p_org, &peer->dst)) {
+ DPRINTF(2, ("receive: drop: Bogus packet in interleaved symmetric mode\n"));
peer->bogusorg++;
peer->flags |= FLAG_XBOGUS;
peer->flash |= TEST2; /* bogus */
+#ifdef BUG3453
return; /* Bogus packet, we are done */
+#endif
}
/**/
@@ -1788,6 +2027,7 @@ receive(
if (unpeer_crypto_nak_early) {
unpeer(peer);
}
+ DPRINTF(2, ("receive: drop: PREEMPT crypto_NAK\n"));
return;
}
#ifdef AUTOKEY
@@ -1795,6 +2035,7 @@ receive(
peer_clear(peer, "AUTH");
}
#endif /* AUTOKEY */
+ DPRINTF(2, ("receive: drop: crypto_NAK\n"));
return;
/*
@@ -1832,6 +2073,7 @@ receive(
peer_clear(peer, "AUTH");
}
#endif /* AUTOKEY */
+ DPRINTF(2, ("receive: drop: Bad or missing AUTH\n"));
return;
}
@@ -1901,11 +2143,9 @@ receive(
/*
* Check for any kiss codes. Note this is only used when a server
- * responds to a packet request
+ * responds to a packet request.
*/
- kissCode = kiss_code_check(hisleap, hisstratum, hismode, pkt->refid);
-
/*
* Check to see if this is a RATE Kiss Code
* Currently this kiss code will accept whatever poll
@@ -2204,11 +2444,12 @@ process_packet(
/*
* Capture the header values in the client/peer association..
*/
- record_raw_stats(&peer->srcadr, peer->dstadr ?
- &peer->dstadr->sin : NULL,
+ record_raw_stats(&peer->srcadr,
+ peer->dstadr ? &peer->dstadr->sin : NULL,
&p_org, &p_rec, &p_xmt, &peer->dst,
pleap, pversion, pmode, pstratum, pkt->ppoll, pkt->precision,
- p_del, p_disp, pkt->refid);
+ p_del, p_disp, pkt->refid,
+ len - MIN_V4_PKT_LEN, (u_char *)&pkt->exten);
peer->leap = pleap;
peer->stratum = min(pstratum, STRATUM_UNSPEC);
peer->pmode = pmode;
@@ -4301,6 +4542,7 @@ pool_xmit(
int rc;
struct interface * lcladr;
sockaddr_u * rmtadr;
+ r4addr r4a;
int restrict_mask;
struct peer * p;
l_fp xmt_tx;
@@ -4337,11 +4579,12 @@ pool_xmit(
/* copy_addrinfo_list ai_addr points to a sockaddr_u */
rmtadr = (sockaddr_u *)(void *)pool->ai->ai_addr;
pool->ai = pool->ai->ai_next;
- p = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT, 0);
+ p = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT, 0, NULL);
} while (p != NULL && pool->ai != NULL);
if (p != NULL)
return; /* out of addresses, re-query DNS next poll */
- restrict_mask = restrictions(rmtadr);
+ restrictions(rmtadr, &r4a);
+ restrict_mask = r4a.rflags;
if (RES_FLAGS & restrict_mask)
restrict_source(rmtadr, 0,
current_time + POOL_SOLICIT_WINDOW + 1);
@@ -4932,4 +5175,6 @@ proto_clr_stats(void)
sys_badauth = 0;
sys_limitrejected = 0;
sys_kodsent = 0;
+ sys_lamport = 0;
+ sys_tsrounding = 0;
}
diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c
index bc389012ef56..a0dbd4ca83b6 100644
--- a/ntpd/ntp_refclock.c
+++ b/ntpd/ntp_refclock.c
@@ -1044,7 +1044,7 @@ refclock_control(
clktype = (u_char)REFCLOCKTYPE(srcadr);
unit = REFCLOCKUNIT(srcadr);
- peer = findexistingpeer(srcadr, NULL, NULL, -1, 0);
+ peer = findexistingpeer(srcadr, NULL, NULL, -1, 0, NULL);
if (NULL == peer)
return;
@@ -1155,7 +1155,7 @@ refclock_buginfo(
clktype = (u_char) REFCLOCKTYPE(srcadr);
unit = REFCLOCKUNIT(srcadr);
- peer = findexistingpeer(srcadr, NULL, NULL, -1, 0);
+ peer = findexistingpeer(srcadr, NULL, NULL, -1, 0, NULL);
if (NULL == peer || NULL == peer->procptr)
return;
@@ -1247,16 +1247,24 @@ refclock_params(
/*
* If flag3 is lit, select the kernel PPS if we can.
+ *
+ * Note: EOPNOTSUPP is the only 'legal' error code we deal with;
+ * it is part of the 'if we can' strategy. Any other error
+ * indicates something more sinister and makes this function fail.
*/
if (mode & CLK_FLAG3) {
if (time_pps_kcbind(ap->handle, PPS_KC_HARDPPS,
ap->pps_params.mode & ~PPS_TSFMT_TSPEC,
- PPS_TSFMT_TSPEC) < 0) {
- msyslog(LOG_ERR,
- "refclock_params: time_pps_kcbind: %m");
- return (0);
+ PPS_TSFMT_TSPEC) < 0)
+ {
+ if (errno != EOPNOTSUPP) {
+ msyslog(LOG_ERR,
+ "refclock_params: time_pps_kcbind: %m");
+ return (0);
+ }
+ } else {
+ hardpps_enable = 1;
}
- hardpps_enable = 1;
}
return (1);
}
diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c
index 5e0e6f82f159..e541f7c51198 100644
--- a/ntpd/ntp_request.c
+++ b/ntpd/ntp_request.c
@@ -87,7 +87,7 @@ static void list_restrict (sockaddr_u *, endpt *, struct req_pkt *);
static void do_resaddflags (sockaddr_u *, endpt *, struct req_pkt *);
static void do_ressubflags (sockaddr_u *, endpt *, struct req_pkt *);
static void do_unrestrict (sockaddr_u *, endpt *, struct req_pkt *);
-static void do_restrict (sockaddr_u *, endpt *, struct req_pkt *, int);
+static void do_restrict (sockaddr_u *, endpt *, struct req_pkt *, restrict_op);
static void mon_getlist (sockaddr_u *, endpt *, struct req_pkt *);
static void reset_stats (sockaddr_u *, endpt *, struct req_pkt *);
static void reset_peer (sockaddr_u *, endpt *, struct req_pkt *);
@@ -582,6 +582,7 @@ process_private(
* him. If the wrong key was used, or packet doesn't
* have mac, return.
*/
+ /* XXX: Use authistrustedip(), or equivalent. */
if (!INFO_IS_AUTH(inpkt->auth_seq) || !info_auth_keyid
|| ntohl(tailinpkt->keyid) != info_auth_keyid) {
DPRINTF(5, ("failed auth %d info_auth_keyid %u pkt keyid %u maclen %lu\n",
@@ -837,7 +838,7 @@ peer_info (
#endif
datap += item_sz;
- pp = findexistingpeer(&addr, NULL, NULL, -1, 0);
+ pp = findexistingpeer(&addr, NULL, NULL, -1, 0, NULL);
if (NULL == pp)
continue;
if (IS_IPV6(srcadr)) {
@@ -981,7 +982,7 @@ peer_stats (
datap += item_sz;
- pp = findexistingpeer(&addr, NULL, NULL, -1, 0);
+ pp = findexistingpeer(&addr, NULL, NULL, -1, 0, NULL);
if (NULL == pp)
continue;
@@ -1150,6 +1151,8 @@ sys_stats(
ss->badauth = htonl((u_int32)sys_badauth);
ss->limitrejected = htonl((u_int32)sys_limitrejected);
ss->received = htonl((u_int32)sys_received);
+ ss->lamport = htonl((u_int32)sys_lamport);
+ ss->tsrounding = htonl((u_int32)sys_tsrounding);
(void) more_pkt();
flush_pkt();
}
@@ -1366,10 +1369,13 @@ do_conf(
*
* - minpoll/maxpoll, but they are treated properly
* for all cases internally. Checking not necessary.
+ *
+ * Note that we ignore any previously-specified ippeerlimit.
+ * If we're told to create the peer, we create the peer.
*/
/* finally create the peer */
- if (peer_config(&peeraddr, NULL, NULL,
+ if (peer_config(&peeraddr, NULL, NULL, -1,
temp_cp.hmode, temp_cp.version, temp_cp.minpoll,
temp_cp.maxpoll, fl, temp_cp.ttl, temp_cp.keyid,
NULL) == 0)
@@ -1449,7 +1455,7 @@ do_unconf(
p = NULL;
do {
p = findexistingpeer(
- &peeraddr, NULL, p, -1, 0);
+ &peeraddr, NULL, p, -1, 0, NULL);
} while (p && !(FLAG_CONFIG & p->flags));
if (!loops && !p) {
@@ -1653,7 +1659,7 @@ list_restrict4(
pir->v6_flag = 0;
pir->mask = htonl(res->u.v4.mask);
pir->count = htonl(res->count);
- pir->flags = htons(res->flags);
+ pir->rflags = htons(res->rflags);
pir->mflags = htons(res->mflags);
pir = (struct info_restrict *)more_pkt();
}
@@ -1684,7 +1690,7 @@ list_restrict6(
pir->mask6 = res->u.v6.mask;
pir->v6_flag = 1;
pir->count = htonl(res->count);
- pir->flags = htons(res->flags);
+ pir->rflags = htons(res->rflags);
pir->mflags = htons(res->mflags);
pir = (struct info_restrict *)more_pkt();
}
@@ -1773,7 +1779,7 @@ do_restrict(
sockaddr_u *srcadr,
endpt *inter,
struct req_pkt *inpkt,
- int op
+ restrict_op op
)
{
char * datap;
@@ -1784,6 +1790,18 @@ do_restrict(
sockaddr_u matchmask;
int bad;
+ switch(op) {
+ case RESTRICT_FLAGS:
+ case RESTRICT_UNFLAG:
+ case RESTRICT_REMOVE:
+ case RESTRICT_REMOVEIF:
+ break;
+
+ default:
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
+
/*
* Do a check of the flags to make sure that only
* the NTPPORT flag is set, if any. If not, complain
@@ -1797,7 +1815,7 @@ do_restrict(
return;
}
- bad = FALSE;
+ bad = 0;
while (items-- > 0 && !bad) {
memcpy(&cr, datap, item_sz);
cr.flags = ntohs(cr.flags);
@@ -1837,6 +1855,7 @@ do_restrict(
memcpy(&cr, datap, item_sz);
cr.flags = ntohs(cr.flags);
cr.mflags = ntohs(cr.mflags);
+ cr.ippeerlimit = ntohs(cr.ippeerlimit);
if (client_v6_capable && cr.v6_flag) {
AF(&matchaddr) = AF_INET6;
AF(&matchmask) = AF_INET6;
@@ -1849,7 +1868,7 @@ do_restrict(
NSRCADR(&matchmask) = cr.mask;
}
hack_restrict(op, &matchaddr, &matchmask, cr.mflags,
- cr.flags, 0);
+ cr.ippeerlimit, cr.flags, 0);
datap += item_sz;
}
@@ -1975,7 +1994,7 @@ reset_peer(
#ifdef ISC_PLATFORM_HAVESALEN
peeraddr.sa.sa_len = SOCKLEN(&peeraddr);
#endif
- p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0, NULL);
if (NULL == p)
bad++;
datap += item_sz;
@@ -2008,10 +2027,10 @@ reset_peer(
#ifdef ISC_PLATFORM_HAVESALEN
peeraddr.sa.sa_len = SOCKLEN(&peeraddr);
#endif
- p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0, NULL);
while (p != NULL) {
peer_reset(p);
- p = findexistingpeer(&peeraddr, NULL, p, -1, 0);
+ p = findexistingpeer(&peeraddr, NULL, p, -1, 0, NULL);
}
datap += item_sz;
}
@@ -2492,7 +2511,7 @@ get_clock_info(
while (items-- > 0 && ic) {
NSRCADR(&addr) = *clkaddr++;
if (!ISREFCLOCKADR(&addr) || NULL ==
- findexistingpeer(&addr, NULL, NULL, -1, 0)) {
+ findexistingpeer(&addr, NULL, NULL, -1, 0, NULL)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
@@ -2556,7 +2575,7 @@ set_clock_fudge(
#endif
SET_PORT(&addr, NTP_PORT);
if (!ISREFCLOCKADR(&addr) || NULL ==
- findexistingpeer(&addr, NULL, NULL, -1, 0)) {
+ findexistingpeer(&addr, NULL, NULL, -1, 0, NULL)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
@@ -2631,7 +2650,7 @@ get_clkbug_info(
while (items-- > 0 && ic) {
NSRCADR(&addr) = *clkaddr++;
if (!ISREFCLOCKADR(&addr) || NULL ==
- findexistingpeer(&addr, NULL, NULL, -1, 0)) {
+ findexistingpeer(&addr, NULL, NULL, -1, 0, NULL)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c
index ad6c82a32a41..f3c129342550 100644
--- a/ntpd/ntp_restrict.c
+++ b/ntpd/ntp_restrict.c
@@ -86,6 +86,8 @@ static u_long res_limited_refcnt;
/*
* Our default entries.
+ *
+ * We can make this cleaner with c99 support: see init_restrict().
*/
static restrict_u restrict_def4;
static restrict_u restrict_def6;
@@ -94,8 +96,9 @@ static restrict_u restrict_def6;
* "restrict source ..." enabled knob and restriction bits.
*/
static int restrict_source_enabled;
-static u_short restrict_source_flags;
+static u_short restrict_source_rflags;
static u_short restrict_source_mflags;
+static short restrict_source_ippeerlimit;
/*
* private functions
@@ -111,9 +114,82 @@ static restrict_u * match_restrict6_addr(const struct in6_addr *,
static restrict_u * match_restrict_entry(const restrict_u *, int);
static int res_sorts_before4(restrict_u *, restrict_u *);
static int res_sorts_before6(restrict_u *, restrict_u *);
+static char * roptoa(restrict_op op);
+
+
+void dump_restricts(void);
+
+/*
+ * dump_restrict - spit out a restrict_u
+ */
+static void
+dump_restrict(
+ restrict_u * res,
+ int is_ipv6
+ )
+{
+ char as[INET6_ADDRSTRLEN];
+ char ms[INET6_ADDRSTRLEN];
+
+ if (is_ipv6) {
+ inet_ntop(AF_INET6, &res->u.v6.addr, as, sizeof as);
+ inet_ntop(AF_INET6, &res->u.v6.mask, ms, sizeof ms);
+ } else {
+ struct in_addr sia = { htonl(res->u.v4.addr) };
+ struct in_addr sim = { htonl(res->u.v4.mask) };
+
+ inet_ntop(AF_INET, &sia, as, sizeof as);
+ inet_ntop(AF_INET, &sim, ms, sizeof ms);
+ }
+ mprintf("restrict node at %p: %s/%s count %d, rflags %05x, mflags %05x, ippeerlimit %d, expire %lu, next %p\n",
+ res, as, ms, res->count, res->rflags, res->mflags,
+ res->ippeerlimit, res->expire, res->link);
+ return;
+}
/*
+ * dump_restricts - spit out the 'restrict' lines
+ */
+void
+dump_restricts(void)
+{
+ int defaultv4_done = 0;
+ int defaultv6_done = 0;
+ restrict_u * res;
+ restrict_u * next;
+
+ mprintf("dump_restrict: restrict_def4: %p\n", &restrict_def4);
+ /* Spit out 'restrict {,-4,-6} default ...' lines, if needed */
+ for (res = &restrict_def4; res != NULL; res = next) {
+ dump_restrict(res, 0);
+ next = res->link;
+ }
+
+ mprintf("dump_restrict: restrict_def6: %p\n", &restrict_def6);
+ for (res = &restrict_def6; res != NULL; res = next) {
+ dump_restrict(res, 1);
+ next = res->link;
+ }
+
+ /* Spit out the IPv4 list */
+ mprintf("dump_restrict: restrictlist4: %p\n", &restrictlist4);
+ for (res = restrictlist4; res != NULL; res = next) {
+ dump_restrict(res, 0);
+ next = res->link;
+ }
+
+ /* Spit out the IPv6 list */
+ mprintf("dump_restrict: restrictlist6: %p\n", &restrictlist6);
+ for (res = restrictlist6; res != NULL; res = next) {
+ dump_restrict(res, 1);
+ next = res->link;
+ }
+
+ return;
+}
+
+/*
* init_restrict - initialize the restriction data structures
*/
void
@@ -147,6 +223,10 @@ init_restrict(void)
* behavior as but reversed implementation compared to the docs.
*
*/
+
+ restrict_def4.ippeerlimit = -1; /* Cleaner if we have C99 */
+ restrict_def6.ippeerlimit = -1; /* Cleaner if we have C99 */
+
LINK_SLIST(restrictlist4, &restrict_def4, link);
LINK_SLIST(restrictlist6, &restrict_def6, link);
restrictcount = 2;
@@ -215,7 +295,7 @@ free_res(
restrict_u * unlinked;
restrictcount--;
- if (RES_LIMITED & res->flags)
+ if (RES_LIMITED & res->rflags)
dec_res_limited();
if (v6)
@@ -265,14 +345,21 @@ match_restrict4_addr(
restrict_u * next;
for (res = restrictlist4; res != NULL; res = next) {
+ struct in_addr sia = { htonl(res->u.v4.addr) };
+
next = res->link;
- if (res->expire &&
- res->expire <= current_time)
- free_res(res, v6);
- if (res->u.v4.addr == (addr & res->u.v4.mask)
- && (!(RESM_NTPONLY & res->mflags)
- || NTP_PORT == port))
+ DPRINTF(2, ("match_restrict4_addr: Checking %s, port %d ... ",
+ inet_ntoa(sia), port));
+ if ( res->expire
+ && res->expire <= current_time)
+ free_res(res, v6); /* zeroes the contents */
+ if ( res->u.v4.addr == (addr & res->u.v4.mask)
+ && ( !(RESM_NTPONLY & res->mflags)
+ || NTP_PORT == port)) {
+ DPRINTF(2, ("MATCH: ippeerlimit %d\n", res->ippeerlimit));
break;
+ }
+ DPRINTF(2, ("doesn't match: ippeerlimit %d\n", res->ippeerlimit));
}
return res;
}
@@ -410,19 +497,25 @@ res_sorts_before6(
/*
- * restrictions - return restrictions for this host
+ * restrictions - return restrictions for this host in *r4a
*/
-u_short
+void
restrictions(
- sockaddr_u *srcadr
+ sockaddr_u *srcadr,
+ r4addr *r4a
)
{
restrict_u *match;
struct in6_addr *pin6;
- u_short flags;
+
+ REQUIRE(NULL != r4a);
res_calls++;
- flags = 0;
+ r4a->rflags = RES_IGNORE;
+ r4a->ippeerlimit = 0;
+
+ DPRINTF(1, ("restrictions: looking up %s\n", stoa(srcadr)));
+
/* IPv4 source address */
if (IS_IPV4(srcadr)) {
/*
@@ -430,8 +523,11 @@ restrictions(
* (this should be done early in the receive process,
* not later!)
*/
- if (IN_CLASSD(SRCADR(srcadr)))
- return (int)RES_IGNORE;
+ if (IN_CLASSD(SRCADR(srcadr))) {
+ DPRINTF(1, ("restrictions: srcadr %s is multicast\n", stoa(srcadr)));
+ r4a->ippeerlimit = 2; /* XXX: we should use a better value */
+ return;
+ }
match = match_restrict4_addr(SRCADR(srcadr),
SRCPORT(srcadr));
@@ -448,7 +544,8 @@ restrictions(
res_not_found++;
else
res_found++;
- flags = match->flags;
+ r4a->rflags = match->rflags;
+ r4a->ippeerlimit = match->ippeerlimit;
}
/* IPv6 source address */
@@ -461,7 +558,7 @@ restrictions(
* not later!)
*/
if (IN6_IS_ADDR_MULTICAST(pin6))
- return (int)RES_IGNORE;
+ return;
match = match_restrict6_addr(pin6, SRCPORT(srcadr));
INSIST(match != NULL);
@@ -470,9 +567,29 @@ restrictions(
res_not_found++;
else
res_found++;
- flags = match->flags;
+ r4a->rflags = match->rflags;
+ r4a->ippeerlimit = match->ippeerlimit;
+ }
+ return;
+}
+
+
+/*
+ * roptoa - convert a restrict_op to a string
+ */
+char *
+roptoa(restrict_op op) {
+ static char sb[30];
+
+ switch(op) {
+ case RESTRICT_FLAGS: return "RESTRICT_FLAGS";
+ case RESTRICT_UNFLAG: return "RESTRICT_UNFLAGS";
+ case RESTRICT_REMOVE: return "RESTRICT_REMOVE";
+ case RESTRICT_REMOVEIF: return "RESTRICT_REMOVEIF";
+ default:
+ snprintf(sb, sizeof sb, "**RESTRICT_#%d**", op);
+ return sb;
}
- return (flags);
}
@@ -481,11 +598,12 @@ restrictions(
*/
void
hack_restrict(
- int op,
+ restrict_op op,
sockaddr_u * resaddr,
sockaddr_u * resmask,
+ short ippeerlimit,
u_short mflags,
- u_short flags,
+ u_short rflags,
u_long expire
)
{
@@ -494,14 +612,15 @@ hack_restrict(
restrict_u * res;
restrict_u ** plisthead;
- DPRINTF(1, ("restrict: op %d addr %s mask %s mflags %08x flags %08x\n",
- op, stoa(resaddr), stoa(resmask), mflags, flags));
+ DPRINTF(1, ("hack_restrict: op %s addr %s mask %s ippeerlimit %d mflags %08x rflags %08x\n",
+ roptoa(op), stoa(resaddr), stoa(resmask), ippeerlimit, mflags, rflags));
if (NULL == resaddr) {
REQUIRE(NULL == resmask);
REQUIRE(RESTRICT_FLAGS == op);
- restrict_source_flags = flags;
+ restrict_source_rflags = rflags;
restrict_source_mflags = mflags;
+ restrict_source_ippeerlimit = ippeerlimit;
restrict_source_enabled = 1;
return;
}
@@ -538,8 +657,9 @@ hack_restrict(
} else /* not IPv4 nor IPv6 */
REQUIRE(0);
- match.flags = flags;
+ match.rflags = rflags;
match.mflags = mflags;
+ match.ippeerlimit = ippeerlimit;
match.expire = expire;
res = match_restrict_entry(&match, v6);
@@ -547,7 +667,7 @@ hack_restrict(
case RESTRICT_FLAGS:
/*
- * Here we add bits to the flags. If this is a
+ * Here we add bits to the rflags. If this is a
* new restriction add it.
*/
if (NULL == res) {
@@ -569,26 +689,29 @@ hack_restrict(
: res_sorts_before4(res, L_S_S_CUR()),
link, restrict_u);
restrictcount++;
- if (RES_LIMITED & flags)
+ if (RES_LIMITED & rflags)
inc_res_limited();
} else {
- if ((RES_LIMITED & flags) &&
- !(RES_LIMITED & res->flags))
+ if ( (RES_LIMITED & rflags)
+ && !(RES_LIMITED & res->rflags))
inc_res_limited();
- res->flags |= flags;
+ res->rflags |= rflags;
}
+
+ res->ippeerlimit = match.ippeerlimit;
+
break;
case RESTRICT_UNFLAG:
/*
- * Remove some bits from the flags. If we didn't
+ * Remove some bits from the rflags. If we didn't
* find this one, just return.
*/
if (res != NULL) {
- if ((RES_LIMITED & res->flags)
- && (RES_LIMITED & flags))
+ if ( (RES_LIMITED & res->rflags)
+ && (RES_LIMITED & rflags))
dec_res_limited();
- res->flags &= ~flags;
+ res->rflags &= ~rflags;
}
break;
@@ -639,7 +762,7 @@ restrict_source(
SET_HOSTMASK(&onesmask, AF(addr));
if (farewell) {
hack_restrict(RESTRICT_REMOVE, addr, &onesmask,
- 0, 0, 0);
+ -2, 0, 0, 0);
DPRINTF(1, ("restrict_source: %s removed", stoa(addr)));
return;
}
@@ -672,8 +795,8 @@ restrict_source(
return;
hack_restrict(RESTRICT_FLAGS, addr, &onesmask,
- restrict_source_mflags, restrict_source_flags,
- expire);
+ restrict_source_ippeerlimit, restrict_source_mflags,
+ restrict_source_rflags, expire);
DPRINTF(1, ("restrict_source: %s host restriction added\n",
stoa(addr)));
}
diff --git a/ntpd/ntp_scanner.c b/ntpd/ntp_scanner.c
index 6cfbeef40651..42b83c84eec6 100644
--- a/ntpd/ntp_scanner.c
+++ b/ntpd/ntp_scanner.c
@@ -167,6 +167,7 @@ lex_getch(
stream->backch = EOF;
if (stream->fpi)
conf_file_sum += ch;
+ stream->curpos.ncol++;
} else if (stream->fpi) {
/* fetch next 7-bit ASCII char (or EOF) from file */
while ((ch = fgetc(stream->fpi)) != EOF && ch > SCHAR_MAX)
diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c
index 3a95819821b5..d8798de1286e 100644
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -666,6 +666,8 @@ mprintf_clock_stats(
* peer ip address
* IP address
* t1 t2 t3 t4 timestamps
+ * leap, version, mode, stratum, ppoll, precision, root delay, root dispersion, REFID
+ * length and hex dump of any EFs and any legacy MAC.
*/
void
record_raw_stats(
@@ -683,7 +685,9 @@ record_raw_stats(
int precision,
double root_delay, /* seconds */
double root_dispersion,/* seconds */
- u_int32 refid
+ u_int32 refid,
+ int len,
+ u_char *extra
)
{
l_fp now;
@@ -697,13 +701,23 @@ record_raw_stats(
day = now.l_ui / 86400 + MJD_1900;
now.l_ui %= 86400;
if (rawstats.fp != NULL) {
- fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s %d %d %d %d %d %d %.6f %.6f %s\n",
+ fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s %d %d %d %d %d %d %.6f %.6f %s",
day, ulfptoa(&now, 3),
- stoa(srcadr), dstadr ? stoa(dstadr) : "-",
+ srcadr ? stoa(srcadr) : "-",
+ dstadr ? stoa(dstadr) : "-",
ulfptoa(t1, 9), ulfptoa(t2, 9),
ulfptoa(t3, 9), ulfptoa(t4, 9),
leap, version, mode, stratum, ppoll, precision,
root_delay, root_dispersion, refid_str(refid, stratum));
+ if (len > 0) {
+ int i;
+
+ fprintf(rawstats.fp, " %d: ", len);
+ for (i = 0; i < len; ++i) {
+ fprintf(rawstats.fp, "%02x", extra[i]);
+ }
+ }
+ fprintf(rawstats.fp, "\n");
fflush(rawstats.fp);
}
}
diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c
index 82ce7542f74d..47b080872f6f 100644
--- a/ntpd/ntpd-opts.c
+++ b/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed March 21, 2017 at 10:42:12 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed February 27, 2018 at 05:13:19 PM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -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.8p10\n"
+/* 0 */ "ntpd 4.2.8p11\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.8p10\n"
+/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p11\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.8p10";
+/* 3118 */ "ntpd 4.2.8p11";
/**
* ipv4 option description with
@@ -1529,7 +1529,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8p10\n\
+ puts(_("ntpd 4.2.8p11\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.8p10\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p11\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.8p10"));
+ puts(_("ntpd 4.2.8p11"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h
index a511857664a1..3372d4d8e41b 100644
--- a/ntpd/ntpd-opts.h
+++ b/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed March 21, 2017 at 10:42:11 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed February 27, 2018 at 05:13:17 PM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -106,9 +106,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.8p10"
+#define NTPD_VERSION "4.2.8p11"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8p10"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p11"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpd/ntpd.1ntpdman b/ntpd/ntpd.1ntpdman
index a977bf0d9c7a..ec02e0c177f9 100644
--- a/ntpd/ntpd.1ntpdman
+++ b/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "21 Mar 2017" "4.2.8p10" "User Commands"
+.TH ntpd 1ntpdman "27 Feb 2018" "4.2.8p11" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wcairs/ag-fdaWls)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Ffa4WQ/ag-RfaWVQ)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:13 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:30 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpd/ntpd.1ntpdmdoc b/ntpd/ntpd.1ntpdmdoc
index 34ec086b1cb9..339d2cff04a2 100644
--- a/ntpd/ntpd.1ntpdmdoc
+++ b/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:23 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:47 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c
index a0880be6c84b..d4204efd8d39 100644
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -313,11 +313,16 @@ my_pthread_warmup(void)
#if defined(HAVE_PTHREAD_ATTR_GETSTACKSIZE) && \
defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && \
defined(PTHREAD_STACK_MIN)
- rc = pthread_attr_setstacksize(&thr_attr, PTHREAD_STACK_MIN);
- if (0 != rc)
- msyslog(LOG_ERR,
- "my_pthread_warmup: pthread_attr_setstacksize() -> %s",
- strerror(rc));
+ {
+ size_t ssmin = 32*1024; /* 32kB should be minimum */
+ if (ssmin < PTHREAD_STACK_MIN)
+ ssmin = PTHREAD_STACK_MIN;
+ rc = pthread_attr_setstacksize(&thr_attr, ssmin);
+ if (0 != rc)
+ msyslog(LOG_ERR,
+ "my_pthread_warmup: pthread_attr_setstacksize() -> %s",
+ strerror(rc));
+ }
#endif
rc = pthread_create(
&thread, &thr_attr, my_pthread_warmup_worker, NULL);
diff --git a/ntpd/ntpd.html b/ntpd/ntpd.html
index e6aadd455b92..3af0cc546bbf 100644
--- a/ntpd/ntpd.html
+++ b/ntpd/ntpd.html
@@ -39,7 +39,7 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
- <p>This document applies to version 4.2.8p10 of <code>ntpd</code>.
+ <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
@@ -220,7 +220,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p10-beta
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p10
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
diff --git a/ntpd/ntpd.man.in b/ntpd/ntpd.man.in
index c4a9200a477b..d3f94c65409b 100644
--- a/ntpd/ntpd.man.in
+++ b/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "21 Mar 2017" "4.2.8p10" "User Commands"
+.TH ntpd @NTPD_MS@ "27 Feb 2018" "4.2.8p11" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-wcairs/ag-fdaWls)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Ffa4WQ/ag-RfaWVQ)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:13 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:30 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/ntpd/ntpd.mdoc.in b/ntpd/ntpd.mdoc.in
index 52fcef09e171..53b1f4176a14 100644
--- a/ntpd/ntpd.mdoc.in
+++ b/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:44:23 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:14:47 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/ntpd/ntpsim.c b/ntpd/ntpsim.c
index b7c3218fc1a2..5ae05b7ab0c9 100644
--- a/ntpd/ntpsim.c
+++ b/ntpd/ntpsim.c
@@ -79,6 +79,7 @@ void create_server_associations(void)
NULL,
loopback_interface,
MODE_CLIENT,
+ -1,
NTP_VERSION,
NTP_MINDPOLL,
NTP_MAXDPOLL,
diff --git a/ntpd/refclock_gpsdjson.c b/ntpd/refclock_gpsdjson.c
index 00cd3fc534ea..c2d41ff07f17 100644
--- a/ntpd/refclock_gpsdjson.c
+++ b/ntpd/refclock_gpsdjson.c
@@ -1891,7 +1891,7 @@ gpsd_init_socket(
*/
ov = 1;
rc = setsockopt(up->fdt, IPPROTO_TCP, TCP_NODELAY,
- (char*)&ov, sizeof(ov));
+ (void *)&ov, sizeof(ov));
if (-1 == rc) {
if (syslogok(pp, up))
msyslog(LOG_INFO,
@@ -1999,7 +1999,7 @@ gpsd_test_socket(
/* check for socket error */
ec = 0;
lc = sizeof(ec);
- rc = getsockopt(up->fdt, SOL_SOCKET, SO_ERROR, &ec, &lc);
+ rc = getsockopt(up->fdt, SOL_SOCKET, SO_ERROR, (void *)&ec, &lc);
if (-1 == rc || 0 != ec) {
const char *errtxt;
if (0 == ec)
diff --git a/ntpd/refclock_jjy.c b/ntpd/refclock_jjy.c
index 22636a0af8cb..a73cdd88948d 100644
--- a/ntpd/refclock_jjy.c
+++ b/ntpd/refclock_jjy.c
@@ -110,6 +110,11 @@
/* [Fix] C-DEX JST2000 */
/* Thanks to Mr. Kuramatsu for the report and the patch. */
/* */
+/* 2017/04/30 */
+/* [Change] Avoid a wrong report of the coverity static analysis */
+/* tool. ( The code is harmless and has no bug. ) */
+/* teljjy_conn_send() */
+/* */
/**********************************************************************/
#ifdef HAVE_CONFIG_H
@@ -393,6 +398,7 @@ struct refclock refclock_jjy = {
#define JJY_CLOCKSTATS_MARK_ATTENTION 5
#define JJY_CLOCKSTATS_MARK_WARNING 6
#define JJY_CLOCKSTATS_MARK_ERROR 7
+#define JJY_CLOCKSTATS_MARK_BUG 8
/* Local constants definition for the clockstats messages */
@@ -3299,6 +3305,7 @@ teljjy_conn_send ( struct peer *peer, struct refclockproc *pp, struct jjyunit *u
const char * pCmd ;
int i, iLen, iNextClockState ;
+ char sLog [ 120 ] ;
DEBUG_TELJJY_PRINTF( "teljjy_conn_send" ) ;
@@ -3327,8 +3334,8 @@ teljjy_conn_send ( struct peer *peer, struct refclockproc *pp, struct jjyunit *u
/* Loopback character comes */
#ifdef DEBUG
if ( debug ) {
- printf( "refclock_jjy.c : teljjy_conn_send : iLoopbackCount=%d\n",
- up->iLoopbackCount ) ;
+ printf( "refclock_jjy.c : teljjy_conn_send : iClockCommandSeq=%d iLoopbackCount=%d\n",
+ up->iClockCommandSeq, up->iLoopbackCount ) ;
}
#endif
@@ -3351,8 +3358,18 @@ teljjy_conn_send ( struct peer *peer, struct refclockproc *pp, struct jjyunit *u
if ( teljjy_command_sequence[up->iClockCommandSeq].iExpectedReplyType == TELJJY_REPLY_LOOPBACK ) {
/* Loopback character and timestamp */
- gettimeofday( &(up->sendTime[up->iLoopbackCount]), NULL ) ;
- up->bLoopbackMode = TRUE ;
+ if ( up->iLoopbackCount < MAX_LOOPBACK ) {
+ gettimeofday( &(up->sendTime[up->iLoopbackCount]), NULL ) ;
+ up->bLoopbackMode = TRUE ;
+ } else {
+ /* This else-block is never come. */
+ /* This code avoid wrong report of the coverity static analysis scan tool. */
+ snprintf( sLog, sizeof(sLog)-1, "refclock_jjy.c ; teljjy_conn_send ; iClockCommandSeq=%d iLoopbackCount=%d MAX_LOOPBACK=%d",
+ up->iClockCommandSeq, up->iLoopbackCount, MAX_LOOPBACK ) ;
+ jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_BUG, sLog ) ;
+ msyslog ( LOG_ERR, "%s", sLog ) ;
+ up->bLoopbackMode = FALSE ;
+ }
} else {
/* Regular command */
up->bLoopbackMode = FALSE ;
@@ -4383,6 +4400,9 @@ jjy_write_clockstats ( struct peer *peer, int iMark, const char *pData )
case JJY_CLOCKSTATS_MARK_ERROR :
pMark = "-X- " ;
break ;
+ case JJY_CLOCKSTATS_MARK_BUG :
+ pMark = "!!! " ;
+ break ;
default :
pMark = "" ;
break ;
diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c
index 921c815ce163..d69ce9400e68 100644
--- a/ntpd/refclock_palisade.c
+++ b/ntpd/refclock_palisade.c
@@ -80,10 +80,6 @@ extern int async_write(int, const void *, unsigned int);
#endif
#include "refclock_palisade.h"
-/* Table to get from month to day of the year */
-const int days_of_year [12] = {
- 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
-};
#ifdef DEBUG
const char * Tracking_Status[15][15] = {
@@ -107,7 +103,7 @@ struct refclock refclock_palisade = {
NOFLAGS /* not used */
};
-int day_of_year (char *dt);
+static int decode_date(struct refclockproc *pp, const char *cp);
/* Extract the clock type from the mode setting */
#define CLK_TYPE(x) ((int)(((x)->ttl) & 0x7F))
@@ -226,7 +222,7 @@ init_thunderbolt (
sendetx (&tx, fd);
/* activate packets 0x8F-AB and 0x8F-AC */
- sendsupercmd (&tx, 0x8F, 0xA5);
+ sendsupercmd (&tx, 0x8E, 0xA5);
sendint (&tx, 0x5);
sendetx (&tx, fd);
@@ -400,33 +396,78 @@ palisade_shutdown (
}
-
/*
- * unpack_date - get day and year from date
+ * unpack helpers
*/
-int
-day_of_year (
- char * dt
- )
-{
- int day, mon, year;
- mon = dt[1];
- /* Check month is inside array bounds */
- if ((mon < 1) || (mon > 12))
- return -1;
+static inline uint8_t
+get_u8(
+ const char *cp)
+{
+ return ((const u_char*)cp)[0];
+}
- day = dt[0] + days_of_year[mon - 1];
- year = getint((u_char *) (dt + 2));
+static inline uint16_t
+get_u16(
+ const char *cp)
+{
+ return ((uint16_t)get_u8(cp) << 8) | get_u8(cp + 1);
+}
- if ( !(year % 4) && ((year % 100) ||
- (!(year % 100) && !(year%400)))
- &&(mon > 2))
- day ++; /* leap year and March or later */
+/*
+ * unpack & fix date (the receiver provides a valid time for 1024 weeks
+ * after 1997-12-14 and therefore folds back in 2017, 2037,...)
+ *
+ * Returns -1 on error, day-of-month + (month * 32) othertwise.
+ */
+int
+decode_date(
+ struct refclockproc *pp,
+ const char *cp)
+{
+ static int32_t s_baseday = 0;
+
+ struct calendar jd;
+ int32_t rd;
+
+ if (0 == s_baseday) {
+ if (!ntpcal_get_build_date(&jd)) {
+ jd.year = 2015;
+ jd.month = 1;
+ jd.monthday = 1;
+ }
+ s_baseday = ntpcal_date_to_rd(&jd);
+ }
- return day;
+ /* get date fields and convert to RDN */
+ jd.monthday = get_u8 ( cp );
+ jd.month = get_u8 (cp + 1);
+ jd.year = get_u16(cp + 2);
+ rd = ntpcal_date_to_rd(&jd);
+
+ /* for the paranoid: do reverse calculation and cross-check */
+ ntpcal_rd_to_date(&jd, rd);
+ if ((jd.monthday != get_u8 ( cp )) ||
+ (jd.month != get_u8 (cp + 1)) ||
+ (jd.year != get_u16(cp + 2)) )
+ return - 1;
+
+ /* calculate cycle shift to base day and calculate re-folded
+ * date
+ *
+ * One could do a proper modulo calculation here, but a counting
+ * loop is probably faster for the next few rollovers...
+ */
+ while (rd < s_baseday)
+ rd += 7*1024;
+ ntpcal_rd_to_date(&jd, rd);
+
+ /* fill refclock structure & indicate success */
+ pp->day = jd.yearday;
+ pp->year = jd.year;
+ return ((int)jd.month << 5) | jd.monthday;
}
-
+
/*
* TSIP_decode - decode the TSIP data packets
@@ -441,7 +482,8 @@ TSIP_decode (
double secs;
double secfrac;
unsigned short event = 0;
-
+ int mmday;
+
struct palisade_unit *up;
struct refclockproc *pp;
@@ -535,16 +577,16 @@ TSIP_decode (
pp->minute = secint / 60;
secint %= 60;
pp->second = secint % 60;
-
- if ((pp->day = day_of_year(&mb(11))) < 0) break;
- pp->year = getint((u_char *) &mb(13));
+ mmday = decode_date(pp, &mb(11));
+ if (mmday < 0)
+ break;
#ifdef DEBUG
if (debug > 1)
printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %02d/%02d/%04d UTC %02d\n",
up->unit, mb(0) & 0xff, event, pp->hour, pp->minute,
- pp->second, pp->nsec, mb(12), mb(11), pp->year, GPS_UTC_Offset);
+ pp->second, pp->nsec, (mmday >> 5), (mmday & 31), pp->year, GPS_UTC_Offset);
#endif
/* Only use this packet when no
* 8F-AD's are being received
@@ -584,7 +626,11 @@ TSIP_decode (
break;
}
- up->month = mb(15);
+ mmday = decode_date(pp, &mb(14));
+ if (mmday < 0)
+ break;
+ up->month = (mmday >> 5); /* Save for LEAP check */
+
if ( (up->leap_status & PALISADE_LEAP_PENDING) &&
/* Avoid early announce: https://bugs.ntp.org/2773 */
(6 == up->month || 12 == up->month) ) {
@@ -612,19 +658,15 @@ TSIP_decode (
pp->nsec = (long) (getdbl((u_char *) &mb(3))
* 1000000000);
- if ((pp->day = day_of_year(&mb(14))) < 0)
- break;
- pp->year = getint((u_char *) &mb(16));
pp->hour = mb(11);
pp->minute = mb(12);
pp->second = mb(13);
- up->month = mb(14); /* Save for LEAP check */
#ifdef DEBUG
if (debug > 1)
printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %02d/%02d/%04d UTC %02x %s\n",
up->unit, mb(0) & 0xff, event, pp->hour, pp->minute,
- pp->second, pp->nsec, mb(15), mb(14), pp->year,
+ pp->second, pp->nsec, (mmday >> 5), (mmday & 31), pp->year,
mb(19), *Tracking_Status[st]);
#endif
return 1;
@@ -750,17 +792,17 @@ TSIP_decode (
printf (" Time is from GPS\n\n");
#endif
- if ((pp->day = day_of_year(&mb(13))) < 0)
+ mmday = decode_date(pp, &mb(13));
+ if (mmday < 0)
break;
tow = getlong((u_char *) &mb(1));
#ifdef DEBUG
if (debug > 1) {
printf("pp->day: %d\n", pp->day);
printf("TOW: %ld\n", tow);
- printf("DAY: %d\n", mb(13));
+ printf("DAY: %d\n", (mmday & 31));
}
#endif
- pp->year = getint((u_char *) &mb(15));
pp->hour = mb(12);
pp->minute = mb(11);
pp->second = mb(10);
@@ -768,7 +810,9 @@ TSIP_decode (
#ifdef DEBUG
if (debug > 1)
- printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %02d/%02d/%04d ",up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second, pp->nsec, mb(14), mb(13), pp->year);
+ printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %02d/%02d/%04d ",
+ up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second,
+ pp->nsec, (mmday >> 5), (mmday & 31), pp->year);
#endif
return 1;
break;
diff --git a/ntpd/refclock_parse.c b/ntpd/refclock_parse.c
index cf81e40e6d4c..cfe2a8968886 100644
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -3614,7 +3614,9 @@ parse_control(
}
else
{
- int count = tmpctl.parseformat.parse_count - 1;
+ int count = tmpctl.parseformat.parse_count;
+ if (count)
+ --count;
start = tt = add_var(&out->kv_list, 80, RO|DEF);
tt = ap(start, 80, tt, "refclock_format=\"");
@@ -3780,9 +3782,14 @@ parse_process(
}
else
{
+ unsigned int count = tmpctl.parsegettc.parse_count;
+ if (count)
+ --count;
ERR(ERR_BADDATA)
- msyslog(LOG_WARNING, "PARSE receiver #%d: FAILED TIMECODE: \"%s\" (check receiver configuration / wiring)",
- CLK_UNIT(parse->peer), mkascii(buffer, sizeof buffer, tmpctl.parsegettc.parse_buffer, (unsigned)(tmpctl.parsegettc.parse_count - 1)));
+ msyslog(LOG_WARNING, "PARSE receiver #%d: FAILED TIMECODE: \"%s\" (check receiver configuration / wiring)",
+ CLK_UNIT(parse->peer),
+ mkascii(buffer, sizeof(buffer),
+ tmpctl.parsegettc.parse_buffer, count));
}
/* copy status to show only changes in case of failures */
parse->timedata.parse_status = parsetime->parse_status;