diff options
Diffstat (limited to 'ntpd')
81 files changed, 5618 insertions, 5514 deletions
diff --git a/ntpd/Makefile.in b/ntpd/Makefile.in index a9a338e11f16..8f6d2833180b 100644 --- a/ntpd/Makefile.in +++ b/ntpd/Makefile.in @@ -97,6 +97,7 @@ build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = check_y2k$(EXEEXT) keyword-gen$(EXEEXT) ntpd$(EXEEXT) \ ntpdsim$(EXEEXT) +@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp subdir = ntpd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \ @@ -551,6 +552,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -688,8 +690,8 @@ B_S_DIST = \ $(NULL) BUILT_SOURCES = $(VPHACK) $(LIBPARSE) ntp_parser.c ntp_parser.h \ - $(VPHACK_AFTER) $(B_S_DIST) $(NULL) check-libopts check-libntp \ - .deps-ver + $(VPHACK_AFTER) $(B_S_DIST) $(NULL) check-libopts \ + $(am__append_1) .deps-ver man1_MANS = man5_MANS = ntp.conf.5 ntp.keys.5 man8_MANS = @@ -708,7 +710,7 @@ CLEANFILES = check-psl0 check-psl1 check-psl2 check-pslsaveconfig \ psl0save.conf psl0save.conf+ psl1save.conf psl1save.conf+ \ psl2save.conf psl2save.conf+ .version version.c ntpd-version.c \ sim-version.c $(EXTRA_PROGRAMS) $(NULL) check-libopts \ - check-libntp .deps-ver + .deps-ver EXTRA_DIST = \ complete.conf.in \ invoke-ntp.conf.menu \ @@ -2124,18 +2126,16 @@ check-libopts: ../sntp/libopts/libopts.la ../sntp/libopts/libopts.la: -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la -check-libntp: $(top_builddir)/libntp/libntp.a - @: avoid default SCCS get by some make implementations +.PHONY: check-libntp -$(top_builddir)/libntp/libntp.a: - cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a +@LIBNTP_SUBMAKES_TRUE@check-libntp: +@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a $(top_srcdir)/sntp/scm-rev: FRC.scm-rev $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev +.PHONY: FRC.scm-rev FRC.scm-rev: - @: FRC.scm-rev "force" depends on nothing and is not a file, so is \ - always out-of-date causing targets which depend on it to also \ - be outdated so their rules to fire each time they are built. + @: FRC.scm-rev is always out of date, triggering the check every make invocation. $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver @[ -f $@ ] || \ cp $(top_srcdir)/deps-ver $@ diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c index aa461cb4dbe6..a604feb00b54 100644 --- a/ntpd/cmd_args.c +++ b/ntpd/cmd_args.c @@ -178,16 +178,14 @@ getCmdOpts( if (HAVE_OPT( UPDATEINTERVAL )) { long val = OPT_VALUE_UPDATEINTERVAL; - - if (val >= 0) - interface_interval = val; - else { - fprintf(stderr, - "command line interface update interval %ld must not be negative\n", - val); - msyslog(LOG_ERR, - "command line interface update interval %ld must not be negative", - val); + const char errfmt[] = + "-U/--updateinterval %ld must be >= 0\n"; + + if (val >= 0) { + endpt_scan_period = val; + } else { + fprintf(stderr, errfmt, val); + msyslog(LOG_ERR, errfmt, val); errflg++; } } diff --git a/ntpd/complete.conf.in b/ntpd/complete.conf.in index 77b619773fbf..adda4e4fa921 100644 --- a/ntpd/complete.conf.in +++ b/ntpd/complete.conf.in @@ -33,40 +33,45 @@ tinker allan 1500 dispersion 15 freq 0 huffpuff 7200 panic 1000 step 0.128 stepo broadcastclient server 127.127.1.0 mode 4294967295 prefer true fudge 127.127.1.0 time1 0 time2 1.1 stratum 7 refid Abcd minjitter 0.2 -pool 0.north-america.pool.ntp.org. iburst preempt -server 1.north-america.pool.ntp.org. iburst -server -4 2.north-america.pool.ntp.org. minpoll 6 maxpoll 10 iburst -server -6 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst -peer -6 davehart.broker.freenet6.net. ident "autokey-group" xleave autokey -peer -4 192.168.192.168 key 1 noselect +pool 2.ubuntu.pool.ntp.org. iburst preempt +pool 2.freebsd.pool.ntp.org. iburst +server -6 2.debian.pool.ntp.org. minpoll 6 maxpoll 10 iburst +server -4 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst +peer -6 ntp.md. ident "autokey-group" xleave autokey +peer -4 198.51.100.123 key 1 noselect server [fe80::123%1] xmtnonce -broadcast 192.168.192.255 -manycastclient 224.0.1.1 -manycastclient ff05::101 +broadcast 192.0.2.255 +manycastclient 224.0.1.1 key 14 iburst +manycastclient ff05::101 maxpoll 6 key 1 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 pollskewlist 3 1|2 4 3|4 default 6|7 -restrict default ippeerlimit -1 -restrict default ippeerlimit 0 nomodify limited kod noserve nomrulist +restrict default +restrict default ippeerlimit 0 nomodify limited kod nopeer 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 127.0.0.2 ippeerlimit -1 serverresponse fuzz -restrict ::1 ippeerlimit -1 +restrict trusted.host.name.example.com. nomodify +delrestrict trusted.host.name.example.com. +restrict 192.0.2.66 epeer flake lowpriotrap mssntp noepeer noquery notrap notrust ntpport version +delrestrict source 192.0.2.123 +delrestrict source [2001:db8::123] +restrict fe80::1 +restrict 127.0.0.1 +restrict ::1 +restrict 198.51.100.123 serverresponse fuzz +restrict fec0:: mask [ffff::] ignore interface drop ipv6 interface ignore ipv4 interface drop wildcard interface listen eth0 interface listen ipv6 -interface listen 192.168.192.0/24 -interface listen 192.168.193.1 +interface listen 203.0.113.0/24 +interface listen 192.0.2.123 phone "ATDT13034944774" "ATDT12027621594" setvar varnondef = "this variable does not have default after the value" setvar vanity = "name plate" default trap 127.0.0.1 interface 127.0.0.1 port 1234 -trap 127.0.0.2 +trap 192.0.2.2 reset allpeers auth ctl io mem sys timer diff --git a/ntpd/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi index 86a039ea6f49..1f232a313f57 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 June 6, 2023 at 04:37:38 AM by AutoGen 5.18.16 +# It has been AutoGen-ed May 25, 2024 at 12:03:56 AM by AutoGen 5.18.16 # From the definitions ntp.conf.def # and the template file agtexi-file.tpl @end ignore @@ -251,27 +251,15 @@ include authentication fields encrypted using the autokey scheme described in @ref{Authentication Options}. @item @code{burst} -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -@code{calldelay} -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the @code{server} command and s addresses. @item @code{iburst} When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -@code{calldelay} -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the @code{server} @@ -833,7 +821,7 @@ The argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,535, inclusive. -@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{sign} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]} +@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]} This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature @@ -890,14 +878,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -@item @code{sign} @kbd{file} -Specifies the location of the optional sign key file. -This overrides -the link -@file{ntpkey_sign_}@kbd{hostname} -in the keys directory. -If this file is -not found, the host key is also the sign key. @end table @item @code{keys} @kbd{keyfile} Specifies the complete path and location of the MD5 key file @@ -1477,25 +1457,26 @@ by default the probability of replacing it with an entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. -@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]} +@item @code{restrict} @kbd{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]} The @kbd{address} argument expressed in -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the @kbd{address} -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +@kbd{mask} +is ignored and an individual host mask is +used for each entry. The @kbd{mask} -argument expressed in dotted-quad form defaults to -@code{255.255.255.255}, -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the @kbd{address} is treated as the address of an individual host. -A default entry (address -@code{0.0.0.0}, -mask -@code{0.0.0.0}) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string @code{default}, @@ -1532,12 +1513,12 @@ and @code{ntpdc(1ntpdcmdoc)} queries. @item @code{kod} -If this flag is set when an access violation occurs, a kiss-o'-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss-o'-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +@code{discard} @code{average} +defaulting to 8s. Otherwise, no response is sent. @item @code{limited} Deny service if the packet spacing violates the lower limits specified in the @@ -1627,15 +1608,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies @code{ntpport} -and -@code{non-ntpport} -may -be specified. +and the other does not. The @code{ntpport} -is considered more specific and +entry is considered more specific and is sorted later in the list. @item @code{serverresponse fuzz} When reponding to server requests, @@ -1647,12 +1626,28 @@ Deny packets that do not match the current NTP version. Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +@code{manycastclient} +when +@code{manycast} +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +@item @code{delrestrict} @code{[source]} @kbd{address} +Remove a previously-set restriction. This is useful for +runtime configuration via +@code{ntpq(1ntpqmdoc)} +. If +@code{source} +is specified, a dynamic restriction created from the +@code{restrict} @code{source} +template at the time +an association was added is removed. Without +@code{source} +a static restriction is removed. @end table @node Automatic NTP Configuration Options @subsection Automatic NTP Configuration Options @@ -2357,10 +2352,6 @@ Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. -@item @code{calldelay} @kbd{delay} -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. @item @code{driftfile} @kbd{driftfile} This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi index 3926518de3a2..189829f8516d 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 June 6, 2023 at 04:37:41 AM by AutoGen 5.18.16 +# It has been AutoGen-ed May 25, 2024 at 12:03:59 AM by AutoGen 5.18.16 # From the definitions ntp.keys.def # and the template file agtexi-file.tpl @end ignore diff --git a/ntpd/invoke-ntpd.texi b/ntpd/invoke-ntpd.texi index 471bca5b86c8..ae05d92be524 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 June 6, 2023 at 04:37:42 AM by AutoGen 5.18.16 +# It has been AutoGen-ed May 25, 2024 at 12:04:00 AM by AutoGen 5.18.16 # 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.8p17 +ntpd - NTP daemon program - Ver. 4.2.8p18 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 0eb94005b839..60bc132ce064 100644 --- a/ntpd/keyword-gen-utd +++ b/ntpd/keyword-gen-utd @@ -1 +1 @@ - * Generated 2022-03-27 14:17:11 UTC diff_ignore_line + * Generated 2023-09-25 05:34:02 UTC diff_ignore_line diff --git a/ntpd/keyword-gen.c b/ntpd/keyword-gen.c index 104d95e8b3e1..014227a2ba08 100644 --- a/ntpd/keyword-gen.c +++ b/ntpd/keyword-gen.c @@ -23,7 +23,6 @@ #include <ntp_stdlib.h> #include <ntp_config.h> -#include <lib_strbuf.h> #include "ntp_scanner.h" #include "ntp_parser.h" @@ -45,6 +44,7 @@ struct key_tok ntp_keywords[] = { { "broadcastdelay", T_Broadcastdelay, FOLLBY_TOKEN }, { "checkhash", T_Checkhash, FOLLBY_TOKEN }, { "ctl", T_Ctl, FOLLBY_TOKEN }, +{ "delrestrict", T_Delrestrict, FOLLBY_TOKEN }, { "device", T_Device, FOLLBY_STRING }, { "disable", T_Disable, FOLLBY_TOKEN }, { "driftfile", T_Driftfile, FOLLBY_STRING }, diff --git a/ntpd/ntp.conf.5man b/ntpd/ntp.conf.5man index 4e7a47ab83ef..d5a82190c0b0 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 "06 Jun 2023" "4.2.8p17" "File Formats" +.TH ntp.conf 5man "25 May 2024" "4.2.8p18" "File Formats" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:45 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:04:03 AM by AutoGen 5.18.16 .\" From the definitions ntp.conf.def .\" and the template file agman-cmd.tpl .SH NAME @@ -291,28 +291,16 @@ described in \fIAuthentication\f[] \fIOptions\f[]. .TP 7 .NOP \f\*[B-Font]burst\f[] -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -\f\*[B-Font]calldelay\f[] -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the \f\*[B-Font]server\f[] command and s addresses. .TP 7 .NOP \f\*[B-Font]iburst\f[] When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -\f\*[B-Font]calldelay\f[] -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the \f\*[B-Font]server\f[] @@ -938,7 +926,7 @@ argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,535, inclusive. .TP 7 -.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] +.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature @@ -1003,15 +991,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.TP 7 -.NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[] -Specifies the location of the optional sign key file. -This overrides -the link -\fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[] -in the keys directory. -If this file is -not found, the host key is also the sign key. .RE .TP 7 .NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[] @@ -1679,25 +1658,26 @@ entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. .TP 7 -.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[]] +.NOP \f\*[B-Font]restrict\f[] \f\*[I-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 -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the \f\*[I-Font]address\f[] -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +\f\*[I-Font]mask\f[] +is ignored and an individual host mask is +used for each entry. The \f\*[I-Font]mask\f[] -argument expressed in dotted-quad form defaults to -\f\*[B-Font]255.255.255.255\f[], -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the \f\*[I-Font]address\f[] is treated as the address of an individual host. -A default entry (address -\f\*[B-Font]0.0.0.0\f[], -mask -\f\*[B-Font]0.0.0.0\f[]) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string \f\*[B-Font]default\f[], @@ -1736,12 +1716,12 @@ and queries. .TP 7 .NOP \f\*[B-Font]kod\f[] -If this flag is set when an access violation occurs, a kiss-o'-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss-o'-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +\f\*[B-Font]discard\f[] \f\*[B-Font]average\f[] +defaulting to 8s. Otherwise, no response is sent. .TP 7 .NOP \f\*[B-Font]limited\f[] Deny service if the packet spacing violates the lower limits specified @@ -1841,15 +1821,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies \f\*[B-Font]ntpport\f[] -and -\f\*[B-Font]non-ntpport\f[] -may -be specified. +and the other does not. The \f\*[B-Font]ntpport\f[] -is considered more specific and +entry is considered more specific and is sorted later in the list. .TP 7 .NOP \f\*[B-Font]serverresponse fuzz\f[] @@ -1865,12 +1843,29 @@ Deny packets that do not match the current NTP version. Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +\f\*[B-Font]manycastclient\f[] +when +\f\*[B-Font]manycast\f[] +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.TP 7 +.NOP \f\*[B-Font]delrestrict\f[] [source] \f\*[I-Font]address\f[] +Remove a previously-set restriction. This is useful for +runtime configuration via +\fCntpq\f[]\fR(1ntpqmdoc)\f[] +. If +\f\*[B-Font]source\f[] +is specified, a dynamic restriction created from the +\f\*[B-Font]restrict\f[] \f\*[B-Font]source\f[] +template at the time +an association was added is removed. Without +\f\*[B-Font]source\f[] +a static restriction is removed. .PP .SH Automatic NTP Configuration Options .SS Manycasting @@ -2635,11 +2630,6 @@ number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. .TP 7 -.NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[] -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. -.TP 7 .NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[] This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. @@ -3461,7 +3451,7 @@ RFC5905 .SH "AUTHORS" The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH BUGS The syntax checking is not picky; some combinations of diff --git a/ntpd/ntp.conf.5mdoc b/ntpd/ntp.conf.5mdoc index 951f33da4faa..b950e92cdeb9 100644 --- a/ntpd/ntp.conf.5mdoc +++ b/ntpd/ntp.conf.5mdoc @@ -1,9 +1,9 @@ -.Dd June 6 2023 +.Dd May 25 2024 .Dt NTP_CONF 5mdoc File Formats .Os .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:32 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:03:50 AM by AutoGen 5.18.16 .\" From the definitions ntp.conf.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -294,27 +294,15 @@ include authentication fields encrypted using the autokey scheme described in .Sx Authentication Options . .It Cm burst -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the .Ic server command and s addresses. .It Cm iburst When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the .Ic server @@ -889,7 +877,6 @@ range 1 to 65,535, inclusive. .Op Cm leap Ar file .Op Cm randfile Ar file .Op Cm host Ar file -.Op Cm sign Ar file .Op Cm gq Ar file .Op Cm gqpar Ar file .Op Cm iffpar Ar file @@ -952,14 +939,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.It Cm sign Ar file -Specifies the location of the optional sign key file. -This overrides -the link -.Pa ntpkey_sign_ Ns Ar hostname -in the keys directory. -If this file is -not found, the host key is also the sign key. .El .It Ic keys Ar keyfile Specifies the complete path and location of the MD5 key file @@ -1546,7 +1525,8 @@ by default the probability of replacing it with an entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. -.It Xo Ic restrict address +.It Xo Ic restrict +.Ar address .Op Cm mask Ar mask .Op Cm ippeerlimit Ar int .Op Ar flag ... @@ -1554,21 +1534,22 @@ than 3000 seconds old, the probability is 100%. The .Ar address argument expressed in -dotted\-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the .Ar address -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +.Ar mask +is ignored and an individual host mask is +used for each entry. The .Ar mask -argument expressed in dotted\-quad form defaults to -.Cm 255.255.255.255 , -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the .Ar address is treated as the address of an individual host. -A default entry (address -.Cm 0.0.0.0 , -mask -.Cm 0.0.0.0 ) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string .Cm default , @@ -1605,12 +1586,12 @@ and .Xr ntpdc 1ntpdcmdoc queries. .It Cm kod -If this flag is set when an access violation occurs, a kiss\-o'\-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss\-o'\-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +.Cm discard average +defaulting to 8s. Otherwise, no response is sent. .It Cm limited Deny service if the packet spacing violates the lower limits specified in the @@ -1700,15 +1681,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies .Cm ntpport -and -.Cm non\-ntpport -may -be specified. +and the other does not. The .Cm ntpport -is considered more specific and +entry is considered more specific and is sorted later in the list. .It Ic "serverresponse fuzz" When reponding to server requests, @@ -1720,12 +1699,31 @@ Deny packets that do not match the current NTP version. .Pp Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +.Cm manycastclient +when +.Cm manycast +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.It Xo Ic delrestrict +.Op source +.Ar address +.Xc +Remove a previously\-set restriction. This is useful for +runtime configuration via +.Xr ntpq 1ntpqmdoc +. If +.Cm source +is specified, a dynamic restriction created from the +.Cm restrict source +template at the time +an association was added is removed. Without +.Cm source +a static restriction is removed. .El .Sh Automatic NTP Configuration Options .Ss Manycasting @@ -2462,10 +2460,6 @@ Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. -.It Ic calldelay Ar delay -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. .It Ic driftfile Ar driftfile This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. @@ -3302,7 +3296,7 @@ A snapshot of this documentation is available in HTML format in .Sh "AUTHORS" The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh BUGS The syntax checking is not picky; some combinations of diff --git a/ntpd/ntp.conf.def b/ntpd/ntp.conf.def index 03dd8b808099..444e3b35e351 100644 --- a/ntpd/ntp.conf.def +++ b/ntpd/ntp.conf.def @@ -296,27 +296,15 @@ include authentication fields encrypted using the autokey scheme described in .Sx Authentication Options . .It Cm burst -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the .Ic server command and s addresses. .It Cm iburst When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the .Ic server @@ -892,7 +880,6 @@ range 1 to 65,535, inclusive. .Op Cm leap Ar file .Op Cm randfile Ar file .Op Cm host Ar file -.Op Cm sign Ar file .Op Cm gq Ar file .Op Cm gqpar Ar file .Op Cm iffpar Ar file @@ -955,14 +942,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.It Cm sign Ar file -Specifies the location of the optional sign key file. -This overrides -the link -.Pa ntpkey_sign_ Ns Ar hostname -in the keys directory. -If this file is -not found, the host key is also the sign key. .El .It Ic keys Ar keyfile Specifies the complete path and location of the MD5 key file @@ -1549,7 +1528,8 @@ by default the probability of replacing it with an entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. -.It Xo Ic restrict address +.It Xo Ic restrict +.Ar address .Op Cm mask Ar mask .Op Cm ippeerlimit Ar int .Op Ar flag ... @@ -1557,21 +1537,22 @@ than 3000 seconds old, the probability is 100%. The .Ar address argument expressed in -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the .Ar address -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +.Ar mask +is ignored and an individual host mask is +used for each entry. The .Ar mask -argument expressed in dotted-quad form defaults to -.Cm 255.255.255.255 , -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the .Ar address is treated as the address of an individual host. -A default entry (address -.Cm 0.0.0.0 , -mask -.Cm 0.0.0.0 ) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string .Cm default , @@ -1608,12 +1589,12 @@ and .Xr ntpdc 1ntpdcmdoc queries. .It Cm kod -If this flag is set when an access violation occurs, a kiss-o'-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss-o'-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +.Cm discard average +defaulting to 8s. Otherwise, no response is sent. .It Cm limited Deny service if the packet spacing violates the lower limits specified in the @@ -1703,15 +1684,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies .Cm ntpport -and -.Cm non-ntpport -may -be specified. +and the other does not. The .Cm ntpport -is considered more specific and +entry is considered more specific and is sorted later in the list. .It Ic "serverresponse fuzz" When reponding to server requests, @@ -1723,12 +1702,31 @@ Deny packets that do not match the current NTP version. .Pp Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +.Cm manycastclient +when +.Cm manycast +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.It Xo Ic delrestrict +.Op source +.Ar address +.Xc +Remove a previously-set restriction. This is useful for +runtime configuration via +.Xr ntpq 1ntpqmdoc +. If +.Cm source +is specified, a dynamic restriction created from the +.Cm restrict source +template at the time +an association was added is removed. Without +.Cm source +a static restriction is removed. .El .Sh Automatic NTP Configuration Options .Ss Manycasting @@ -2465,10 +2463,6 @@ Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. -.It Ic calldelay Ar delay -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. .It Ic driftfile Ar driftfile This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html index f7f0b4bef931..ea82c6783a4b 100644 --- a/ntpd/ntp.conf.html +++ b/ntpd/ntp.conf.html @@ -50,7 +50,7 @@ Next: <a href="#ntp_002econf-Description" accesskey="n" rel="next">ntp.conf Desc <p>This document describes the configuration file for the NTP Project’s <code>ntpd</code> program. </p> -<p>This document applies to version 4.2.8p17 of <code>ntp.conf</code>. +<p>This document applies to version 4.2.8p18 of <code>ntp.conf</code>. </p> <span id="SEC_Overview"></span> <h2 class="shortcontents-heading">Short Table of Contents</h2> @@ -362,28 +362,16 @@ described in ‘Authentication Options’. </p></dd> <dt><code>burst</code></dt> -<dd><p>when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -<code>calldelay</code> -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +<dd><p>when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the <code>server</code> command and s addresses. </p></dd> <dt><code>iburst</code></dt> <dd><p>When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -<code>calldelay</code> -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the <code>server</code> @@ -966,7 +954,7 @@ argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,535, inclusive. </p></dd> -<dt><code>crypto</code> <code>[<code>cert</code> <kbd>file</kbd>]</code> <code>[<code>leap</code> <kbd>file</kbd>]</code> <code>[<code>randfile</code> <kbd>file</kbd>]</code> <code>[<code>host</code> <kbd>file</kbd>]</code> <code>[<code>sign</code> <kbd>file</kbd>]</code> <code>[<code>gq</code> <kbd>file</kbd>]</code> <code>[<code>gqpar</code> <kbd>file</kbd>]</code> <code>[<code>iffpar</code> <kbd>file</kbd>]</code> <code>[<code>mvpar</code> <kbd>file</kbd>]</code> <code>[<code>pw</code> <kbd>password</kbd>]</code></dt> +<dt><code>crypto</code> <code>[<code>cert</code> <kbd>file</kbd>]</code> <code>[<code>leap</code> <kbd>file</kbd>]</code> <code>[<code>randfile</code> <kbd>file</kbd>]</code> <code>[<code>host</code> <kbd>file</kbd>]</code> <code>[<code>gq</code> <kbd>file</kbd>]</code> <code>[<code>gqpar</code> <kbd>file</kbd>]</code> <code>[<code>iffpar</code> <kbd>file</kbd>]</code> <code>[<code>mvpar</code> <kbd>file</kbd>]</code> <code>[<code>pw</code> <kbd>password</kbd>]</code></dt> <dd><p>This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature @@ -1031,15 +1019,6 @@ encrypted. library. The defaults are described in the main text above. </p></dd> -<dt><code>sign</code> <kbd>file</kbd></dt> -<dd><p>Specifies the location of the optional sign key file. -This overrides -the link -<samp>ntpkey_sign_</samp><kbd>hostname</kbd> -in the keys directory. -If this file is -not found, the host key is also the sign key. -</p></dd> </dl> </dd> <dt><code>keys</code> <kbd>keyfile</kbd></dt> @@ -1670,25 +1649,26 @@ entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. </p></dd> -<dt><code>restrict</code> <code>address</code> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt> +<dt><code>restrict</code> <kbd>address</kbd> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt> <dd><p>The <kbd>address</kbd> argument expressed in -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the <kbd>address</kbd> -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +<kbd>mask</kbd> +is ignored and an individual host mask is +used for each entry. The <kbd>mask</kbd> -argument expressed in dotted-quad form defaults to -<code>255.255.255.255</code>, -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the <kbd>address</kbd> is treated as the address of an individual host. -A default entry (address -<code>0.0.0.0</code>, -mask -<code>0.0.0.0</code>) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string <code>default</code>, @@ -1726,12 +1706,12 @@ and queries. </p></dd> <dt><code>kod</code></dt> -<dd><p>If this flag is set when an access violation occurs, a kiss-o’-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +<dd><p>If this flag is set when a rate violation occurs, a kiss-o’-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +<code>discard</code> <code>average</code> +defaulting to 8s. Otherwise, no response is sent. </p></dd> <dt><code>limited</code></dt> <dd><p>Deny service if the packet spacing violates the lower limits specified @@ -1831,15 +1811,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies <code>ntpport</code> -and -<code>non-ntpport</code> -may -be specified. +and the other does not. The <code>ntpport</code> -is considered more specific and +entry is considered more specific and is sorted later in the list. </p></dd> <dt><code>serverresponse fuzz</code></dt> @@ -1854,13 +1832,30 @@ fuzz the low order bits of the <p>Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host’s interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +<code>manycastclient</code> +when +<code>manycast</code> +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). </p></dd> +<dt><code>delrestrict</code> <code>[source]</code> <kbd>address</kbd></dt> +<dd><p>Remove a previously-set restriction. This is useful for +runtime configuration via +<code>ntpq(1ntpqmdoc)</code> +. If +<code>source</code> +is specified, a dynamic restriction created from the +<code>restrict</code> <code>source</code> +template at the time +an association was added is removed. Without +<code>source</code> +a static restriction is removed. +</p></dd> </dl> <hr> <span id="Automatic-NTP-Configuration-Options"></span><div class="header"> @@ -2597,11 +2592,6 @@ number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. </p></dd> -<dt><code>calldelay</code> <kbd>delay</kbd></dt> -<dd><p>This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. -</p></dd> <dt><code>driftfile</code> <kbd>driftfile</kbd></dt> <dd><p>This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in index 0c56ee503df6..175fcb8ab314 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 "06 Jun 2023" "4.2.8p17" "File Formats" +.TH ntp.conf 5 "25 May 2024" "4.2.8p18" "File Formats" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:45 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:04:03 AM by AutoGen 5.18.16 .\" From the definitions ntp.conf.def .\" and the template file agman-cmd.tpl .SH NAME @@ -291,28 +291,16 @@ described in \fIAuthentication\f[] \fIOptions\f[]. .TP 7 .NOP \f\*[B-Font]burst\f[] -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -\f\*[B-Font]calldelay\f[] -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the \f\*[B-Font]server\f[] command and s addresses. .TP 7 .NOP \f\*[B-Font]iburst\f[] When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -\f\*[B-Font]calldelay\f[] -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the \f\*[B-Font]server\f[] @@ -938,7 +926,7 @@ argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,535, inclusive. .TP 7 -.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] +.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature @@ -1003,15 +991,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.TP 7 -.NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[] -Specifies the location of the optional sign key file. -This overrides -the link -\fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[] -in the keys directory. -If this file is -not found, the host key is also the sign key. .RE .TP 7 .NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[] @@ -1679,25 +1658,26 @@ entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. .TP 7 -.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[]] +.NOP \f\*[B-Font]restrict\f[] \f\*[I-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 -dotted-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the \f\*[I-Font]address\f[] -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +\f\*[I-Font]mask\f[] +is ignored and an individual host mask is +used for each entry. The \f\*[I-Font]mask\f[] -argument expressed in dotted-quad form defaults to -\f\*[B-Font]255.255.255.255\f[], -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the \f\*[I-Font]address\f[] is treated as the address of an individual host. -A default entry (address -\f\*[B-Font]0.0.0.0\f[], -mask -\f\*[B-Font]0.0.0.0\f[]) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string \f\*[B-Font]default\f[], @@ -1736,12 +1716,12 @@ and queries. .TP 7 .NOP \f\*[B-Font]kod\f[] -If this flag is set when an access violation occurs, a kiss-o'-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss-o'-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +\f\*[B-Font]discard\f[] \f\*[B-Font]average\f[] +defaulting to 8s. Otherwise, no response is sent. .TP 7 .NOP \f\*[B-Font]limited\f[] Deny service if the packet spacing violates the lower limits specified @@ -1841,15 +1821,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies \f\*[B-Font]ntpport\f[] -and -\f\*[B-Font]non-ntpport\f[] -may -be specified. +and the other does not. The \f\*[B-Font]ntpport\f[] -is considered more specific and +entry is considered more specific and is sorted later in the list. .TP 7 .NOP \f\*[B-Font]serverresponse fuzz\f[] @@ -1865,12 +1843,29 @@ Deny packets that do not match the current NTP version. Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +\f\*[B-Font]manycastclient\f[] +when +\f\*[B-Font]manycast\f[] +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.TP 7 +.NOP \f\*[B-Font]delrestrict\f[] [source] \f\*[I-Font]address\f[] +Remove a previously-set restriction. This is useful for +runtime configuration via +\fCntpq\f[]\fR(@NTPQ_MS@)\f[] +. If +\f\*[B-Font]source\f[] +is specified, a dynamic restriction created from the +\f\*[B-Font]restrict\f[] \f\*[B-Font]source\f[] +template at the time +an association was added is removed. Without +\f\*[B-Font]source\f[] +a static restriction is removed. .PP .SH Automatic NTP Configuration Options .SS Manycasting @@ -2635,11 +2630,6 @@ number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. .TP 7 -.NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[] -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. -.TP 7 .NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[] This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. @@ -3461,7 +3451,7 @@ RFC5905 .SH "AUTHORS" The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH BUGS The syntax checking is not picky; some combinations of diff --git a/ntpd/ntp.conf.mdoc.in b/ntpd/ntp.conf.mdoc.in index 22348ee727d0..70f9080257a2 100644 --- a/ntpd/ntp.conf.mdoc.in +++ b/ntpd/ntp.conf.mdoc.in @@ -1,9 +1,9 @@ -.Dd June 6 2023 +.Dd May 25 2024 .Dt NTP_CONF 5 File Formats .Os .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:32 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:03:50 AM by AutoGen 5.18.16 .\" From the definitions ntp.conf.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -294,27 +294,15 @@ include authentication fields encrypted using the autokey scheme described in .Sx Authentication Options . .It Cm burst -when the server is reachable, send a burst of eight packets -instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first and second packets -can be changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. -This is designed to improve timekeeping quality -with the +when the server is reachable, send a burst of six packets +instead of the usual one. The packet spacing is 2 s. +This is designed to improve timekeeping quality with the .Ic server command and s addresses. .It Cm iburst When the server is unreachable, send a burst of eight packets instead of the usual one. -The packet spacing is normally 2 s; -however, the spacing between the first two packets can be -changed with the -.Ic calldelay -command to allow -additional time for a modem or ISDN call to complete. +The packet spacing is 2 s. This is designed to speed the initial synchronization acquisition with the .Ic server @@ -889,7 +877,6 @@ range 1 to 65,535, inclusive. .Op Cm leap Ar file .Op Cm randfile Ar file .Op Cm host Ar file -.Op Cm sign Ar file .Op Cm gq Ar file .Op Cm gqpar Ar file .Op Cm iffpar Ar file @@ -952,14 +939,6 @@ encrypted. Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above. -.It Cm sign Ar file -Specifies the location of the optional sign key file. -This overrides -the link -.Pa ntpkey_sign_ Ns Ar hostname -in the keys directory. -If this file is -not found, the host key is also the sign key. .El .It Ic keys Ar keyfile Specifies the complete path and location of the MD5 key file @@ -1546,7 +1525,8 @@ by default the probability of replacing it with an entry representing the client request being processed now is 10%. Conversely, if the oldest entry is more than 3000 seconds old, the probability is 100%. -.It Xo Ic restrict address +.It Xo Ic restrict +.Ar address .Op Cm mask Ar mask .Op Cm ippeerlimit Ar int .Op Ar flag ... @@ -1554,21 +1534,22 @@ than 3000 seconds old, the probability is 100%. The .Ar address argument expressed in -dotted\-quad form is the address of a host or network. +numeric form is the address of a host or network. Alternatively, the .Ar address -argument can be a valid host DNS name. +argument can be a valid hostname. When a hostname +is provided, a restriction entry is created for each +address the hostname resolves to, and any provided +.Ar mask +is ignored and an individual host mask is +used for each entry. The .Ar mask -argument expressed in dotted\-quad form defaults to -.Cm 255.255.255.255 , -meaning that the +argument expressed in numeric form defaults to +all bits lit, meaning that the .Ar address is treated as the address of an individual host. -A default entry (address -.Cm 0.0.0.0 , -mask -.Cm 0.0.0.0 ) +A default entry with address and mask all zeroes is always included and is always the first entry in the list. Note that text string .Cm default , @@ -1605,12 +1586,12 @@ and .Xr ntpdc @NTPDC_MS@ queries. .It Cm kod -If this flag is set when an access violation occurs, a kiss\-o'\-death -(KoD) packet is sent. -KoD packets are rate limited to no more than one -per second. -If another KoD packet occurs within one second after the -last one, the packet is dropped. +If this flag is set when a rate violation occurs, a kiss\-o'\-death +(KoD) packet is sometimes sent. +KoD packets are rate limited to no more than one per minimum +average interpacket spacing, set by +.Cm discard average +defaulting to 8s. Otherwise, no response is sent. .It Cm limited Deny service if the packet spacing violates the lower limits specified in the @@ -1700,15 +1681,13 @@ restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). -Both +There can be two restriction entries with the same IP address if +one specifies .Cm ntpport -and -.Cm non\-ntpport -may -be specified. +and the other does not. The .Cm ntpport -is considered more specific and +entry is considered more specific and is sorted later in the list. .It Ic "serverresponse fuzz" When reponding to server requests, @@ -1720,12 +1699,31 @@ Deny packets that do not match the current NTP version. .Pp Default restriction list entries with the flags ignore, interface, ntpport, for each of the local host's interface addresses are -inserted into the table at startup to prevent the server -from attempting to synchronize to its own time. +inserted into the table at startup to prevent ntpd +from attempting to synchronize to itself, such as with +.Cm manycastclient +when +.Cm manycast +is also specified with the same multicast address. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted). +.It Xo Ic delrestrict +.Op source +.Ar address +.Xc +Remove a previously\-set restriction. This is useful for +runtime configuration via +.Xr ntpq @NTPQ_MS@ +. If +.Cm source +is specified, a dynamic restriction created from the +.Cm restrict source +template at the time +an association was added is removed. Without +.Cm source +a static restriction is removed. .El .Sh Automatic NTP Configuration Options .Ss Manycasting @@ -2462,10 +2460,6 @@ Typically (for Ethernet), a number between 0.003 and 0.007 seconds is appropriate. The default when this command is not used is 0.004 seconds. -.It Ic calldelay Ar delay -This option controls the delay in seconds between the first and second -packets sent in burst or iburst mode to allow additional time for a modem -or ISDN call to complete. .It Ic driftfile Ar driftfile This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. @@ -3302,7 +3296,7 @@ A snapshot of this documentation is available in HTML format in .Sh "AUTHORS" The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh BUGS The syntax checking is not picky; some combinations of diff --git a/ntpd/ntp.keys.5man b/ntpd/ntp.keys.5man index 24dbfcf034a9..0b83cc6187e5 100644 --- a/ntpd/ntp.keys.5man +++ b/ntpd/ntp.keys.5man @@ -1,8 +1,8 @@ -.TH ntp.keys 5man "06 Jun 2023" "4.2.8p17" "File Formats" +.TH ntp.keys 5man "25 May 2024" "4.2.8p18" "File Formats" .\" .\" EDIT THIS FILE WITH CAUTION (ntp.man) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:47 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:04:05 AM by AutoGen 5.18.16 .\" From the definitions ntp.keys.def .\" and the template file agman-file.tpl .Sh NAME @@ -176,7 +176,7 @@ the default name of the configuration file .SH "AUTHORS" The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH "BUGS" Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org diff --git a/ntpd/ntp.keys.5mdoc b/ntpd/ntp.keys.5mdoc index 100320fd2330..e51bd72d47b2 100644 --- a/ntpd/ntp.keys.5mdoc +++ b/ntpd/ntp.keys.5mdoc @@ -1,9 +1,9 @@ -.Dd June 6 2023 +.Dd May 25 2024 .Dt NTP_KEYS 5mdoc File Formats .Os FreeBSD 12.1-RELEASE_SI .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:34 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:03:52 AM by AutoGen 5.18.16 .\" From the definitions ntp.keys.def .\" and the template file agmdoc-file.tpl .Sh NAME @@ -163,7 +163,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you. .Sh "AUTHORS" The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh "BUGS" Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org diff --git a/ntpd/ntp.keys.html b/ntpd/ntp.keys.html index 2d53d91f4d40..9aaef4afc73c 100644 --- a/ntpd/ntp.keys.html +++ b/ntpd/ntp.keys.html @@ -50,7 +50,7 @@ Next: <a href="#ntp_002ekeys-Description" accesskey="n" rel="next">ntp.keys Desc <p>This document describes the symmetric key file for the NTP Project’s <code>ntpd</code> program. </p> -<p>This document applies to version 4.2.8p17 of <code>ntp.keys</code>. +<p>This document applies to version 4.2.8p18 of <code>ntp.keys</code>. </p> <span id="SEC_Overview"></span> <h2 class="shortcontents-heading">Short Table of Contents</h2> diff --git a/ntpd/ntp.keys.man.in b/ntpd/ntp.keys.man.in index c646bb11e776..8d4a6a598fe8 100644 --- a/ntpd/ntp.keys.man.in +++ b/ntpd/ntp.keys.man.in @@ -1,8 +1,8 @@ -.TH ntp.keys 5 "06 Jun 2023" "4.2.8p17" "File Formats" +.TH ntp.keys 5 "25 May 2024" "4.2.8p18" "File Formats" .\" .\" EDIT THIS FILE WITH CAUTION (ntp.man) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:47 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:04:05 AM by AutoGen 5.18.16 .\" From the definitions ntp.keys.def .\" and the template file agman-file.tpl .Sh NAME @@ -176,7 +176,7 @@ the default name of the configuration file .SH "AUTHORS" The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH "BUGS" Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org diff --git a/ntpd/ntp.keys.mdoc.in b/ntpd/ntp.keys.mdoc.in index fdeaeba4c938..2506b51e422c 100644 --- a/ntpd/ntp.keys.mdoc.in +++ b/ntpd/ntp.keys.mdoc.in @@ -1,9 +1,9 @@ -.Dd June 6 2023 +.Dd May 25 2024 .Dt NTP_KEYS 5 File Formats .Os FreeBSD 12.1-RELEASE_SI .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:34 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:03:52 AM by AutoGen 5.18.16 .\" From the definitions ntp.keys.def .\" and the template file agmdoc-file.tpl .Sh NAME @@ -163,7 +163,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you. .Sh "AUTHORS" The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh "BUGS" Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index d9a753ee3a1e..701f5b52249e 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -42,7 +42,6 @@ #include "ntp_clockdev.h" #include "ntp_filegen.h" #include "ntp_stdlib.h" -#include "lib_strbuf.h" #include "ntp_assert.h" #include "ntp_random.h" /* @@ -139,14 +138,11 @@ typedef struct peer_resolved_ctx_tag { #define MAXPPS 20 /* maximum length of PPS device string */ /* - * Poll Skew List + * Poll Skew List array has an entry for each supported poll + * interval. */ - -static psl_item psl[17-3+1]; /* values for polls 3-17 */ - /* To simplify the runtime code we */ - /* don't want to have to special-case */ - /* dealing with a default */ - +#define PSL_ENTRIES (NTP_MAXPOLL - NTP_MINPOLL + 1) +static psl_item psl[PSL_ENTRIES]; /* * Miscellaneous macros @@ -338,7 +334,7 @@ static void config_ntpdsim(config_tree *); static void config_ntpd(config_tree *, int/*BOOL*/ input_from_file); static void config_other_modes(config_tree *); static void config_auth(config_tree *); -static void attrtopsl(int poll, attr_val *avp); +static void attrtopsl(u_char log2_poll, attr_val *avp); static void config_access(config_tree *); static void config_mdnstries(config_tree *); static void config_phone(config_tree *); @@ -381,15 +377,9 @@ 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, const char *); - - -#ifndef SIM static int getnetnum(const char *num, sockaddr_u *addr, int complain, enum gnn_type a_type); -#endif - #if defined(__GNUC__) /* this covers CLANG, too */ static void __attribute__((__noreturn__,format(printf,1,2))) fatal_error(const char *fmt, ...) #elif defined(_MSC_VER) @@ -1009,18 +999,24 @@ dump_config_tree( for (rest_node = HEAD_PFIFO(ptree->restrict_opts); rest_node != NULL; rest_node = rest_node->link) { - int is_default = 0; + int/*BOOL*/ is_default = FALSE; + int/*BOOL*/ omit_mask; + sockaddr_u mask; + sockaddr_u onesmask; + s = NULL; + atrv = HEAD_PFIFO(rest_node->flag_tok_fifo); + for (; atrv != NULL; atrv = atrv->link) { + if ( T_Integer == atrv->type + && T_Source == atrv->attr) { + s = keyword(T_Source); + break; + } + } if (NULL == rest_node->addr) { - s = "default"; - /* Don't need to set is_default=1 here */ - atrv = HEAD_PFIFO(rest_node->flag_tok_fifo); - for ( ; atrv != NULL; atrv = atrv->link) { - if ( T_Integer == atrv->type - && T_Source == atrv->attr) { - s = "source"; - break; - } + if (NULL == s) { + s = keyword(T_Default); + /* Don't need to set is_default here */ } } else { const char *ap = rest_node->addr->address; @@ -1030,25 +1026,51 @@ dump_config_tree( 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; + && !strcmp(mp, "0.0.0.0") + && !strcmp(ap, mp)) { + is_default = TRUE; s = "-4 default"; } else if ( rest_node->mask && rest_node->mask->type == AF_INET6 - && !strcmp(ap, "::") - && !strcmp(mp, "::")) { - is_default = 1; + && !strcmp(mp, "::") + && !strcmp(ap, mp)) { + is_default = TRUE; s = "-6 default"; } else { - s = ap; + if (NULL == s) { + s = ap; + } else { + LIB_GETBUF(s1); + snprintf(s1, LIB_BUFLENGTH, + "%s %s", + keyword(T_Source), ap); + s = s1; + } + } + } + fprintf(df, "%s %s", + keyword(rest_node->remove + ? T_Delrestrict + : T_Restrict), + s); + if (rest_node->mask != NULL && !is_default) { + ZERO(mask); + AF(&mask) = AF_UNSPEC; + omit_mask = (0 != getnetnum(rest_node->mask->address, + &mask, 0, t_UNK)); + if (omit_mask) { + SET_HOSTMASK(&onesmask, AF(&mask)); + omit_mask = SOCK_EQ(&mask, &onesmask); + } + if (!omit_mask) { + fprintf(df, " mask %s", + rest_node->mask->address); } } - fprintf(df, "restrict %s", s); - if (rest_node->mask != NULL && !is_default) - fprintf(df, " mask %s", - rest_node->mask->address); - fprintf(df, " ippeerlimit %d", rest_node->ippeerlimit); + if (-1 != rest_node->ippeerlimit) { + fprintf(df, " ippeerlimit %d", + rest_node->ippeerlimit); + } atrv = HEAD_PFIFO(rest_node->flag_tok_fifo); for ( ; atrv != NULL; atrv = atrv->link) { if ( T_Integer == atrv->type @@ -1056,7 +1078,7 @@ dump_config_tree( fprintf(df, " %s", keyword(atrv->attr)); } } - fprintf(df, "\n"); + fprintf(df, "\n"); /**/ #if 0 msyslog(LOG_INFO, "Dumping flag_tok_fifo:"); @@ -1585,8 +1607,10 @@ create_restrict_node( address_node * mask, short ippeerlimit, attr_val_fifo * flag_tok_fifo, - int nline - ) + int/*BOOL*/ remove, + int nline, + int ncol +) { restrict_node *my_node; @@ -1595,7 +1619,9 @@ create_restrict_node( my_node->mask = mask; my_node->ippeerlimit = ippeerlimit; my_node->flag_tok_fifo = flag_tok_fifo; + my_node->remove = remove; my_node->line_no = nline; + my_node->column = ncol; return my_node; } @@ -2193,6 +2219,7 @@ free_config_auth( } #endif /* FREE_CFG_T */ + #ifndef SIM /* Configure low-level clock-related parameters. Return TRUE if the * clock might need adjustment like era-checking after the call, FALSE @@ -2200,16 +2227,16 @@ free_config_auth( */ static int/*BOOL*/ config_tos_clock( - config_tree *ptree - ) + config_tree* ptree +) { int ret; - attr_val * tos; + attr_val* tos; ret = FALSE; tos = HEAD_PFIFO(ptree->orphan_cmds); for (; tos != NULL; tos = tos->link) { - switch(tos->attr) { + switch (tos->attr) { default: break; @@ -2221,12 +2248,13 @@ config_tos_clock( } } - if (basedate_get_day() <= NTP_TO_UNIX_DAYS) + if (basedate_get_day() <= NTP_TO_UNIX_DAYS) { basedate_set_day(basedate_eval_buildstamp() - 11); - + } return ret; } -#endif /* SIM */ +#endif /* !SIM */ + static void config_tos( @@ -2427,21 +2455,22 @@ free_config_tos( static void config_monitor( - config_tree *ptree - ) + config_tree* ptree +) { - int_node *pfilegen_token; - const char *filegen_string; - const char *filegen_file; - FILEGEN *filegen; - filegen_node *my_node; - attr_val *my_opts; - int filegen_type; - int filegen_flag; + int_node * pfilegen_token; + const char * filegen_string; + const char * filegen_file; + FILEGEN * filegen; + filegen_node * my_node; + attr_val* my_opts; + int filegen_type; + int filegen_flag; /* Set the statistics directory */ - if (ptree->stats_dir) - stats_config(STATS_STATSDIR, ptree->stats_dir, 0); + if (ptree->stats_dir) { + stats_config(STATS_STATSDIR, ptree->stats_dir, TRUE); + } /* NOTE: * Calling filegen_get is brain dead. Doing a string @@ -2612,19 +2641,19 @@ config_access( struct addrinfo * ai_list; struct addrinfo * pai; int rc; - int restrict_default; + int/*BOOL*/ success; + int/*BOOL*/ restrict_default; u_short rflags; u_short mflags; short ippeerlimit; int range_err; - psl_item my_psl_item; attr_val * atrv; attr_val * dflt_psl_atr; const char * signd_warning = #ifdef HAVE_NTP_SIGND - "MS-SNTP signd operations currently block ntpd degrading service to all clients."; + "MS-SNTP signd operations currently block ntpd degrading service to all clients.\n"; #else - "mssntp restrict bit ignored, this ntpd was configured without --enable-ntp-signd."; + "mssntp restrict bit ignored, this ntpd was configured without --enable-ntp-signd.\n"; #endif /* Configure the mru options */ @@ -2829,28 +2858,31 @@ config_access( } if ((RES_MSSNTP & rflags) && !warned_signd) { - warned_signd = 1; - fprintf(stderr, "%s\n", signd_warning); + warned_signd = TRUE; + fprintf(stderr, "%s", signd_warning); msyslog(LOG_WARNING, "%s", signd_warning); } - /* It would be swell if we could identify the line number */ if ((RES_KOD & rflags) && !(RES_LIMITED & rflags)) { const char *kod_where = (my_node->addr) ? my_node->addr->address : (mflags & RESM_SOURCE) ? "source" : "default"; - const char *kod_warn = "KOD does nothing without LIMITED."; - - fprintf(stderr, "restrict %s: %s\n", kod_where, kod_warn); - msyslog(LOG_WARNING, "restrict %s: %s", kod_where, kod_warn); + const char *kod_warn = "'kod' does nothing without 'limited'.\n"; + + fprintf(stderr, "line %d col %d restrict %s: %s", + my_node->line_no, my_node->column, + kod_where, kod_warn); + msyslog(LOG_WARNING, "line %d col %d restrict %s: %s", + my_node->line_no, my_node->column, + kod_where, kod_warn); } ZERO_SOCK(&addr); ai_list = NULL; pai = NULL; - restrict_default = 0; + restrict_default = FALSE; if (NULL == my_node->addr) { ZERO_SOCK(&mask); @@ -2860,13 +2892,18 @@ config_access( * without a -4 / -6 qualifier, add to * both lists */ - restrict_default = 1; + restrict_default = TRUE; } else { /* apply "restrict source ..." */ - 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); + success = hack_restrict(RESTRICT_FLAGS, + NULL, NULL, + ippeerlimit, + mflags, rflags, + 0); + if (!success) { + msyslog(LOG_ERR, + "unable to save restrict source"); + } continue; } } else { @@ -2898,33 +2935,37 @@ config_access( &ai_list); if (rc) { msyslog(LOG_ERR, - "restrict: ignoring line %d, address/host '%s' unusable.", + "restrict: line %d col %d" + " address/host '%s' unusable.", my_node->line_no, + my_node->column, my_node->addr->address); continue; } INSIST(ai_list != NULL); pai = ai_list; INSIST(pai->ai_addr != NULL); - INSIST(sizeof(addr) >= - pai->ai_addrlen); + INSIST(sizeof(addr) >= pai->ai_addrlen); memcpy(&addr, pai->ai_addr, pai->ai_addrlen); INSIST(AF_INET == AF(&addr) || AF_INET6 == AF(&addr)); } + /* default to all-ones mask for single address */ SET_HOSTMASK(&mask, AF(&addr)); - /* Resolve the mask */ - if (my_node->mask) { + /* Ignore mask if addr from hostname [Bug 3872] */ + if (NULL == ai_list && my_node->mask) { ZERO_SOCK(&mask); AF(&mask) = my_node->mask->type; if (getnetnum(my_node->mask->address, &mask, 1, t_MSK) != 1) { msyslog(LOG_ERR, - "restrict: ignoring line %d, mask '%s' unusable.", + "restrict: line %d col %d" + " mask '%s' unusable.", my_node->line_no, + my_node->column, my_node->mask->address); continue; } @@ -2935,15 +2976,43 @@ config_access( if (restrict_default) { AF(&addr) = AF_INET; AF(&mask) = AF_INET; - hack_restrict(RESTRICT_FLAGS, &addr, &mask, - ippeerlimit, mflags, rflags, 0); + success = hack_restrict( + RESTRICT_FLAGS, + &addr, + &mask, + ippeerlimit, + mflags, + rflags, + 0 + ); + if (!success) { + msyslog(LOG_ERR, + "unable to save %s %s restriction", + stoa(&addr), stoa(&mask)); + } AF(&addr) = AF_INET6; AF(&mask) = AF_INET6; } do { - hack_restrict(RESTRICT_FLAGS, &addr, &mask, - ippeerlimit, mflags, rflags, 0); + success = hack_restrict( + my_node->remove + ? RESTRICT_REMOVE + : RESTRICT_FLAGS, + &addr, + &mask, + ippeerlimit, + mflags, + rflags, + 0); + if (!success) { + msyslog(LOG_ERR, + "unable to %s %s %s restriction", + my_node->remove + ? "delete" + : "save", + stoa(&addr), stoa(&mask)); + } if (pai != NULL && NULL != (pai = pai->ai_next)) { INSIST(pai->ai_addr != NULL); @@ -2958,61 +3027,42 @@ config_access( } } while (pai != NULL); - if (ai_list != NULL) + if (ai_list != NULL) { freeaddrinfo(ai_list); + } } - /* Deal with the Poll Skew List */ - + /* + * pollskewlist + */ + atrv = HEAD_PFIFO(ptree->pollskewlist); + if (NULL == atrv) { + /* don't touch the poll skew list */ + return; + } ZERO(psl); - ZERO(my_psl_item); - /* * First, find the last default pollskewlist item. - * There should only be one of these with the current grammar, - * but better safe than sorry. */ dflt_psl_atr = NULL; - atrv = HEAD_PFIFO(ptree->pollskewlist); for ( ; atrv != NULL; atrv = atrv->link) { - switch (atrv->attr) { - case -1: /* default */ + if (-1 == atrv->attr) { /* default */ dflt_psl_atr = atrv; - break; - - case 3: /* Fall through */ - case 4: /* Fall through */ - case 5: /* Fall through */ - case 6: /* Fall through */ - case 7: /* Fall through */ - case 8: /* Fall through */ - case 9: /* Fall through */ - case 10: /* Fall through */ - case 11: /* Fall through */ - case 12: /* Fall through */ - case 13: /* Fall through */ - case 14: /* Fall through */ - case 15: /* Fall through */ - case 16: /* Fall through */ - case 17: - /* ignore */ - break; - - default: + } else if ( atrv->attr < NTP_MINPOLL + || atrv->attr > NTP_MAXPOLL) { msyslog(LOG_ERR, - "config_access: default PSL scan: ignoring unexpected poll value %d", - atrv->attr); - break; + "Poll %d out of bounds [%d-%d] for pollskewlist", + atrv->attr, NTP_MINPOLL, NTP_MAXPOLL); } } - /* If we have a nonzero default, initialize the PSL */ + /* If we have a nonzero default, put it in all entries */ if ( dflt_psl_atr && ( 0 != dflt_psl_atr->value.r.first || 0 != dflt_psl_atr->value.r.last)) { int i; - for (i = 3; i <= 17; ++i) { + for (i = NTP_MINPOLL; i <= NTP_MAXPOLL; ++i) { attrtopsl(i, dflt_psl_atr); } } @@ -3020,38 +3070,15 @@ config_access( /* Finally, update the PSL with any explicit entries */ atrv = HEAD_PFIFO(ptree->pollskewlist); for ( ; atrv != NULL; atrv = atrv->link) { - switch (atrv->attr) { - case -1: /* default */ - /* Ignore */ - break; - - case 3: /* Fall through */ - case 4: /* Fall through */ - case 5: /* Fall through */ - case 6: /* Fall through */ - case 7: /* Fall through */ - case 8: /* Fall through */ - case 9: /* Fall through */ - case 10: /* Fall through */ - case 11: /* Fall through */ - case 12: /* Fall through */ - case 13: /* Fall through */ - case 14: /* Fall through */ - case 15: /* Fall through */ - case 16: /* Fall through */ - case 17: + if (atrv->attr >= NTP_MINPOLL && atrv->attr <= NTP_MAXPOLL) { attrtopsl(atrv->attr, atrv); - break; - - default: - break; /* Ignore - we reported this above */ } } #if 0 int p; msyslog(LOG_INFO, "Dumping PSL:"); - for (p = 3; p <= 17; ++p) { + for (p = NTP_MINPOLL; p <= NTP_MAXPOLL; ++p) { psl_item psi; if (0 == get_pollskew(p, &psi)) { @@ -3065,43 +3092,40 @@ config_access( } -void -attrtopsl(int poll, attr_val *avp) +static void +attrtopsl( + u_char log2_poll, + attr_val * avp + ) { + int pao = log2_poll - NTP_MINPOLL; /* poll array offset */ + u_int32 lower = (u_short)avp->value.r.first; /* ntp_parser.y ensures */ + u_int32 upper = (u_short)avp->value.r.last; /* non-neg. first/last */ + u_int psmax = 1 << (log2_poll - 1); + u_int32 qmsk; - DEBUG_INSIST((poll - 3) < sizeof psl); - if (poll < 3 || poll > 17) { - msyslog(LOG_ERR, "attrtopsl(%d, ...): Poll value is out of range - ignoring", poll); - } else { - int pao = poll - 3; /* poll array offset */ - int lower = avp->value.r.first; /* a positive number */ - int upper = avp->value.r.last; - int psmax = 1 << (poll - 1); - int qmsk; - - if (lower > psmax) { - msyslog(LOG_WARNING, "attrtopsl: default: poll %d lower bound reduced from %d to %d", - poll, lower, psmax); - lower = psmax; - } - if (upper > psmax) { - msyslog(LOG_WARNING, "attrtopsl: default: poll %d upper bound reduced from %d to %d", - poll, upper, psmax); - upper = psmax; - } - psl[pao].sub = lower; - psl[pao].qty = lower + upper; + DEBUG_INSIST(pao >= 0 && pao < COUNTOF(psl)); - qmsk = 1; - while (qmsk < (lower + upper)) { - qmsk <<= 1; - qmsk |= 1; - }; - psl[pao].msk = qmsk; + if (lower > psmax) { + msyslog(LOG_WARNING, "pollskewlist %d lower bound reduced from %d to %d", + log2_poll, lower, psmax); + lower = psmax; + } + if (upper > psmax) { + msyslog(LOG_WARNING, "pollskewlist %d upper bound reduced from %d to %d", + log2_poll, upper, psmax); + upper = psmax; } + psl[pao].sub = lower; + psl[pao].qty = lower + upper; - return; -} + qmsk = 1; + while (qmsk < (lower + upper)) { + qmsk <<= 1; + qmsk |= 1; + } + psl[pao].msk = qmsk; +} #endif /* !SIM */ @@ -3111,16 +3135,14 @@ get_pollskew( psl_item *rv ) { - #ifdef DISABLE_BUG3767_FIX - DEBUG_INSIST(3 <= p && 17 >= p); + DEBUG_INSIST(NTP_MINPOLL <= p && NTP_MAXPOLL >= p); #endif - if (3 <= p && 17 >= p) { - *rv = psl[p - 3]; - + if (NTP_MINPOLL <= p && p <= NTP_MAXPOLL) { + *rv = psl[p - NTP_MINPOLL]; return 0; } else { - msyslog(LOG_ERR, "get_pollskew(%d): poll is not between 3 and 17!", p); + msyslog(LOG_DEBUG, "get_pollskew(%d): out of range", p); return -1; } @@ -3339,9 +3361,13 @@ config_nic_rules( if_name = estrdup(if_name); switch (curr_node->match_class) { - default: +#ifdef DEBUG fatal_error("config_nic_rules: match-class-token=%d", curr_node->match_class); +#endif + case T_All: + match_type = MATCH_ALL; + break; case 0: /* @@ -3372,10 +3398,6 @@ config_nic_rules( } break; - case T_All: - match_type = MATCH_ALL; - break; - case T_Ipv4: match_type = MATCH_IPV4; break; @@ -3390,10 +3412,10 @@ config_nic_rules( } switch (curr_node->action) { - default: +#ifdef DEBUG fatal_error("config_nic_rules: action-token=%d", curr_node->action); - +#endif case T_Listen: action = ACTION_LISTEN; break; @@ -3409,7 +3431,9 @@ config_nic_rules( add_nic_rule(match_type, if_name, prefixlen, action); - timer_interfacetimeout(current_time + 2); + if (!initializing && !scan_addrs_once) { + endpt_scan_timer = 1 + current_time; + } if (if_name != NULL) free(if_name); } @@ -3733,7 +3757,7 @@ config_trap( attr_val *curr_opt; sockaddr_u addr_sock; sockaddr_u peeraddr; - struct interface *localaddr; + endpt *localaddr; struct addrinfo hints; char port_text[8]; settrap_parms *pstp; @@ -3867,7 +3891,7 @@ trap_name_resolved( ) { settrap_parms *pstp; - struct interface *localaddr; + endpt *localaddr; sockaddr_u peeraddr; (void)gai_errno; @@ -3920,7 +3944,7 @@ config_fudge( sockaddr_u addr_sock; address_node *addr_node; struct refclockstat clock_stat; - char refid_str[5]; + char refidstr[5]; int err_flag; curr_fudge = HEAD_PFIFO(ptree->fudge); @@ -3951,9 +3975,6 @@ config_fudge( clock_stat.fudgeminjitter = 0.0; clock_stat.fudgetime1 = 0.0; clock_stat.fudgetime2 = 0.0; - clock_stat.p_lastcode = NULL; - clock_stat.clockdesc = NULL; - clock_stat.kv_list = NULL; curr_opt = HEAD_PFIFO(curr_fudge->options); for (; curr_opt != NULL; curr_opt = curr_opt->link) { switch (curr_opt->attr) { @@ -3975,10 +3996,17 @@ config_fudge( case T_Refid: clock_stat.haveflags |= CLK_HAVEVAL2; - /* strncpy() does exactly what we want here: */ - strncpy(refid_str, curr_opt->value.s, - sizeof refid_str - 1); - memcpy(&clock_stat.fudgeval2, refid_str, + /* + * strncpy() does exactly what we want + * here, do not be tempted to replace + * it with strlcpy(), we want it to + * zero-fill refid's less than 4 chars + * because we're going to stuff it + * into a u_int32. + */ + strncpy(refidstr, curr_opt->value.s, + sizeof refidstr - 1); + memcpy(&clock_stat.fudgeval2, refidstr, sizeof clock_stat.fudgeval2); break; @@ -4140,7 +4168,7 @@ config_vars( case T_Driftfile: if ('\0' == curr_var->value.s[0]) msyslog(LOG_INFO, "config: driftfile disabled"); - stats_config(STATS_FREQ_FILE, curr_var->value.s, 0); + stats_config(STATS_FREQ_FILE, curr_var->value.s, TRUE); break; case T_Dscp: @@ -4158,7 +4186,7 @@ config_vars( break; case T_Leapfile: - stats_config(STATS_LEAP_FILE, curr_var->value.s, curr_var->flag); + stats_config(STATS_LEAP_FILE, curr_var->value.s, curr_var->flag); break; #ifdef LEAP_SMEAR @@ -5165,13 +5193,13 @@ getconfig( } cfgt.source.value.s = estrdup(alt_config_file); #endif /* SYS_WINNT */ - } else + } else { cfgt.source.value.s = estrdup(config_file); - + } /*** BULK OF THE PARSER ***/ #ifdef DEBUG - yydebug = !!(debug >= 5); + yydebug = (debug >= 9); #endif yyparse(); lex_drop_stack(); @@ -5311,10 +5339,9 @@ normal_dtoa( pch_nz = pch_e; while ('0' == *pch_nz) pch_nz++; - if (pch_nz == pch_e) - return buf; - strlcpy(pch_e, pch_nz, LIB_BUFLENGTH - (pch_e - buf)); - + if (pch_nz > pch_e) { + memmove(pch_e, pch_nz, 1 + strlen(pch_nz)); + } return buf; } @@ -5576,12 +5603,11 @@ gettokens_netinfo ( * returns 1 for success, and mysteriously, 0 for most failures, and * -1 if the address found is IPv6 and we believe IPv6 isn't working. */ -#ifndef SIM static int getnetnum( const char *num, sockaddr_u *addr, - int complain, + int complain, /* ignored */ enum gnn_type a_type /* ignored */ ) { @@ -5589,22 +5615,21 @@ getnetnum( AF_INET == AF(addr) || AF_INET6 == AF(addr)); - if (!is_ip_address(num, AF(addr), addr)) + if (!is_ip_address(num, AF(addr), addr)) { return 0; - - if (IS_IPV6(addr) && !ipv6_works) - return -1; - + } # ifdef ISC_PLATFORM_HAVESALEN addr->sa.sa_len = SIZEOF_SOCKADDR(AF(addr)); # endif SET_PORT(addr, NTP_PORT); - DPRINTF(2, ("getnetnum given %s, got %s\n", num, stoa(addr))); - - return 1; + if (IS_IPV6(addr) && !ipv6_works) { + return -1; + } else { + return 1; + } } -#endif /* !SIM */ + #if defined(HAVE_SETRLIMIT) void @@ -5684,228 +5709,3 @@ 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_SRVRSPFUZ) { - rflags &= ~RES_SRVRSPFUZ; - appendstr(rfs, sizeof rfs, "srvrspfuz"); - } - - 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, - const 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 0cc7fcb47ecd..6756fa0300c1 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -26,7 +26,6 @@ #include "ntp_crypto.h" #include "ntp_assert.h" #include "ntp_leapsec.h" -#include "lib_strbuf.h" #include "timexsup.h" #include <rc_cmdlength.h> @@ -110,7 +109,7 @@ static int validate_nonce (const char *, struct recvbuf *); static void req_nonce (struct recvbuf *, int); static void unset_trap (struct recvbuf *, int); static struct ctl_trap *ctlfindtrap(sockaddr_u *, - struct interface *); + endpt *); int/*BOOL*/ is_safe_filename(const char * name); @@ -804,7 +803,7 @@ static int datalinelen; static int datasent; /* flag to avoid initial ", " */ static int datanotbinflag; static sockaddr_u *rmt_addr; -static struct interface *lcl_inter; +static endpt *lcl_inter; static u_char res_authenticate; static u_char res_authokay; @@ -3179,8 +3178,8 @@ ctl_getitem( if (quiet_until <= current_time) { quiet_until = current_time + 300; msyslog(LOG_WARNING, - "Possible 'ntpdx' exploit from %s#%u (possibly spoofed)", - stoa(rmt_addr), SRCPORT(rmt_addr)); + "Possible 'ntpdx' exploit from %s (possibly spoofed)", + sptoa(rmt_addr)); } reqpt = reqend; /* never again for this packet! */ return NULL; @@ -3634,8 +3633,13 @@ static void configure( /* - * derive_nonce - generate client-address-specific nonce value - * associated with a given timestamp. + * derive_nonce - generate 32-bit nonce value derived from the client + * address and a request-specific timestamp. + * + * This uses MD5 for a non-authentication purpose -- the nonce is used + * analogous to the TCP 3-way handshake to confirm the UDP client can + * receive traffic from which it claims to originate, that is, to + * prevent spoofed requests leading to reflected amplification. */ static u_int32 derive_nonce( sockaddr_u * addr, @@ -3645,13 +3649,11 @@ static u_int32 derive_nonce( { static u_int32 salt[4]; static u_long last_salt_update; + MD5_CTX ctx; union d_tag { - u_char digest[EVP_MAX_MD_SIZE]; + u_char digest[MD5_DIGEST_LENGTH]; u_int32 extract; } d; - EVP_MD_CTX *ctx; - u_int len; - int rc; while (!salt[0] || current_time - last_salt_update >= 3600) { salt[0] = ntp_random(); @@ -3661,32 +3663,18 @@ static u_int32 derive_nonce( last_salt_update = current_time; } - 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); - rc = EVP_DigestInit_ex(ctx, EVP_get_digestbynid(NID_md5), NULL); -# else - rc = EVP_DigestInit(ctx, EVP_get_digestbynid(NID_md5)); -# endif - if (!rc) { - msyslog(LOG_ERR, "EVP_DigestInit failed in '%s'", __func__); - return (0); + MD5Init(&ctx); + MD5Update(&ctx, salt, sizeof(salt)); + MD5Update(&ctx, &ts_i, sizeof(ts_i)); + MD5Update(&ctx, &ts_f, sizeof(ts_f)); + if (IS_IPV4(addr)) { + MD5Update(&ctx, &SOCK_ADDR4(addr), sizeof(SOCK_ADDR4(addr))); + } else { + MD5Update(&ctx, &SOCK_ADDR6(addr), sizeof(SOCK_ADDR6(addr))); } - - EVP_DigestUpdate(ctx, salt, sizeof(salt)); - EVP_DigestUpdate(ctx, &ts_i, sizeof(ts_i)); - EVP_DigestUpdate(ctx, &ts_f, sizeof(ts_f)); - if (IS_IPV4(addr)) - EVP_DigestUpdate(ctx, &SOCK_ADDR4(addr), - sizeof(SOCK_ADDR4(addr))); - else - EVP_DigestUpdate(ctx, &SOCK_ADDR6(addr), - sizeof(SOCK_ADDR6(addr))); - EVP_DigestUpdate(ctx, &NSRCPORT(addr), sizeof(NSRCPORT(addr))); - EVP_DigestUpdate(ctx, salt, sizeof(salt)); - EVP_DigestFinal(ctx, d.digest, &len); - EVP_MD_CTX_free(ctx); + MD5Update(&ctx, &NSRCPORT(addr), sizeof(NSRCPORT(addr))); + MD5Update(&ctx, salt, sizeof(salt)); + MD5Final(d.digest, &ctx); return d.extract; } @@ -3986,7 +3974,7 @@ static void read_mru_list( int mincount; u_int maxlstint; sockaddr_u laddr; - struct interface * lcladr; + endpt * lcladr; u_int count; u_int ui; u_int uf; @@ -4787,7 +4775,7 @@ unset_trap( int ctlsettrap( sockaddr_u *raddr, - struct interface *linter, + endpt *linter, int traptype, int version ) @@ -4910,7 +4898,7 @@ ctlsettrap( int ctlclrtrap( sockaddr_u *raddr, - struct interface *linter, + endpt *linter, int traptype ) { @@ -4935,7 +4923,7 @@ ctlclrtrap( static struct ctl_trap * ctlfindtrap( sockaddr_u *raddr, - struct interface *linter + endpt *linter ) { size_t n; diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index 4a4207683331..38a62fdb4398 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -267,17 +267,10 @@ session_key( hdlen = 10 * sizeof(u_int32); 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 + ctx = digest_ctx; 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); memcpy(&keyid, dgst, 4); keyid = ntohl(keyid); if (lifetime != 0) { @@ -308,7 +301,7 @@ session_key( int make_keylist( struct peer *peer, /* peer structure pointer */ - struct interface *dstadr /* interface */ + endpt *dstadr /* interface */ ) { EVP_MD_CTX *ctx; /* signature context */ @@ -389,7 +382,7 @@ make_keylist( if (tstamp != 0) { if (vp->sig == NULL) vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)vp, 12); EVP_SignUpdate(ctx, vp->ptr, sizeof(struct autokey)); @@ -398,7 +391,6 @@ make_keylist( vp->siglen = htonl(len); peer->flags |= FLAG_ASSOC; } - EVP_MD_CTX_free(ctx); } DPRINTF(1, ("make_keys: %d %08x %08x ts %u fs %u poll %d\n", peer->keynumber, keyid, cookie, ntohl(vp->tstamp), @@ -834,7 +826,7 @@ crypto_recv( * errors. */ if (vallen == (u_int)EVP_PKEY_size(host_pkey)) { - RSA *rsa = EVP_PKEY_get0_RSA(host_pkey); + RSA *rsa = EVP_PKEY_get1_RSA(host_pkey); u_int32 *cookiebuf = malloc(RSA_size(rsa)); if (!cookiebuf) { rval = XEVNT_CKY; @@ -853,6 +845,7 @@ crypto_recv( cookie = ntohl(*cookiebuf); free(cookiebuf); } + RSA_free(rsa); } else { rval = XEVNT_CKY; break; @@ -1548,16 +1541,15 @@ crypto_verify( * signature. If the identity exchange is verified, light the * proventic bit. What a relief. */ - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_VerifyInit(ctx, peer->digest); - /* XXX: the "+ 12" needs to be at least documented... */ - EVP_VerifyUpdate(ctx, (u_char *)&ep->tstamp, vallen + 12); + EVP_VerifyUpdate(ctx, (u_char *)&ep->tstamp, vallen + + sizeof(ep->tstamp) + sizeof(ep->fstamp) + + sizeof(ep->vallen)); if (EVP_VerifyFinal(ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) { - EVP_MD_CTX_free(ctx); return (XEVNT_SIG); } - EVP_MD_CTX_free(ctx); if (peer->crypto & CRYPTO_FLAG_VRFY) peer->crypto |= CRYPTO_FLAG_PROV; @@ -1583,6 +1575,7 @@ crypto_encrypt( ) { EVP_PKEY *pkey; /* public key */ + RSA* rsa; /* public key */ EVP_MD_CTX *ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; @@ -1610,8 +1603,9 @@ crypto_encrypt( vp->ptr = emalloc(vallen); puch = vp->ptr; temp32 = htonl(*cookie); - if (RSA_public_encrypt(4, (u_char *)&temp32, puch, - EVP_PKEY_get0_RSA(pkey), RSA_PKCS1_OAEP_PADDING) <= 0) { + rsa = EVP_PKEY_get1_RSA(pkey); + if (RSA_public_encrypt(4, (u_char *)&temp32, puch, rsa, + RSA_PKCS1_OAEP_PADDING) <= 0) { msyslog(LOG_ERR, "crypto_encrypt: %s", ERR_error_string(ERR_get_error(), NULL)); free(vp->ptr); @@ -1619,11 +1613,14 @@ crypto_encrypt( return (XEVNT_CKY); } EVP_PKEY_free(pkey); + pkey = NULL; + RSA_free(rsa); + rsa = NULL; if (tstamp == 0) return (XEVNT_OK); vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12); EVP_SignUpdate(ctx, vp->ptr, vallen); @@ -1631,7 +1628,6 @@ crypto_encrypt( INSIST(vallen <= sign_siglen); vp->siglen = htonl(vallen); } - EVP_MD_CTX_free(ctx); return (XEVNT_OK); } @@ -1849,7 +1845,7 @@ crypto_update(void) if (hostval.tstamp == 0) return; - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; /* * Sign public key and timestamps. The filestamp is derived from @@ -1945,7 +1941,6 @@ crypto_update(void) ntohl(hostval.tstamp)); record_crypto_stats(NULL, statstr); DPRINTF(1, ("crypto_update: %s\n", statstr)); - EVP_MD_CTX_free(ctx); } /* @@ -2003,7 +1998,7 @@ value_free( * Returns NTP seconds if in synch, 0 otherwise */ tstamp_t -crypto_time() +crypto_time(void) { l_fp tstamp; /* NTP time */ @@ -2075,7 +2070,7 @@ asn_to_calendar ( /* - * bigdig() - compute a BIGNUM MD5 hash of a BIGNUM number. + * bighash() - compute a BIGNUM MD5 hash of a BIGNUM number. * * Returns void (no errors) */ @@ -2093,17 +2088,10 @@ bighash( len = BN_num_bytes(bn); 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 + ctx = digest_ctx; EVP_DigestInit(ctx, EVP_md5()); -# endif EVP_DigestUpdate(ctx, ptr, len); EVP_DigestFinal(ctx, dgst, &len); - EVP_MD_CTX_free(ctx); BN_bin2bn(dgst, len, bk); free(ptr); } @@ -2169,12 +2157,12 @@ crypto_alice( struct value *vp /* value pointer */ ) { - DSA *dsa; /* IFF parameters */ - BN_CTX *bctx; /* BIGNUM context */ - EVP_MD_CTX *ctx; /* signature context */ - tstamp_t tstamp; - u_int len; - const BIGNUM *q; + const DSA *dsa; /* IFF parameters */ + BN_CTX *bctx; /* BIGNUM context */ + EVP_MD_CTX *ctx; /* signature context */ + tstamp_t tstamp; + u_int len; + const BIGNUM *q; /* * The identity parameters must have correct format and content. @@ -2216,7 +2204,7 @@ crypto_alice( return (XEVNT_OK); vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12); EVP_SignUpdate(ctx, vp->ptr, len); @@ -2224,7 +2212,6 @@ crypto_alice( INSIST(len <= sign_siglen); vp->siglen = htonl(len); } - EVP_MD_CTX_free(ctx); return (XEVNT_OK); } @@ -2243,7 +2230,8 @@ crypto_bob( struct value *vp /* value pointer */ ) { - DSA *dsa; /* IFF parameters */ + int retv; /* return value */ + const DSA *dsa; /* IFF parameters */ DSA_SIG *sdsa; /* DSA signature context fake */ BN_CTX *bctx; /* BIGNUM context */ EVP_MD_CTX *ctx; /* signature context */ @@ -2262,6 +2250,10 @@ crypto_bob( msyslog(LOG_NOTICE, "crypto_bob: scheme unavailable"); return (XEVNT_ID); } + + /* Initialize pointers that may need freeing in cleanup. */ + sdsa = NULL; + dsa = EVP_PKEY_get0_DSA(iffkey_info->pkey); DSA_get0_pqg(dsa, &p, &q, &g); DSA_get0_key(dsa, NULL, &priv_key); @@ -2306,16 +2298,16 @@ crypto_bob( if (len == 0) { msyslog(LOG_ERR, "crypto_bob: %s", ERR_error_string(ERR_get_error(), NULL)); - DSA_SIG_free(sdsa); - return (XEVNT_ERR); + retv = XEVNT_ERR; + goto cleanup; } if (len > MAX_VALLEN) { msyslog(LOG_ERR, "crypto_bob: signature is too big: %u", len); - DSA_SIG_free(sdsa); - return (XEVNT_LEN); + retv = XEVNT_ERR; + goto cleanup; } - memset(vp, 0, sizeof(struct value)); + ZERO(*vp); tstamp = crypto_time(); vp->tstamp = htonl(tstamp); vp->fstamp = htonl(iffkey_info->fstamp); @@ -2323,13 +2315,14 @@ crypto_bob( ptr = emalloc(len); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); - DSA_SIG_free(sdsa); - if (tstamp == 0) - return (XEVNT_OK); + if (0 == tstamp) { + retv = XEVNT_OK; + goto cleanup; + } /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12); EVP_SignUpdate(ctx, vp->ptr, len); @@ -2337,8 +2330,11 @@ crypto_bob( INSIST(len <= sign_siglen); vp->siglen = htonl(len); } - EVP_MD_CTX_free(ctx); - return (XEVNT_OK); + retv = XEVNT_OK; + + cleanup: + DSA_SIG_free(sdsa); + return retv; } @@ -2357,7 +2353,7 @@ crypto_iff( struct peer *peer /* peer structure pointer */ ) { - DSA *dsa; /* IFF parameters */ + const DSA *dsa; /* IFF parameters */ BN_CTX *bctx; /* BIGNUM context */ DSA_SIG *sdsa; /* DSA parameters */ BIGNUM *bn, *bk; @@ -2501,7 +2497,7 @@ crypto_alice2( struct value *vp /* value pointer */ ) { - RSA *rsa; /* GQ parameters */ + const RSA *rsa; /* GQ parameters */ BN_CTX *bctx; /* BIGNUM context */ EVP_MD_CTX *ctx; /* signature context */ tstamp_t tstamp; @@ -2546,7 +2542,7 @@ crypto_alice2( return (XEVNT_OK); vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12); EVP_SignUpdate(ctx, vp->ptr, len); @@ -2554,7 +2550,6 @@ crypto_alice2( INSIST(len <= sign_siglen); vp->siglen = htonl(len); } - EVP_MD_CTX_free(ctx); return (XEVNT_OK); } @@ -2573,7 +2568,7 @@ crypto_bob2( struct value *vp /* value pointer */ ) { - RSA *rsa; /* GQ parameters */ + const RSA *rsa; /* GQ parameters */ DSA_SIG *sdsa; /* DSA parameters */ BN_CTX *bctx; /* BIGNUM context */ EVP_MD_CTX *ctx; /* signature context */ @@ -2651,7 +2646,7 @@ crypto_bob2( return (XEVNT_OK); vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12); EVP_SignUpdate(ctx, vp->ptr, len); @@ -2659,7 +2654,6 @@ crypto_bob2( INSIST(len <= sign_siglen); vp->siglen = htonl(len); } - EVP_MD_CTX_free(ctx); return (XEVNT_OK); } @@ -2680,7 +2674,7 @@ crypto_gq( struct peer *peer /* peer structure pointer */ ) { - RSA *rsa; /* GQ parameters */ + const RSA *rsa; /* GQ parameters */ BN_CTX *bctx; /* BIGNUM context */ DSA_SIG *sdsa; /* RSA signature context fake */ BIGNUM *y, *v; @@ -2845,7 +2839,7 @@ crypto_alice3( struct value *vp /* value pointer */ ) { - DSA *dsa; /* MV parameters */ + const DSA *dsa; /* MV parameters */ BN_CTX *bctx; /* BIGNUM context */ EVP_MD_CTX *ctx; /* signature context */ tstamp_t tstamp; @@ -2890,7 +2884,7 @@ crypto_alice3( return (XEVNT_OK); vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12); EVP_SignUpdate(ctx, vp->ptr, len); @@ -2898,7 +2892,6 @@ crypto_alice3( INSIST(len <= sign_siglen); vp->siglen = htonl(len); } - EVP_MD_CTX_free(ctx); return (XEVNT_OK); } @@ -2916,7 +2909,7 @@ crypto_bob3( struct value *vp /* value pointer */ ) { - DSA *dsa; /* MV parameters */ + const DSA *dsa; /* MV parameters */ DSA *sdsa; /* DSA signature context fake */ BN_CTX *bctx; /* BIGNUM context */ EVP_MD_CTX *ctx; /* signature context */ @@ -3003,7 +2996,7 @@ crypto_bob3( return (XEVNT_OK); vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)&vp->tstamp, 12); EVP_SignUpdate(ctx, vp->ptr, len); @@ -3011,7 +3004,6 @@ crypto_bob3( INSIST(len <= sign_siglen); vp->siglen = htonl(len); } - EVP_MD_CTX_free(ctx); return (XEVNT_OK); } @@ -3032,7 +3024,7 @@ crypto_mv( struct peer *peer /* peer structure pointer */ ) { - DSA *dsa; /* MV parameters */ + const DSA *dsa; /* MV parameters */ DSA *sdsa; /* DSA parameters */ BN_CTX *bctx; /* BIGNUM context */ BIGNUM *k, *u, *v; @@ -3253,7 +3245,7 @@ cert_sign( vp->siglen = 0; if (tstamp != 0) { vp->sig = emalloc(sign_siglen); - ctx = EVP_MD_CTX_new(); + ctx = digest_ctx; EVP_SignInit(ctx, sign_digest); EVP_SignUpdate(ctx, (u_char *)vp, 12); EVP_SignUpdate(ctx, vp->ptr, len); @@ -3261,7 +3253,6 @@ cert_sign( INSIST(len <= sign_siglen); vp->siglen = htonl(len); } - EVP_MD_CTX_free(ctx); } #ifdef DEBUG if (debug > 1) @@ -3909,7 +3900,6 @@ crypto_setup(void) "crypto_setup: spurious crypto command"); return; } - ssl_check_version(); /* * Load required random seed file and seed the random number @@ -4168,5 +4158,5 @@ exten_payload_size( return (u_int)data_size; } # else /* !AUTOKEY follows */ -int ntp_crypto_bs_pubkey; +NONEMPTY_TRANSLATION_UNIT # endif /* !AUTOKEY */ diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index bb35ffd68511..9d79fe493d9b 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -177,11 +177,14 @@ endpt * any_interface; /* wildcard ipv4 interface */ endpt * any6_interface; /* wildcard ipv6 interface */ endpt * loopback_interface; /* loopback ipv4 interface */ -static isc_boolean_t broadcast_client_enabled; /* is broadcast client enabled */ +static isc_boolean_t broadcast_client_enabled; u_int sys_ifnum; /* next .ifnum to assign */ int ninterfaces; /* Total number of interfaces */ -int disable_dynamic_updates; /* scan interfaces once only */ +int no_periodic_scan; /* network endpoint scans */ +int scan_addrs_once; /* because dropped privs */ +int nonlocal_v4_addr_up; /* should we try IPv4 pool? */ +int nonlocal_v6_addr_up; /* should we try IPv6 pool? */ #ifdef REFCLOCK /* @@ -210,7 +213,7 @@ static int update_interfaces(u_short, interface_receiver_t, static void remove_interface(endpt *); static endpt * create_interface(u_short, endpt *); -static int is_wildcard_addr (const sockaddr_u *); +static inline int is_wildcard_addr(const sockaddr_u *psau); /* * Multicast functions @@ -229,7 +232,6 @@ static isc_boolean_t socket_multicast_disable(endpt *, sockaddr_u *); #ifdef DEBUG static void interface_dump (const endpt *); -static void sockaddr_dump (const sockaddr_u *); static void print_interface (const endpt *, const char *, const char *); #define DPRINT_INTERFACE(level, args) do { if (debug >= (level)) { print_interface args; } } while (0) #else @@ -280,13 +282,13 @@ static int addr_samesubnet (const sockaddr_u *, const sockaddr_u *, static int create_sockets (u_short); static SOCKET open_socket (sockaddr_u *, int, int, endpt *); static void set_reuseaddr (int); -static isc_boolean_t socket_broadcast_enable (struct interface *, SOCKET, sockaddr_u *); +static isc_boolean_t socket_broadcast_enable (endpt *, SOCKET, sockaddr_u *); #if !defined(HAVE_IO_COMPLETION_PORT) && !defined(HAVE_SIGNALED_IO) static char * fdbits (int, const fd_set *); #endif #ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES -static isc_boolean_t socket_broadcast_disable (struct interface *, sockaddr_u *); +static isc_boolean_t socket_broadcast_disable (endpt *, sockaddr_u *); #endif typedef struct remaddr remaddr_t; @@ -305,10 +307,16 @@ endpt * mc6_list; /* IPv6 mcast-capable unicast endpts */ static endpt * wildipv4; static endpt * wildipv6; +#define RFC3927_ADDR 0xa9fe0000 /* 169.254. */ +#define RFC3927_MASK 0xffff0000 +#define IS_AUTOCONF(addr4) \ + ((SRCADR(addr4) & RFC3927_MASK) == RFC3927_ADDR) + #ifdef SYS_WINNT int accept_wildcard_if_for_winnt; #else const int accept_wildcard_if_for_winnt = FALSE; +#define init_io_completion_port() do {} while (FALSE) #endif static void add_fd_to_list (SOCKET, enum desc_type); @@ -316,7 +324,7 @@ static endpt * find_addr_in_list (sockaddr_u *); static endpt * find_flagged_addr_in_list(sockaddr_u *, u_int32); static void delete_addr_from_list (sockaddr_u *); static void delete_interface_from_list(endpt *); -static void close_and_delete_fd_from_list(SOCKET); +static void close_and_delete_fd_from_list(SOCKET, endpt *); static void add_addr_to_list (sockaddr_u *, endpt *); static void create_wildcards (u_short); static endpt * findlocalinterface (sockaddr_u *, int, int); @@ -337,7 +345,7 @@ static int cmp_addr_distance(const sockaddr_u *, * Routines to read the ntp packets */ #if !defined(HAVE_IO_COMPLETION_PORT) -static inline int read_network_packet (SOCKET, struct interface *, l_fp); +static inline int read_network_packet (SOCKET, endpt *, l_fp); static void ntpd_addremove_io_fd (int, int, int); static void input_handler_scan (const l_fp*, const fd_set*); static int/*BOOL*/ sanitize_fdset (int errc); @@ -454,15 +462,14 @@ init_io(void) /* Init buffer free list and stat counters */ init_recvbuff(RECV_INIT); /* update interface every 5 minutes as default */ - interface_interval = 300; + endpt_scan_period = 301; #ifdef WORK_PIPE addremove_io_fd = &ntpd_addremove_io_fd; #endif -#if defined(SYS_WINNT) init_io_completion_port(); -#elif defined(HAVE_SIGNALED_IO) +#if defined(HAVE_SIGNALED_IO) (void) set_signal(input_handler); #endif } @@ -528,11 +535,8 @@ interface_dump(const endpt *itf) printf("fd = %lld\n", (long long)itf->fd); printf("bfd = %lld\n", (long long)itf->bfd); printf("sin = %s,\n", stoa(&itf->sin)); - sockaddr_dump(&itf->sin); printf("bcast = %s,\n", stoa(&itf->bcast)); - sockaddr_dump(&itf->bcast); printf("mask = %s,\n", stoa(&itf->mask)); - sockaddr_dump(&itf->mask); printf("name = %s\n", itf->name); printf("flags = 0x%08x\n", itf->flags); printf("last_ttl = %d\n", itf->last_ttl); @@ -546,27 +550,6 @@ interface_dump(const endpt *itf) printf("phase = %u\n", itf->phase); } -/* - * sockaddr_dump - hex dump the start of a sockaddr_u - */ -static void -sockaddr_dump(const sockaddr_u *psau) -{ - /* Limit the size of the sockaddr_in6 hex dump */ - const int maxsize = min(32, sizeof(psau->sa6)); - const u_char * cp; - int i; - - /* XXX: Should we limit maxsize based on psau->saX.sin_family? */ - cp = (const void *)&psau->sa6; - - for(i = 0; i < maxsize; i++) { - printf("%02x", *cp++); - if (!((i + 1) % 4)) - printf(" "); - } - printf("\n"); -} /* * print_interface - helper to output debug information @@ -637,7 +620,7 @@ add_asyncio_reader( } /* - * remove asynchio_reader + * remove asyncio_reader */ static void remove_asyncio_reader( @@ -649,9 +632,9 @@ remove_asyncio_reader( UNLINK_SLIST(unlinked, asyncio_reader_list, reader, link, struct asyncio_reader); - if (reader->fd != INVALID_SOCKET) - close_and_delete_fd_from_list(reader->fd); - + if (reader->fd != INVALID_SOCKET) { + close_and_delete_fd_from_list(reader->fd, NULL); + } reader->fd = INVALID_SOCKET; } #endif /* !defined(HAVE_IO_COMPLETION_PORT) && defined(HAS_ROUTING_SOCKET) */ @@ -743,7 +726,7 @@ interface_enumerate( /* * do standard initialization of interface structure */ -static void +static inline void init_interface( endpt *ep ) @@ -760,20 +743,19 @@ init_interface( * template structure or via standard initialization * function */ -static struct interface * +static endpt * new_interface( - struct interface *interface + endpt *protot ) { - struct interface * iface; + endpt * iface; iface = emalloc(sizeof(*iface)); - - if (NULL == interface) - init_interface(iface); - else /* use the template */ - memcpy(iface, interface, sizeof(*iface)); - + if (NULL == protot) { + ZERO(*iface); + } else { + memcpy(iface, protot, sizeof(*iface)); + } /* count every new instance of an interface in the system */ iface->ifnum = sys_ifnum++; iface->starttime = current_time; @@ -814,19 +796,16 @@ add_interface( endpt ** pmclisthead; endpt * scan; endpt * scan_next; - endpt * unlinked; - sockaddr_u * addr; - int ep_local; - int scan_local; int same_subnet; - int ep_univ_iid; /* iface ID from MAC address */ - int scan_univ_iid; /* see RFC 4291 */ - int ep_privacy; /* random local iface ID */ - int scan_privacy; /* see RFC 4941 */ int rc; /* Calculate the refid */ ep->addr_refid = addr2refid(&ep->sin); +# ifdef WORDS_BIGENDIAN + if (IS_IPV6(&ep->sin)) { + ep->old_refid = BYTESWAP32(ep->addr_refid); + } +# endif /* link at tail so ntpdc -c ifstats index increases each row */ LINK_TAIL_SLIST(ep_list, ep, elink, endpt); ninterfaces++; @@ -843,101 +822,26 @@ add_interface( ? &mc4_list : &mc6_list; - if (AF_INET6 == ep->family) { - ep_local = - IN6_IS_ADDR_LINKLOCAL(PSOCK_ADDR6(&ep->sin)) || - IN6_IS_ADDR_SITELOCAL(PSOCK_ADDR6(&ep->sin)); - ep_univ_iid = IS_IID_UNIV(&ep->sin); - ep_privacy = !!(INT_PRIVACY & ep->flags); - } else { - ep_local = FALSE; - ep_univ_iid = FALSE; - ep_privacy = FALSE; - } - DPRINTF(4, ("add_interface mcast-capable %s%s%s%s\n", - stoa(&ep->sin), - (ep_local) ? " link/scope-local" : "", - (ep_univ_iid) ? " univ-IID" : "", - (ep_privacy) ? " privacy" : "")); /* - * If we have multiple local addresses on the same network - * interface, and some are link- or site-local, do not multicast - * out from the link-/site-local addresses by default, to avoid - * duplicate manycastclient associations between v6 peers using - * link-local and global addresses. link-local can still be - * chosen using "nic ignore myv6globalprefix::/64". - * Similarly, if we have multiple global addresses from the same - * prefix on the same network interface, multicast from one, - * preferring EUI-64, then static, then least RFC 4941 privacy - * addresses. + * If we have multiple global addresses from the same prefix + * on the same network interface, multicast from one. */ for (scan = *pmclisthead; scan != NULL; scan = scan_next) { scan_next = scan->mclink; - if (ep->family != scan->family) - continue; - if (strcmp(ep->name, scan->name)) + if ( ep->family != scan->family + || ep->ifindex != scan->ifindex) { continue; + } same_subnet = addr_samesubnet(&ep->sin, &ep->mask, &scan->sin, &scan->mask); - if (AF_INET6 == ep->family) { - addr = &scan->sin; - scan_local = - IN6_IS_ADDR_LINKLOCAL(PSOCK_ADDR6(addr)) || - IN6_IS_ADDR_SITELOCAL(PSOCK_ADDR6(addr)); - scan_univ_iid = IS_IID_UNIV(addr); - scan_privacy = !!(INT_PRIVACY & scan->flags); - } else { - scan_local = FALSE; - scan_univ_iid = FALSE; - scan_privacy = FALSE; - } - DPRINTF(4, ("add_interface mcast-capable scan %s%s%s%s\n", - stoa(&scan->sin), - (scan_local) ? " link/scope-local" : "", - (scan_univ_iid) ? " univ-IID" : "", - (scan_privacy) ? " privacy" : "")); - if ((ep_local && !scan_local) || (same_subnet && - ((ep_privacy && !scan_privacy) || - (!ep_univ_iid && scan_univ_iid)))) { - DPRINTF(4, ("did not add %s to %s of IPv6 multicast-capable list which already has %s\n", - stoa(&ep->sin), - (ep_local) - ? "tail" - : "head", - stoa(&scan->sin))); + if (same_subnet) { + DPRINTF(4, ("did not add %s to multicast-capable list" + "which already has %s\n", + stoa(&ep->sin), stoa(&scan->sin))); return; } - if ((scan_local && !ep_local) || (same_subnet && - ((scan_privacy && !ep_privacy) || - (!scan_univ_iid && ep_univ_iid)))) { - UNLINK_SLIST(unlinked, *pmclisthead, - scan, mclink, endpt); - DPRINTF(4, ("%s %s from IPv6 multicast-capable list to add %s\n", - (unlinked != scan) - ? "Failed to remove" - : "removed", - stoa(&scan->sin), stoa(&ep->sin))); - } } - /* - * Add link/site local at the tail of the multicast- - * capable unicast interfaces list, so that ntpd will - * send from global addresses before link-/site-local - * ones. - */ - if (ep_local) - LINK_TAIL_SLIST(*pmclisthead, ep, mclink, endpt); - else - LINK_SLIST(*pmclisthead, ep, mclink); - DPRINTF(4, ("added %s to %s of IPv%s multicast-capable unicast local address list\n", - stoa(&ep->sin), - (ep_local) - ? "tail" - : "head", - (AF_INET == ep->family) - ? "4" - : "6")); - + LINK_SLIST(*pmclisthead, ep, mclink); if (INVALID_SOCKET == ep->fd) return; @@ -987,6 +891,7 @@ remove_interface( endpt * unlinked; endpt ** pmclisthead; sockaddr_u resmask; + int/*BOOL*/ success; UNLINK_SLIST(unlinked, ep_list, ep, elink, endpt); if (!ep->ignore_packets && INT_MULTICAST & ep->flags) { @@ -1007,7 +912,9 @@ remove_interface( if (ep->fd != INVALID_SOCKET) { msyslog(LOG_INFO, - "Deleting interface #%d %s, %s#%d, interface stats: received=%ld, sent=%ld, dropped=%ld, active_time=%ld secs", + "Deleting %d %s, [%s]:%hd, stats:" + " received=%ld, sent=%ld, dropped=%ld," + " active_time=%ld secs", ep->ifnum, ep->name, stoa(&ep->sin), @@ -1016,10 +923,7 @@ remove_interface( ep->sent, ep->notsent, current_time - ep->starttime); -# ifdef HAVE_IO_COMPLETION_PORT - io_completion_port_remove_socket(ep->fd, ep); -# endif - close_and_delete_fd_from_list(ep->fd); + close_and_delete_fd_from_list(ep->fd, ep); ep->fd = INVALID_SOCKET; } @@ -1027,10 +931,7 @@ remove_interface( msyslog(LOG_INFO, "stop listening for broadcasts to %s on interface #%d %s", stoa(&ep->bcast), ep->ifnum, ep->name); -# ifdef HAVE_IO_COMPLETION_PORT - io_completion_port_remove_socket(ep->bfd, ep); -# endif - close_and_delete_fd_from_list(ep->bfd); + close_and_delete_fd_from_list(ep->bfd, ep); ep->bfd = INVALID_SOCKET; } # ifdef HAVE_IO_COMPLETION_PORT @@ -1042,8 +943,14 @@ remove_interface( /* remove restrict interface entry */ SET_HOSTMASK(&resmask, AF(&ep->sin)); - hack_restrict(RESTRICT_REMOVEIF, &ep->sin, &resmask, - -3, RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0); + success = hack_restrict(RESTRICT_REMOVEIF, &ep->sin, &resmask, 0, + RESM_NTPONLY | RESM_INTERFACE, 0, 0); + if (!success) { + msyslog(LOG_ERR, + "unable to remove self-restriction for %s", + stoa(&ep->sin)); + } + } @@ -1073,7 +980,7 @@ create_wildcards( #endif sockaddr_u wildaddr; nic_rule_action action; - struct interface * wildif; + endpt * wildif; /* * silence "potentially uninitialized" warnings from VC9 @@ -1404,9 +1311,6 @@ convert_isc_if( u_short port ) { - const u_char v6loop[16] = {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1}; - strlcpy(itf->name, isc_if->name, sizeof(itf->name)); itf->ifindex = isc_if->ifindex; itf->family = (u_short)isc_if->af; @@ -1456,15 +1360,8 @@ convert_isc_if( * Clear the loopback flag if the address is not localhost. * http://bugs.ntp.org/1683 */ - if (INT_LOOPBACK & itf->flags) { - if (AF_INET == itf->family) { - if (127 != (SRCADR(&itf->sin) >> 24)) - itf->flags &= ~INT_LOOPBACK; - } else { - if (memcmp(v6loop, NSRCADR6(&itf->sin), - sizeof(NSRCADR6(&itf->sin)))) - itf->flags &= ~INT_LOOPBACK; - } + if ((INT_LOOPBACK & itf->flags) && !IS_LOOPBACK_ADDR(&itf->sin)) { + itf->flags &= ~INT_LOOPBACK; } } @@ -1480,33 +1377,33 @@ convert_isc_if( */ static int refresh_interface( - struct interface * interface + endpt * iface ) { #ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES - if (interface->fd != INVALID_SOCKET) { - int bcast = (interface->flags & INT_BCASTXMIT) != 0; + if (iface->fd != INVALID_SOCKET) { + int bcast = (iface->flags & INT_BCASTXMIT) != 0; /* as we forcibly close() the socket remove the broadcast permission indication */ if (bcast) - socket_broadcast_disable(interface, &interface->sin); + socket_broadcast_disable(iface, &iface->sin); - close_and_delete_fd_from_list(interface->fd); + close_and_delete_fd_from_list(iface->fd); /* create new socket picking up a new first hop binding at connect() time */ - interface->fd = open_socket(&interface->sin, - bcast, 0, interface); + iface->fd = open_socket(&iface->sin, + bcast, 0, iface); /* * reset TTL indication so TTL is is set again * next time around */ - interface->last_ttl = 0; - return (interface->fd != INVALID_SOCKET); + iface->last_ttl = 0; + return (iface->fd != INVALID_SOCKET); } else return 0; /* invalid sockets are not refreshable */ #else /* !OS_MISSES_SPECIFIC_ROUTE_UPDATES */ - return (interface->fd != INVALID_SOCKET); + return (iface->fd != INVALID_SOCKET); #endif /* !OS_MISSES_SPECIFIC_ROUTE_UPDATES */ } @@ -1516,20 +1413,21 @@ refresh_interface( void interface_update( interface_receiver_t receiver, - void * data) + void * data + ) { int new_interface_found; - if (disable_dynamic_updates) + if (scan_addrs_once) { return; - + } BLOCKIO(); new_interface_found = update_interfaces(NTP_PORT, receiver, data); UNBLOCKIO(); - if (!new_interface_found) + if (!new_interface_found) { return; - + } #ifdef DEBUG msyslog(LOG_DEBUG, "new interface(s) found: waking up resolver"); #endif @@ -1552,13 +1450,11 @@ sau_from_netaddr( switch (pna->family) { case AF_INET: - memcpy(&psau->sa4.sin_addr, &pna->type.in, - sizeof(psau->sa4.sin_addr)); + psau->sa4.sin_addr = pna->type.in; break; case AF_INET6: - memcpy(&psau->sa6.sin6_addr, &pna->type.in6, - sizeof(psau->sa6.sin6_addr)); + psau->sa6.sin6_addr = pna->type.in6; break; } } @@ -1581,6 +1477,30 @@ is_wildcard_addr( } +isc_boolean_t +is_linklocal( + sockaddr_u * psau +) +{ + struct in6_addr * p6addr; + + if (IS_IPV6(psau)) { + p6addr = &psau->sa6.sin6_addr; + if ( IN6_IS_ADDR_LINKLOCAL(p6addr) + || IN6_IS_ADDR_SITELOCAL(p6addr)) { + + return TRUE; + } + } else if (IS_IPV4(psau)) { + /* autoconf are link-local 169.254.0.0/16 */ + if (IS_AUTOCONF(psau)) { + return TRUE; + } + } + return FALSE; +} + + #ifdef OS_NEEDS_REUSEADDR_FOR_IFADDRBIND /* * enable/disable re-use of wildcard address socket @@ -1591,7 +1511,7 @@ set_wildcard_reuse( int on ) { - struct interface *any; + endpt *any; SOCKET fd = INVALID_SOCKET; any = ANY_INTERFACE_BYFAM(family); @@ -1722,13 +1642,18 @@ is_valid( * * toggle configuration phase * - * Phase 1: + * Phase 1a: * forall currently existing interfaces * if address is known: * drop socket - rebind again * * if address is NOT known: - * attempt to create a new interface entry + * Add address to list of new addresses + * + * Phase 1b: + * Scan the list of new addresses marking IPv6 link-local addresses + * which also have a global v6 address using the same OS ifindex. + * Attempt to create a new interface entry * * Phase 2: * forall currently known non MCAST and WILDCARD interfaces @@ -1759,17 +1684,22 @@ update_interfaces( endpt enumep; endpt * ep; endpt * next_ep; + endpt * newaddrs; + endpt * newaddrs_tail; + endpt * ep2; DPRINTF(3, ("update_interfaces(%d)\n", port)); /* - * phase one - scan interfaces - * - create those that are not found - * - update those that are found + * phase 1a - scan OS local addresses + * - update those that ntpd already knows + * - build a list of newly-discovered addresses. */ new_interface_found = FALSE; + nonlocal_v4_addr_up = nonlocal_v6_addr_up = FALSE; iter = NULL; + newaddrs = newaddrs_tail = NULL; result = isc_interfaceiter_create(mctx, &iter); if (result != ISC_R_SUCCESS) @@ -1787,9 +1717,9 @@ update_interfaces( result = isc_interfaceiter_current(iter, &isc_if); - if (result != ISC_R_SUCCESS) + if (result != ISC_R_SUCCESS) { break; - + } /* See if we have a valid family to use */ family = isc_if.address.family; if (AF_INET != family && AF_INET6 != family) @@ -1855,6 +1785,19 @@ update_interfaces( continue; /* + * Keep track of having non-linklocal connectivity + * for IPv4 and IPv6 so we don't solicit pool hosts + * when it can't work. + */ + if ( !(INT_LOOPBACK & enumep.flags) + && !is_linklocal(&enumep.sin)) { + if (IS_IPV6(&enumep.sin)) { + nonlocal_v6_addr_up = TRUE; + } else { + nonlocal_v4_addr_up = TRUE; + } + } + /* * map to local *address* in order to map all duplicate * interfaces to an endpt structure with the appropriate * socket. Our name space is (ip-address), NOT @@ -1862,107 +1805,132 @@ update_interfaces( */ ep = getinterface(&enumep.sin, INT_WILDCARD); - if (ep != NULL && refresh_interface(ep)) { - /* - * found existing and up to date interface - - * mark present. - */ - if (ep->phase != sys_interphase) { - /* - * On a new round we reset the name so - * the interface name shows up again if - * this address is no longer shared. - * We reset ignore_packets from the - * new prototype to respect any runtime - * changes to the nic rules. - */ - strlcpy(ep->name, enumep.name, - sizeof(ep->name)); - ep->ignore_packets = - enumep.ignore_packets; + if (NULL == ep) { + ep = emalloc(sizeof(*ep)); + memcpy(ep, &enumep, sizeof(*ep)); + if (NULL != newaddrs_tail) { + newaddrs_tail->elink = ep; + newaddrs_tail = ep; } else { - /* name collision - rename interface */ - strlcpy(ep->name, "*multiple*", - sizeof(ep->name)); + newaddrs_tail = newaddrs = ep; } + continue; + } - DPRINT_INTERFACE(4, (ep, "updating ", - " present\n")); - - if (ep->ignore_packets != - enumep.ignore_packets) { - /* - * We have conflicting configurations - * for the interface address. This is - * caused by using -I <interfacename> - * for an interface that shares its - * address with other interfaces. We - * can not disambiguate incoming - * packets delivered to this socket - * without extra syscalls/features. - * These are not (commonly) available. - * Note this is a more unusual - * configuration where several - * interfaces share an address but - * filtering via interface name is - * attempted. We resolve the - * configuration conflict by disabling - * the processing of received packets. - * This leads to no service on the - * interface address where the conflict - * occurs. - */ - msyslog(LOG_ERR, - "WARNING: conflicting enable configuration for interfaces %s and %s for address %s - unsupported configuration - address DISABLED", - enumep.name, ep->name, - stoa(&enumep.sin)); - - ep->ignore_packets = ISC_TRUE; - } + if (!refresh_interface(ep)) { + /* + * Refreshing failed, we will delete the endpt + * in phase 2 because it was not marked current. + * We can bind to the address as the refresh + * code already closed the endpt's socket. + */ + continue; + } + /* + * found existing and up to date interface - + * mark present. + */ + if (ep->phase != sys_interphase) { + /* + * On a new round we reset the name so + * the interface name shows up again if + * this address is no longer shared. + * We reset ignore_packets from the + * new prototype to respect any runtime + * changes to the nic rules. + */ + strlcpy(ep->name, enumep.name, sizeof(ep->name)); + ep->ignore_packets = enumep.ignore_packets; + } else { + /* + * DLH: else branch might be dead code from + * when both address and name were compared. + */ + msyslog(LOG_INFO, "%s on %u %s -> *multiple*", + stoa(&ep->sin), ep->ifnum, ep->name); + /* name collision - rename interface */ + strlcpy(ep->name, "*multiple*", sizeof(ep->name)); + } - ep->phase = sys_interphase; + DPRINT_INTERFACE(4, (ep, "updating ", " present\n")); - ifi.action = IFS_EXISTS; - ifi.ep = ep; - if (receiver != NULL) - (*receiver)(data, &ifi); - } else { + if (ep->ignore_packets != enumep.ignore_packets) { /* - * This is new or refreshing failed - add to - * our interface list. If refreshing failed we - * will delete the interface structure in phase - * 2 as the interface was not marked current. - * We can bind to the address as the refresh - * code already closed the offending socket + * We have conflicting configurations for the + * address. This can happen with + * -I <interfacename> on the command line for an + * interface that shares its address with other + * interfaces. We cannot disambiguate incoming + * packets delivered to this socket without extra + * syscalls/features. Note this is an unusual + * configuration where several interfaces share + * an address but filtering via interface name is + * attempted. We resolve the config conflict by + * disabling the processing of received packets. + * This leads to no service on the address where + * the conflict occurs. */ - ep = create_interface(port, &enumep); - - if (ep != NULL) { - ifi.action = IFS_CREATED; - ifi.ep = ep; - if (receiver != NULL) - (*receiver)(data, &ifi); - - new_interface_found = TRUE; - DPRINT_INTERFACE(3, - (ep, "updating ", - " new - created\n")); - } else { - DPRINT_INTERFACE(3, - (&enumep, "updating ", - " new - creation FAILED")); + msyslog(LOG_WARNING, + "conflicting listen configuration between" + " %s and %s for %s, disabled", + enumep.name, ep->name, stoa(&enumep.sin)); - msyslog(LOG_INFO, - "failed to init interface for address %s", - stoa(&enumep.sin)); - continue; - } + ep->ignore_packets = TRUE; + } + + ep->phase = sys_interphase; + + ifi.action = IFS_EXISTS; + ifi.ep = ep; + if (receiver != NULL) { + (*receiver)(data, &ifi); } } isc_interfaceiter_destroy(&iter); /* + * Phase 1b + */ + for (ep = newaddrs; ep != NULL; ep = ep->elink) { + if (IS_IPV6(&ep->sin) && is_linklocal(&ep->sin)) { + for (ep2 = newaddrs; ep2 != NULL; ep2 = ep2->elink) { + if ( IS_IPV6(&ep2->sin) + && ep != ep2 + && !is_linklocal(&ep2->sin)) { + + ep->flags |= INT_LL_OF_GLOB; + break; + } + } + } + } + for (ep2 = newaddrs; ep2 != NULL; ep2 = next_ep) { + next_ep = ep2->elink; + ep2->elink = NULL; + ep = create_interface(port, ep2); + if (ep != NULL) { + ifi.action = IFS_CREATED; + ifi.ep = ep; + if (receiver != NULL) { + (*receiver)(data, &ifi); + } + new_interface_found = TRUE; + DPRINT_INTERFACE(3, + (ep, "updating ", " new - created\n")); + } + else { + DPRINT_INTERFACE(3, + (ep, "updating ", " new - FAILED")); + + msyslog(LOG_ERR, + "cannot bind address %s", + stoa(&ep->sin)); + } + free(ep2); + } + + /* * phase 2 - delete gone interfaces - reassigning peers to * other interfaces */ @@ -1986,20 +1954,20 @@ update_interfaces( ifi.action = IFS_DELETED; ifi.ep = ep; - if (receiver != NULL) + if (receiver != NULL) { (*receiver)(data, &ifi); - + } /* disconnect peers from deleted endpt. */ - while (ep->peers != NULL) + while (ep->peers != NULL) { set_peerdstadr(ep->peers, NULL); - + } /* * update globals in case we lose * a loopback interface */ - if (ep == loopback_interface) + if (ep == loopback_interface) { loopback_interface = NULL; - + } delete_interface(ep); } @@ -2011,20 +1979,20 @@ update_interfaces( */ refresh_all_peerinterfaces(); - if (sys_bclient) + if (sys_bclient) { io_setbclient(); - + } #ifdef MCAST /* * Check multicast interfaces and try to join multicast groups if - * not joined yet. - */ + * not joined yet. + */ for (ep = ep_list; ep != NULL; ep = ep->elink) { remaddr_t *entry; - if (!(INT_MCASTIF & ep->flags) || (INT_MCASTOPEN & ep->flags)) + if (!(INT_MCASTIF & ep->flags) || (INT_MCASTOPEN & ep->flags)) { continue; - + } /* Find remote address that was linked to this interface */ for (entry = remoteaddr_list; entry != NULL; @@ -2084,20 +2052,20 @@ create_sockets( * create_interface - create a new interface for a given prototype * binding the socket. */ -static struct interface * +static endpt * create_interface( - u_short port, - struct interface * protot + u_short port, + endpt * protot ) { sockaddr_u resmask; endpt * iface; + int/*BOOL*/ success; #if defined(MCAST) && defined(MULTICAST_NONEWSOCKET) remaddr_t * entry; remaddr_t * next_entry; #endif - DPRINTF(2, ("create_interface(%s#%d)\n", stoa(&protot->sin), - port)); + DPRINTF(2, ("create_interface(%s)\n", sptoa(&protot->sin))); /* build an interface */ iface = new_interface(protot); @@ -2112,16 +2080,15 @@ create_interface( if ((INT_BROADCAST & iface->flags) && iface->bfd != INVALID_SOCKET) - msyslog(LOG_INFO, "Listening on broadcast address %s#%d", - stoa((&iface->bcast)), port); + msyslog(LOG_INFO, "Listening on broadcast address %s", + sptoa(&iface->bcast)); if (INVALID_SOCKET == iface->fd && INVALID_SOCKET == iface->bfd) { - msyslog(LOG_ERR, "unable to create socket on %s (%d) for %s#%d", + msyslog(LOG_ERR, "unable to create socket on %s (%d) for %s", iface->name, iface->ifnum, - stoa((&iface->sin)), - port); + sptoa(&iface->sin)); delete_interface(iface); return NULL; } @@ -2130,8 +2097,13 @@ create_interface( * Blacklist our own addresses, no use talking to ourself */ SET_HOSTMASK(&resmask, AF(&iface->sin)); - hack_restrict(RESTRICT_FLAGS, &iface->sin, &resmask, - -4, RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0); + success = hack_restrict(RESTRICT_FLAGS, &iface->sin, &resmask, + -4, RESM_NTPONLY | RESM_INTERFACE, + RES_IGNORE, 0); + if (!success) { + msyslog(LOG_ERR, + "unable to self-restrict %s", stoa(&iface->sin)); + } /* * set globals with the first found @@ -2181,6 +2153,85 @@ create_interface( } +#ifdef DEBUG +const char * +iflags_str( + u_int32 iflags +) +{ + const size_t sz = LIB_BUFLENGTH; + char * ifs; + + LIB_GETBUF(ifs); + ifs[0] = '\0'; + + if (iflags & INT_UP) { + CLEAR_BIT_IF_DEBUG(INT_UP, iflags); + append_flagstr(ifs, sz, "up"); + } + + if (iflags & INT_PPP) { + CLEAR_BIT_IF_DEBUG(INT_PPP, iflags); + append_flagstr(ifs, sz, "ppp"); + } + + if (iflags & INT_LOOPBACK) { + CLEAR_BIT_IF_DEBUG(INT_LOOPBACK, iflags); + append_flagstr(ifs, sz, "loopback"); + } + + if (iflags & INT_BROADCAST) { + CLEAR_BIT_IF_DEBUG(INT_BROADCAST, iflags); + append_flagstr(ifs, sz, "broadcast"); + } + + if (iflags & INT_MULTICAST) { + CLEAR_BIT_IF_DEBUG(INT_MULTICAST, iflags); + append_flagstr(ifs, sz, "multicast"); + } + + if (iflags & INT_BCASTOPEN) { + CLEAR_BIT_IF_DEBUG(INT_BCASTOPEN, iflags); + append_flagstr(ifs, sz, "bcastopen"); + } + + if (iflags & INT_MCASTOPEN) { + CLEAR_BIT_IF_DEBUG(INT_MCASTOPEN, iflags); + append_flagstr(ifs, sz, "mcastopen"); + } + + if (iflags & INT_WILDCARD) { + CLEAR_BIT_IF_DEBUG(INT_WILDCARD, iflags); + append_flagstr(ifs, sz, "wildcard"); + } + + if (iflags & INT_MCASTIF) { + CLEAR_BIT_IF_DEBUG(INT_MCASTIF, iflags); + append_flagstr(ifs, sz, "mcastif"); + } + + if (iflags & INT_PRIVACY) { + CLEAR_BIT_IF_DEBUG(INT_PRIVACY, iflags); + append_flagstr(ifs, sz, "IPv6privacy"); + } + + if (iflags & INT_BCASTXMIT) { + CLEAR_BIT_IF_DEBUG(INT_BCASTXMIT, iflags); + append_flagstr(ifs, sz, "bcastxmit"); + } + + if (iflags & INT_LL_OF_GLOB) { + CLEAR_BIT_IF_DEBUG(INT_LL_OF_GLOB, iflags); + append_flagstr(ifs, sz, "linklocal-w-global"); + } + + DEBUG_INVARIANT(!iflags); + + return ifs; +} +#endif /* DEBUG */ + + #ifdef SO_EXCLUSIVEADDRUSE static void set_excladdruse( @@ -2263,8 +2314,8 @@ set_reuseaddr( */ void enable_broadcast( - struct interface * iface, - sockaddr_u * baddr + endpt * iface, + sockaddr_u * baddr ) { #ifdef OPEN_BCAST_SOCKET @@ -2280,9 +2331,9 @@ enable_broadcast( */ static isc_boolean_t socket_broadcast_enable( - struct interface * iface, - SOCKET fd, - sockaddr_u * baddr + endpt * iface, + SOCKET fd, + sockaddr_u * baddr ) { #ifdef SO_BROADCAST @@ -2314,7 +2365,7 @@ socket_broadcast_enable( */ static isc_boolean_t socket_broadcast_disable( - struct interface * iface, + endpt * iface, sockaddr_u * baddr ) { @@ -2337,15 +2388,6 @@ socket_broadcast_disable( #endif /* OPEN_BCAST_SOCKET */ -/* - * return the broadcast client flag value - */ -/*isc_boolean_t -get_broadcastclient_flag(void) -{ - return (broadcast_client_enabled); -} -*/ /* * Check to see if the address is a multicast address @@ -2381,8 +2423,8 @@ addr_ismulticast( */ void enable_multicast_if( - struct interface * iface, - sockaddr_u * maddr + endpt * iface, + sockaddr_u * maddr ) { #ifdef MCAST @@ -2526,7 +2568,7 @@ socket_multicast_enable( #ifdef MCAST static isc_boolean_t socket_multicast_disable( - struct interface * iface, + endpt * iface, sockaddr_u * maddr ) { @@ -2535,8 +2577,6 @@ socket_multicast_disable( # endif struct ip_mreq mreq; - ZERO(mreq); - if (find_addr_in_list(maddr) == NULL) { DPRINTF(4, ("socket_multicast_disable(%s): not found\n", stoa(maddr))); @@ -2546,6 +2586,7 @@ socket_multicast_disable( switch (AF(maddr)) { case AF_INET: + ZERO(mreq); mreq.imr_multiaddr = SOCK_ADDR4(maddr); mreq.imr_interface = SOCK_ADDR4(&iface->sin); if (setsockopt(iface->fd, IPPROTO_IP, @@ -2569,6 +2610,7 @@ socket_multicast_disable( * for other types of multicast addresses. For now let * the kernel figure it out. */ + ZERO(mreq6); mreq6.ipv6mr_multiaddr = SOCK_ADDR6(maddr); mreq6.ipv6mr_interface = iface->ifindex; @@ -2589,13 +2631,14 @@ socket_multicast_disable( } iface->num_mcast--; - if (!iface->num_mcast) + if (iface->num_mcast <= 0) { iface->flags &= ~INT_MCASTOPEN; - + } return ISC_TRUE; } #endif /* MCAST */ + /* * io_setbclient - open the broadcast client sockets */ @@ -2705,6 +2748,7 @@ io_setbclient(void) #endif /* OPEN_BCAST_SOCKET */ } + /* * io_unsetbclient - close the broadcast client sockets */ @@ -2724,10 +2768,7 @@ io_unsetbclient(void) msyslog(LOG_INFO, "stop listening for broadcasts to %s on interface #%d %s", stoa(&ep->bcast), ep->ifnum, ep->name); -# ifdef HAVE_IO_COMPLETION_PORT - io_completion_port_remove_socket(ep->bfd, ep); -# endif - close_and_delete_fd_from_list(ep->bfd); + close_and_delete_fd_from_list(ep->bfd, ep); ep->bfd = INVALID_SOCKET; } ep->flags &= ~INT_BCASTOPEN; @@ -2735,6 +2776,7 @@ io_unsetbclient(void) broadcast_client_enabled = ISC_FALSE; } + /* * io_multicast_add() - add multicast group address */ @@ -2755,9 +2797,6 @@ io_multicast_add( /* If we already have it we can just return */ if (NULL != find_flagged_addr_in_list(addr, INT_MCASTOPEN)) { - msyslog(LOG_INFO, - "Duplicate request found for multicast address %s", - stoa(addr)); return; } @@ -3041,9 +3080,9 @@ open_socket( #endif ) { msyslog(LOG_ERR, - "bind(%d) AF_INET%s %s#%d%s flags 0x%x failed: %m", + "bind(%d) AF_INET%s %s%s flags 0x%x failed: %m", fd, IS_IPV6(addr) ? "6" : "", - stoa(addr), SRCPORT(addr), + sptoa(addr), IS_MCAST(addr) ? " (multicast)" : "", interf->flags); } @@ -3090,9 +3129,8 @@ open_socket( } #endif - DPRINTF(4, ("bind(%d) AF_INET%s, addr %s%%%d#%d, flags 0x%x\n", - fd, IS_IPV6(addr) ? "6" : "", stoa(addr), - SCOPE(addr), SRCPORT(addr), interf->flags)); + DPRINTF(4, ("bind(%d) addr %s, flags 0x%x\n", + fd, sptoa(addr), interf->flags)); make_socket_nonblocking(fd); @@ -3123,17 +3161,16 @@ open_socket( /* XXX ELIMINATE sendpkt similar in ntpq.c, ntpdc.c, ntp_io.c, ntptrace.c */ /* - * sendpkt - send a packet to the specified destination. Maintain a - * send error cache so that only the first consecutive error for a - * destination is logged. + * sendpkt - send a packet to the specified destination from the given endpt + * except for multicast, which may be sent from several addresses. */ void sendpkt( - sockaddr_u * dest, - struct interface * ep, - int ttl, - struct pkt * pkt, - int len + sockaddr_u * dest, + endpt * ep, + int ttl, + struct pkt * pkt, + int len ) { endpt * src; @@ -3145,12 +3182,16 @@ sendpkt( l_fp org, rec, xmt; ismcast = IS_MCAST(dest); - if (!ismcast) + if (!ismcast) { src = ep; - else + } else { +#ifndef MCAST + return; +#endif src = (IS_IPV4(dest)) - ? mc4_list - : mc6_list; + ? mc4_list + : mc6_list; + } if (NULL == src) { /* @@ -3164,13 +3205,14 @@ sendpkt( } do { + if (INT_LL_OF_GLOB & src->flags) { + /* avoid duplicate multicasts on same IPv6 net */ + goto loop; + } DPRINTF(2, ("%ssendpkt(%d, dst=%s, src=%s, ttl=%d, len=%d)\n", ismcast ? "\tMCAST\t***** " : "", src->fd, stoa(dest), stoa(&src->sin), ttl, len)); #ifdef MCAST - /* - * for the moment we use the bcast option to set multicast ttl - */ if (ismcast && ttl > 0 && ttl != src->last_ttl) { /* * set the multicast ttl for outgoing packets @@ -3211,7 +3253,7 @@ sendpkt( cc = simulate_server(dest, src, pkt); #elif defined(HAVE_IO_COMPLETION_PORT) cc = io_completion_port_sendto(src, src->fd, pkt, - (size_t)len, (sockaddr_u *)&dest->sa); + (size_t)len, dest); #else cc = sendto(src->fd, (char *)pkt, (u_int)len, 0, &dest->sa, SOCKLEN(dest)); @@ -3223,6 +3265,7 @@ sendpkt( src->sent++; packets_sent++; } + loop: if (ismcast) src = src->mclink; } while (ismcast && src != NULL); @@ -3241,8 +3284,6 @@ sendpkt( FPTOD(NTOHS_FP(pkt->rootdelay)), FPTOD(NTOHS_FP(pkt->rootdisp)), pkt->refid, len - MIN_V4_PKT_LEN, (u_char *)&pkt->exten); - - return; } @@ -3261,7 +3302,7 @@ fdbits( static char buffer[256]; char * buf = buffer; - count = min(count, 255); + count = min(count, sizeof(buffer) - 1); while (count >= 0) { *buf++ = FD_ISSET(count, set) ? '#' : '-'; @@ -3334,7 +3375,7 @@ read_refclock_packet( */ rb->recv_length = buflen; rb->recv_peer = rp->srcclock; - rb->dstadr = 0; + rb->dstadr = NULL; rb->fd = fd; rb->recv_time = ts; rb->receiver = rp->clock_recv; @@ -3476,9 +3517,9 @@ fetch_timestamp( */ static inline int read_network_packet( - SOCKET fd, - struct interface * itf, - l_fp ts + SOCKET fd, + endpt * itf, + l_fp ts ) { GETSOCKNAME_SOCKLEN_TYPE fromlen; @@ -3580,23 +3621,14 @@ read_network_packet( ** Bug 2672: Some OSes (MacOSX and Linux) don't block spoofed ::1 */ - if (AF_INET6 == itf->family) { - DPRINTF(2, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n", - stoa(&rb->recv_srcadr), - IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr)), - stoa(&itf->sin), - !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin)) - )); - - if ( IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr)) - && !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin)) - ) { - packets_dropped++; - DPRINTF(2, ("DROPPING that packet\n")); - freerecvbuf(rb); - return buflen; - } - DPRINTF(2, ("processing that packet\n")); + if ( IS_IPV6(&rb->recv_srcadr) + && IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr)) + && !(INT_LOOPBACK & itf->flags)) { + + packets_dropped++; + DPRINTF(2, ("DROPPING pkt with spoofed ::1 source on %s\n", latoa(itf))); + freerecvbuf(rb); + return -1; } /* @@ -3954,8 +3986,9 @@ select_peerinterface( stoa(srcadr))); } else { ep = dstadr; - if (NULL == ep) + if (NULL == ep) { ep = wild; + } } /* * If it is a multicast address, findbcastinter() may not find @@ -3963,16 +3996,19 @@ select_peerinterface( * given to us as the wildcard (ANY_INTERFACE_CHOOSE). Either * way, try a little harder. */ - if (wild == ep) + if (wild == ep) { ep = findinterface(srcadr); + } /* * we do not bind to the wildcard interfaces for output * as our (network) source address would be undefined and * crypto will not work without knowing the own transmit address */ - if (ep != NULL && INT_WILDCARD & ep->flags) - if (!accept_wildcard_if_for_winnt) + if (ep != NULL && (INT_WILDCARD & ep->flags)) { + if (!accept_wildcard_if_for_winnt) { ep = NULL; + } + } #else /* SIM follows */ ep = loopback_interface; #endif @@ -4007,7 +4043,7 @@ findinterface( /* * findlocalinterface - find local interface corresponding to addr, - * which does not have any of flags set. If bast is nonzero, addr is + * which does not have any of flags set. If bcast is nonzero, addr is * a broadcast address. * * This code attempts to find the local sending address for an outgoing @@ -4037,21 +4073,21 @@ 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 + /* [Bug 3437] The prototype POOL peer can be AF_UNSPEC. + * 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 + * Checking the condition and failing early is probably good * advice, and even saves us some syscalls in that case. * Thanks to Miroslav Lichvar for finding this. */ - if (AF_UNSPEC == AF(addr)) + if (AF_UNSPEC == AF(addr)) { return NULL; - + } s = socket(AF(addr), SOCK_DGRAM, 0); - if (INVALID_SOCKET == s) + if (INVALID_SOCKET == s) { return NULL; - + } /* * If we are looking for broadcast interface we need to set this * socket to allow broadcast @@ -4092,14 +4128,18 @@ findlocalinterface( * See http://bugs.ntp.org/1184 and http://bugs.ntp.org/1683 * for more background. */ - if (NULL == iface || iface->ignore_packets) + if (NULL == iface || iface->ignore_packets) { iface = findclosestinterface(&saddr, flags | INT_LOOPBACK); - - /* Don't use an interface which will ignore replies */ - if (iface != NULL && iface->ignore_packets) + } + /* + * Don't select an interface which will ignore replies, or one + * dedicated to multicast receive. + */ + if ( iface != NULL + && (iface->ignore_packets || (INT_MCASTIF & iface->flags))) { iface = NULL; - + } return iface; } @@ -4169,47 +4209,40 @@ calc_addr_distance( const sockaddr_u * a2 ) { - u_int32 a1val; - u_int32 a2val; - u_int32 v4dist; - int found_greater; - int a1_greater; - int i; + u_char * pdist; + const u_char * p1; + const u_char * p2; + size_t cb; + int different; + int a1_greater; + u_int u; REQUIRE(AF(a1) == AF(a2)); ZERO_SOCK(dist); AF(dist) = AF(a1); - /* v4 can be done a bit simpler */ if (IS_IPV4(a1)) { - a1val = SRCADR(a1); - a2val = SRCADR(a2); - v4dist = (a1val > a2val) - ? a1val - a2val - : a2val - a1val; - SET_ADDR4(dist, v4dist); - - return; + pdist = ( u_char *)&NSRCADR(dist); + p1 = (const u_char *)&NSRCADR(a1); + p2 = (const u_char *)&NSRCADR(a2); + } else { + pdist = ( u_char *)&NSRCADR(dist); + p1 = (const u_char *)&NSRCADR(a1); + p2 = (const u_char *)&NSRCADR(a2); } - - found_greater = FALSE; - a1_greater = FALSE; /* suppress pot. uninit. warning */ - for (i = 0; i < (int)sizeof(NSRCADR6(a1)); i++) { - if (!found_greater && - NSRCADR6(a1)[i] != NSRCADR6(a2)[i]) { - found_greater = TRUE; - a1_greater = (NSRCADR6(a1)[i] > NSRCADR6(a2)[i]); + cb = SIZEOF_INADDR(AF(dist)); + different = FALSE; + a1_greater = FALSE; + for (u = 0; u < cb; u++) { + if (!different && p1[u] != p2[u]) { + a1_greater = (p1[u] > p2[u]); + different = TRUE; } - if (!found_greater) { - NSRCADR6(dist)[i] = 0; + if (a1_greater) { + pdist[u] = p1[u] - p2[u]; } else { - if (a1_greater) - NSRCADR6(dist)[i] = NSRCADR6(a1)[i] - - NSRCADR6(a2)[i]; - else - NSRCADR6(dist)[i] = NSRCADR6(a2)[i] - - NSRCADR6(a1)[i]; + pdist[u] = p2[u] - p1[u]; } } } @@ -4468,7 +4501,7 @@ io_closeclock( # ifdef HAVE_IO_COMPLETION_PORT io_completion_port_remove_clock_io(rio); # endif - close_and_delete_fd_from_list(rio->fd); + close_and_delete_fd_from_list(rio->fd, NULL); purge_recv_buffers_for_fd(rio->fd); rio->fd = -1; } @@ -4503,7 +4536,7 @@ kill_asyncio( maxactivefd = 0; while (fd_list != NULL) - close_and_delete_fd_from_list(fd_list->fd); + close_and_delete_fd_from_list(fd_list->fd, NULL); UNBLOCKIO(); } @@ -4531,7 +4564,8 @@ add_fd_to_list( static void close_and_delete_fd_from_list( - SOCKET fd + SOCKET fd, + endpt *ep /* req. if fd is in struct endpt */ ) { vsock_t *lsock; @@ -4545,6 +4579,11 @@ close_and_delete_fd_from_list( switch (lsock->type) { case FD_TYPE_SOCKET: + #ifdef HAVE_IO_COMPLETION_PORT + if (ep != NULL) { + io_completion_port_remove_socket(fd, ep); + } + #endif closesocket(lsock->fd); break; @@ -4635,7 +4674,7 @@ delete_interface_from_list( } -static struct interface * +static endpt * find_addr_in_list( sockaddr_u *addr ) @@ -4707,7 +4746,7 @@ localaddrtoa( static void process_routing_msgs(struct asyncio_reader *reader) { - static char * buffer; + static void * buffer; static size_t buffsz = 8192; int cnt, new, msg_type; socklen_t len; @@ -4716,16 +4755,15 @@ process_routing_msgs(struct asyncio_reader *reader) #else struct rt_msghdr rtm; char *p; + char *endp; #endif - if (disable_dynamic_updates) { + if (scan_addrs_once) { /* * discard ourselves if we are not needed any more * usually happens when running unprivileged */ - remove_asyncio_reader(reader); - delete_asyncio_reader(reader); - return; + goto disable; } if (NULL == buffer) { @@ -4758,22 +4796,20 @@ process_routing_msgs(struct asyncio_reader *reader) disable: remove_asyncio_reader(reader); delete_asyncio_reader(reader); + return; } - return; } /* * process routing message */ #ifdef HAVE_RTNETLINK - for (nh = UA_PTR(struct nlmsghdr, buffer); - NLMSG_OK(nh, cnt); - nh = NLMSG_NEXT(nh, cnt)) + for (nh = buffer; NLMSG_OK(nh, cnt); nh = NLMSG_NEXT(nh, cnt)) { msg_type = nh->nlmsg_type; #else - for (p = buffer; - (p + sizeof(struct rt_msghdr)) <= (buffer + cnt); + for (p = buffer, endp = p + cnt; + (p + sizeof(struct rt_msghdr)) <= endp; p += rtm.rtm_msglen) { memcpy(&rtm, p, sizeof(rtm)); @@ -4787,7 +4823,7 @@ process_routing_msgs(struct asyncio_reader *reader) return; } msg_type = rtm.rtm_type; -#endif +#endif /* !HAVE_RTNETLINK */ switch (msg_type) { #ifdef RTM_NEWADDR case RTM_NEWADDR: @@ -4835,7 +4871,7 @@ process_routing_msgs(struct asyncio_reader *reader) */ DPRINTF(3, ("routing message op = %d: scheduling interface update\n", msg_type)); - timer_interfacetimeout(current_time + UPDATE_GRACE); + endpt_scan_timer = UPDATE_GRACE + current_time; break; #ifdef HAVE_RTNETLINK case NLMSG_DONE: @@ -4857,14 +4893,14 @@ process_routing_msgs(struct asyncio_reader *reader) * set up routing notifications */ static void -init_async_notifications() +init_async_notifications(void) { struct asyncio_reader *reader; #ifdef HAVE_RTNETLINK int fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); struct sockaddr_nl sa; #else - int fd = socket(PF_ROUTE, SOCK_RAW, 0); + int fd = socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC); #endif if (fd < 0) { msyslog(LOG_ERR, @@ -4908,4 +4944,3 @@ init_async_notifications(void) { } #endif - diff --git a/ntpd/ntp_keyword.h b/ntpd/ntp_keyword.h index 7b3efc2cda30..7fa610bb39b9 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 2022-03-27 14:17:11 UTC diff_ignore_line + * Generated 2023-09-25 05:34:02 UTC diff_ignore_line * */ #include "ntp_scanner.h" @@ -10,7 +10,7 @@ #define LOWEST_KEYWORD_ID 258 -const char * const keyword_text[212] = { +const char * const keyword_text[213] = { /* 0 258 T_Abbrev */ "abbrev", /* 1 259 T_Age */ "age", /* 2 260 T_All */ "all", @@ -39,200 +39,201 @@ const char * const keyword_text[212] = { /* 25 283 T_Ctl */ "ctl", /* 26 284 T_Day */ "day", /* 27 285 T_Default */ "default", - /* 28 286 T_Device */ "device", - /* 29 287 T_Digest */ "digest", - /* 30 288 T_Disable */ "disable", - /* 31 289 T_Discard */ "discard", - /* 32 290 T_Dispersion */ "dispersion", - /* 33 291 T_Double */ NULL, - /* 34 292 T_Driftfile */ "driftfile", - /* 35 293 T_Drop */ "drop", - /* 36 294 T_Dscp */ "dscp", - /* 37 295 T_Ellipsis */ "...", - /* 38 296 T_Enable */ "enable", - /* 39 297 T_End */ "end", - /* 40 298 T_Epeer */ "epeer", - /* 41 299 T_False */ NULL, - /* 42 300 T_File */ "file", - /* 43 301 T_Filegen */ "filegen", - /* 44 302 T_Filenum */ "filenum", - /* 45 303 T_Flag1 */ "flag1", - /* 46 304 T_Flag2 */ "flag2", - /* 47 305 T_Flag3 */ "flag3", - /* 48 306 T_Flag4 */ "flag4", - /* 49 307 T_Flake */ "flake", - /* 50 308 T_Floor */ "floor", - /* 51 309 T_Freq */ "freq", - /* 52 310 T_Fudge */ "fudge", - /* 53 311 T_Fuzz */ "fuzz", - /* 54 312 T_Host */ "host", - /* 55 313 T_Huffpuff */ "huffpuff", - /* 56 314 T_Iburst */ "iburst", - /* 57 315 T_Ident */ "ident", - /* 58 316 T_Ignore */ "ignore", - /* 59 317 T_Ignorehash */ "ignorehash", - /* 60 318 T_Incalloc */ "incalloc", - /* 61 319 T_Incmem */ "incmem", - /* 62 320 T_Initalloc */ "initalloc", - /* 63 321 T_Initmem */ "initmem", - /* 64 322 T_Includefile */ "includefile", - /* 65 323 T_Integer */ NULL, - /* 66 324 T_Interface */ "interface", - /* 67 325 T_Intrange */ NULL, - /* 68 326 T_Io */ "io", - /* 69 327 T_Ippeerlimit */ "ippeerlimit", - /* 70 328 T_Ipv4 */ "ipv4", - /* 71 329 T_Ipv4_flag */ "-4", - /* 72 330 T_Ipv6 */ "ipv6", - /* 73 331 T_Ipv6_flag */ "-6", - /* 74 332 T_Kernel */ "kernel", - /* 75 333 T_Key */ "key", - /* 76 334 T_Keys */ "keys", - /* 77 335 T_Keysdir */ "keysdir", - /* 78 336 T_Kod */ "kod", - /* 79 337 T_Leapfile */ "leapfile", - /* 80 338 T_Leapsmearinterval */ "leapsmearinterval", - /* 81 339 T_Limited */ "limited", - /* 82 340 T_Link */ "link", - /* 83 341 T_Listen */ "listen", - /* 84 342 T_Logconfig */ "logconfig", - /* 85 343 T_Logfile */ "logfile", - /* 86 344 T_Loopstats */ "loopstats", - /* 87 345 T_Lowpriotrap */ "lowpriotrap", - /* 88 346 T_Manycastclient */ "manycastclient", - /* 89 347 T_Manycastserver */ "manycastserver", - /* 90 348 T_Mask */ "mask", - /* 91 349 T_Maxage */ "maxage", - /* 92 350 T_Maxclock */ "maxclock", - /* 93 351 T_Maxdepth */ "maxdepth", - /* 94 352 T_Maxdist */ "maxdist", - /* 95 353 T_Maxmem */ "maxmem", - /* 96 354 T_Maxpoll */ "maxpoll", - /* 97 355 T_Mdnstries */ "mdnstries", - /* 98 356 T_Mem */ "mem", - /* 99 357 T_Memlock */ "memlock", - /* 100 358 T_Minclock */ "minclock", - /* 101 359 T_Mindepth */ "mindepth", - /* 102 360 T_Mindist */ "mindist", - /* 103 361 T_Minimum */ "minimum", - /* 104 362 T_Minjitter */ "minjitter", - /* 105 363 T_Minpoll */ "minpoll", - /* 106 364 T_Minsane */ "minsane", - /* 107 365 T_Mode */ "mode", - /* 108 366 T_Mode7 */ "mode7", - /* 109 367 T_Monitor */ "monitor", - /* 110 368 T_Month */ "month", - /* 111 369 T_Mru */ "mru", - /* 112 370 T_Mssntp */ "mssntp", - /* 113 371 T_Multicastclient */ "multicastclient", - /* 114 372 T_Nic */ "nic", - /* 115 373 T_Nolink */ "nolink", - /* 116 374 T_Nomodify */ "nomodify", - /* 117 375 T_Nomrulist */ "nomrulist", - /* 118 376 T_None */ "none", - /* 119 377 T_Nonvolatile */ "nonvolatile", - /* 120 378 T_Noepeer */ "noepeer", - /* 121 379 T_Nopeer */ "nopeer", - /* 122 380 T_Noquery */ "noquery", - /* 123 381 T_Noselect */ "noselect", - /* 124 382 T_Noserve */ "noserve", - /* 125 383 T_Notrap */ "notrap", - /* 126 384 T_Notrust */ "notrust", - /* 127 385 T_Ntp */ "ntp", - /* 128 386 T_Ntpport */ "ntpport", - /* 129 387 T_NtpSignDsocket */ "ntpsigndsocket", - /* 130 388 T_Orphan */ "orphan", - /* 131 389 T_Orphanwait */ "orphanwait", - /* 132 390 T_PCEdigest */ "peer_clear_digest_early", - /* 133 391 T_Panic */ "panic", - /* 134 392 T_Peer */ "peer", - /* 135 393 T_Peerstats */ "peerstats", - /* 136 394 T_Phone */ "phone", - /* 137 395 T_Pid */ "pid", - /* 138 396 T_Pidfile */ "pidfile", - /* 139 397 T_Poll */ "poll", - /* 140 398 T_PollSkewList */ "pollskewlist", - /* 141 399 T_Pool */ "pool", - /* 142 400 T_Port */ "port", - /* 143 401 T_PpsData */ "ppsdata", - /* 144 402 T_Preempt */ "preempt", - /* 145 403 T_Prefer */ "prefer", - /* 146 404 T_Protostats */ "protostats", - /* 147 405 T_Pw */ "pw", - /* 148 406 T_Randfile */ "randfile", - /* 149 407 T_Rawstats */ "rawstats", - /* 150 408 T_Refid */ "refid", - /* 151 409 T_Requestkey */ "requestkey", - /* 152 410 T_Reset */ "reset", - /* 153 411 T_Restrict */ "restrict", - /* 154 412 T_Revoke */ "revoke", - /* 155 413 T_Rlimit */ "rlimit", - /* 156 414 T_Saveconfigdir */ "saveconfigdir", - /* 157 415 T_Server */ "server", - /* 158 416 T_Serverresponse */ "serverresponse", - /* 159 417 T_ServerresponseFuzz */ NULL, - /* 160 418 T_Setvar */ "setvar", - /* 161 419 T_Source */ "source", - /* 162 420 T_Stacksize */ "stacksize", - /* 163 421 T_Statistics */ "statistics", - /* 164 422 T_Stats */ "stats", - /* 165 423 T_Statsdir */ "statsdir", - /* 166 424 T_Step */ "step", - /* 167 425 T_Stepback */ "stepback", - /* 168 426 T_Stepfwd */ "stepfwd", - /* 169 427 T_Stepout */ "stepout", - /* 170 428 T_Stratum */ "stratum", - /* 171 429 T_String */ NULL, - /* 172 430 T_Sys */ "sys", - /* 173 431 T_Sysstats */ "sysstats", - /* 174 432 T_Tick */ "tick", - /* 175 433 T_Time1 */ "time1", - /* 176 434 T_Time2 */ "time2", - /* 177 435 T_TimeData */ "timedata", - /* 178 436 T_Timer */ "timer", - /* 179 437 T_Timingstats */ "timingstats", - /* 180 438 T_Tinker */ "tinker", - /* 181 439 T_Tos */ "tos", - /* 182 440 T_Trap */ "trap", - /* 183 441 T_True */ "true", - /* 184 442 T_Trustedkey */ "trustedkey", - /* 185 443 T_Ttl */ "ttl", - /* 186 444 T_Type */ "type", - /* 187 445 T_U_int */ NULL, - /* 188 446 T_UEcrypto */ "unpeer_crypto_early", - /* 189 447 T_UEcryptonak */ "unpeer_crypto_nak_early", - /* 190 448 T_UEdigest */ "unpeer_digest_early", - /* 191 449 T_Unconfig */ "unconfig", - /* 192 450 T_Unpeer */ "unpeer", - /* 193 451 T_Version */ "version", - /* 194 452 T_WanderThreshold */ NULL, - /* 195 453 T_Week */ "week", - /* 196 454 T_Wildcard */ "wildcard", - /* 197 455 T_Xleave */ "xleave", - /* 198 456 T_Xmtnonce */ "xmtnonce", - /* 199 457 T_Year */ "year", - /* 200 458 T_Flag */ NULL, - /* 201 459 T_EOC */ NULL, - /* 202 460 T_Simulate */ "simulate", - /* 203 461 T_Beep_Delay */ "beep_delay", - /* 204 462 T_Sim_Duration */ "simulation_duration", - /* 205 463 T_Server_Offset */ "server_offset", - /* 206 464 T_Duration */ "duration", - /* 207 465 T_Freq_Offset */ "freq_offset", - /* 208 466 T_Wander */ "wander", - /* 209 467 T_Jitter */ "jitter", - /* 210 468 T_Prop_Delay */ "prop_delay", - /* 211 469 T_Proc_Delay */ "proc_delay" + /* 28 286 T_Delrestrict */ "delrestrict", + /* 29 287 T_Device */ "device", + /* 30 288 T_Digest */ "digest", + /* 31 289 T_Disable */ "disable", + /* 32 290 T_Discard */ "discard", + /* 33 291 T_Dispersion */ "dispersion", + /* 34 292 T_Double */ NULL, + /* 35 293 T_Driftfile */ "driftfile", + /* 36 294 T_Drop */ "drop", + /* 37 295 T_Dscp */ "dscp", + /* 38 296 T_Ellipsis */ "...", + /* 39 297 T_Enable */ "enable", + /* 40 298 T_End */ "end", + /* 41 299 T_Epeer */ "epeer", + /* 42 300 T_False */ NULL, + /* 43 301 T_File */ "file", + /* 44 302 T_Filegen */ "filegen", + /* 45 303 T_Filenum */ "filenum", + /* 46 304 T_Flag1 */ "flag1", + /* 47 305 T_Flag2 */ "flag2", + /* 48 306 T_Flag3 */ "flag3", + /* 49 307 T_Flag4 */ "flag4", + /* 50 308 T_Flake */ "flake", + /* 51 309 T_Floor */ "floor", + /* 52 310 T_Freq */ "freq", + /* 53 311 T_Fudge */ "fudge", + /* 54 312 T_Fuzz */ "fuzz", + /* 55 313 T_Host */ "host", + /* 56 314 T_Huffpuff */ "huffpuff", + /* 57 315 T_Iburst */ "iburst", + /* 58 316 T_Ident */ "ident", + /* 59 317 T_Ignore */ "ignore", + /* 60 318 T_Ignorehash */ "ignorehash", + /* 61 319 T_Incalloc */ "incalloc", + /* 62 320 T_Incmem */ "incmem", + /* 63 321 T_Initalloc */ "initalloc", + /* 64 322 T_Initmem */ "initmem", + /* 65 323 T_Includefile */ "includefile", + /* 66 324 T_Integer */ NULL, + /* 67 325 T_Interface */ "interface", + /* 68 326 T_Intrange */ NULL, + /* 69 327 T_Io */ "io", + /* 70 328 T_Ippeerlimit */ "ippeerlimit", + /* 71 329 T_Ipv4 */ "ipv4", + /* 72 330 T_Ipv4_flag */ "-4", + /* 73 331 T_Ipv6 */ "ipv6", + /* 74 332 T_Ipv6_flag */ "-6", + /* 75 333 T_Kernel */ "kernel", + /* 76 334 T_Key */ "key", + /* 77 335 T_Keys */ "keys", + /* 78 336 T_Keysdir */ "keysdir", + /* 79 337 T_Kod */ "kod", + /* 80 338 T_Leapfile */ "leapfile", + /* 81 339 T_Leapsmearinterval */ "leapsmearinterval", + /* 82 340 T_Limited */ "limited", + /* 83 341 T_Link */ "link", + /* 84 342 T_Listen */ "listen", + /* 85 343 T_Logconfig */ "logconfig", + /* 86 344 T_Logfile */ "logfile", + /* 87 345 T_Loopstats */ "loopstats", + /* 88 346 T_Lowpriotrap */ "lowpriotrap", + /* 89 347 T_Manycastclient */ "manycastclient", + /* 90 348 T_Manycastserver */ "manycastserver", + /* 91 349 T_Mask */ "mask", + /* 92 350 T_Maxage */ "maxage", + /* 93 351 T_Maxclock */ "maxclock", + /* 94 352 T_Maxdepth */ "maxdepth", + /* 95 353 T_Maxdist */ "maxdist", + /* 96 354 T_Maxmem */ "maxmem", + /* 97 355 T_Maxpoll */ "maxpoll", + /* 98 356 T_Mdnstries */ "mdnstries", + /* 99 357 T_Mem */ "mem", + /* 100 358 T_Memlock */ "memlock", + /* 101 359 T_Minclock */ "minclock", + /* 102 360 T_Mindepth */ "mindepth", + /* 103 361 T_Mindist */ "mindist", + /* 104 362 T_Minimum */ "minimum", + /* 105 363 T_Minjitter */ "minjitter", + /* 106 364 T_Minpoll */ "minpoll", + /* 107 365 T_Minsane */ "minsane", + /* 108 366 T_Mode */ "mode", + /* 109 367 T_Mode7 */ "mode7", + /* 110 368 T_Monitor */ "monitor", + /* 111 369 T_Month */ "month", + /* 112 370 T_Mru */ "mru", + /* 113 371 T_Mssntp */ "mssntp", + /* 114 372 T_Multicastclient */ "multicastclient", + /* 115 373 T_Nic */ "nic", + /* 116 374 T_Nolink */ "nolink", + /* 117 375 T_Nomodify */ "nomodify", + /* 118 376 T_Nomrulist */ "nomrulist", + /* 119 377 T_None */ "none", + /* 120 378 T_Nonvolatile */ "nonvolatile", + /* 121 379 T_Noepeer */ "noepeer", + /* 122 380 T_Nopeer */ "nopeer", + /* 123 381 T_Noquery */ "noquery", + /* 124 382 T_Noselect */ "noselect", + /* 125 383 T_Noserve */ "noserve", + /* 126 384 T_Notrap */ "notrap", + /* 127 385 T_Notrust */ "notrust", + /* 128 386 T_Ntp */ "ntp", + /* 129 387 T_Ntpport */ "ntpport", + /* 130 388 T_NtpSignDsocket */ "ntpsigndsocket", + /* 131 389 T_Orphan */ "orphan", + /* 132 390 T_Orphanwait */ "orphanwait", + /* 133 391 T_PCEdigest */ "peer_clear_digest_early", + /* 134 392 T_Panic */ "panic", + /* 135 393 T_Peer */ "peer", + /* 136 394 T_Peerstats */ "peerstats", + /* 137 395 T_Phone */ "phone", + /* 138 396 T_Pid */ "pid", + /* 139 397 T_Pidfile */ "pidfile", + /* 140 398 T_Poll */ "poll", + /* 141 399 T_PollSkewList */ "pollskewlist", + /* 142 400 T_Pool */ "pool", + /* 143 401 T_Port */ "port", + /* 144 402 T_PpsData */ "ppsdata", + /* 145 403 T_Preempt */ "preempt", + /* 146 404 T_Prefer */ "prefer", + /* 147 405 T_Protostats */ "protostats", + /* 148 406 T_Pw */ "pw", + /* 149 407 T_Randfile */ "randfile", + /* 150 408 T_Rawstats */ "rawstats", + /* 151 409 T_Refid */ "refid", + /* 152 410 T_Requestkey */ "requestkey", + /* 153 411 T_Reset */ "reset", + /* 154 412 T_Restrict */ "restrict", + /* 155 413 T_Revoke */ "revoke", + /* 156 414 T_Rlimit */ "rlimit", + /* 157 415 T_Saveconfigdir */ "saveconfigdir", + /* 158 416 T_Server */ "server", + /* 159 417 T_Serverresponse */ "serverresponse", + /* 160 418 T_ServerresponseFuzz */ NULL, + /* 161 419 T_Setvar */ "setvar", + /* 162 420 T_Source */ "source", + /* 163 421 T_Stacksize */ "stacksize", + /* 164 422 T_Statistics */ "statistics", + /* 165 423 T_Stats */ "stats", + /* 166 424 T_Statsdir */ "statsdir", + /* 167 425 T_Step */ "step", + /* 168 426 T_Stepback */ "stepback", + /* 169 427 T_Stepfwd */ "stepfwd", + /* 170 428 T_Stepout */ "stepout", + /* 171 429 T_Stratum */ "stratum", + /* 172 430 T_String */ NULL, + /* 173 431 T_Sys */ "sys", + /* 174 432 T_Sysstats */ "sysstats", + /* 175 433 T_Tick */ "tick", + /* 176 434 T_Time1 */ "time1", + /* 177 435 T_Time2 */ "time2", + /* 178 436 T_TimeData */ "timedata", + /* 179 437 T_Timer */ "timer", + /* 180 438 T_Timingstats */ "timingstats", + /* 181 439 T_Tinker */ "tinker", + /* 182 440 T_Tos */ "tos", + /* 183 441 T_Trap */ "trap", + /* 184 442 T_True */ "true", + /* 185 443 T_Trustedkey */ "trustedkey", + /* 186 444 T_Ttl */ "ttl", + /* 187 445 T_Type */ "type", + /* 188 446 T_U_int */ NULL, + /* 189 447 T_UEcrypto */ "unpeer_crypto_early", + /* 190 448 T_UEcryptonak */ "unpeer_crypto_nak_early", + /* 191 449 T_UEdigest */ "unpeer_digest_early", + /* 192 450 T_Unconfig */ "unconfig", + /* 193 451 T_Unpeer */ "unpeer", + /* 194 452 T_Version */ "version", + /* 195 453 T_WanderThreshold */ NULL, + /* 196 454 T_Week */ "week", + /* 197 455 T_Wildcard */ "wildcard", + /* 198 456 T_Xleave */ "xleave", + /* 199 457 T_Xmtnonce */ "xmtnonce", + /* 200 458 T_Year */ "year", + /* 201 459 T_Flag */ NULL, + /* 202 460 T_EOC */ NULL, + /* 203 461 T_Simulate */ "simulate", + /* 204 462 T_Beep_Delay */ "beep_delay", + /* 205 463 T_Sim_Duration */ "simulation_duration", + /* 206 464 T_Server_Offset */ "server_offset", + /* 207 465 T_Duration */ "duration", + /* 208 466 T_Freq_Offset */ "freq_offset", + /* 209 467 T_Wander */ "wander", + /* 210 468 T_Jitter */ "jitter", + /* 211 469 T_Prop_Delay */ "prop_delay", + /* 212 470 T_Proc_Delay */ "proc_delay" }; -#define SCANNER_INIT_S 999 +#define SCANNER_INIT_S 1008 -const scan_state sst[1002] = { +const scan_state sst[1011] = { /*SS_T( ch, f-by, match, other ), */ 0, /* 0 */ - S_ST( '-', 3, 331, 0 ), /* 1 */ + S_ST( '-', 3, 332, 0 ), /* 1 */ S_ST( '.', 3, 3, 1 ), /* 2 */ - S_ST( '.', 3, 295, 0 ), /* 3 . */ + S_ST( '.', 3, 296, 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 */ @@ -287,7 +288,7 @@ const scan_state sst[1002] = { 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, 461, 0 ), /* 58 beep_del */ + S_ST( 'a', 3, 462, 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 */ @@ -355,138 +356,138 @@ const scan_state sst[1002] = { S_ST( 'a', 3, 124, 0 ), /* 123 cryptost */ S_ST( 't', 3, 282, 0 ), /* 124 cryptosta */ S_ST( 't', 3, 283, 117 ), /* 125 c */ - S_ST( 'd', 3, 163, 78 ), /* 126 */ + S_ST( 'd', 3, 171, 78 ), /* 126 */ S_ST( 'a', 3, 284, 0 ), /* 127 d */ - S_ST( 'e', 3, 133, 127 ), /* 128 d */ + S_ST( 'e', 3, 141, 127 ), /* 128 d */ S_ST( 'f', 3, 130, 0 ), /* 129 de */ S_ST( 'a', 3, 131, 0 ), /* 130 def */ S_ST( 'u', 3, 132, 0 ), /* 131 defa */ S_ST( 'l', 3, 285, 0 ), /* 132 defau */ - S_ST( 'v', 3, 134, 129 ), /* 133 de */ - S_ST( 'i', 3, 135, 0 ), /* 134 dev */ - S_ST( 'c', 3, 286, 0 ), /* 135 devi */ - S_ST( 'i', 3, 140, 128 ), /* 136 d */ - S_ST( 'g', 3, 138, 0 ), /* 137 di */ - S_ST( 'e', 3, 139, 0 ), /* 138 dig */ - S_ST( 's', 3, 287, 0 ), /* 139 dige */ - S_ST( 's', 3, 147, 137 ), /* 140 di */ - S_ST( 'a', 3, 142, 0 ), /* 141 dis */ - S_ST( 'b', 3, 143, 0 ), /* 142 disa */ - S_ST( 'l', 3, 288, 0 ), /* 143 disab */ - S_ST( 'c', 3, 145, 141 ), /* 144 dis */ - S_ST( 'a', 3, 146, 0 ), /* 145 disc */ - S_ST( 'r', 3, 289, 0 ), /* 146 disca */ - S_ST( 'p', 3, 148, 144 ), /* 147 dis */ - S_ST( 'e', 3, 149, 0 ), /* 148 disp */ - S_ST( 'r', 3, 150, 0 ), /* 149 dispe */ - S_ST( 's', 3, 151, 0 ), /* 150 disper */ - S_ST( 'i', 3, 152, 0 ), /* 151 dispers */ - S_ST( 'o', 3, 290, 0 ), /* 152 dispersi */ - S_ST( 'r', 3, 160, 136 ), /* 153 d */ - S_ST( 'i', 3, 155, 0 ), /* 154 dr */ - S_ST( 'f', 3, 156, 0 ), /* 155 dri */ - S_ST( 't', 3, 157, 0 ), /* 156 drif */ - S_ST( 'f', 3, 158, 0 ), /* 157 drift */ - S_ST( 'i', 3, 159, 0 ), /* 158 driftf */ - S_ST( 'l', 3, 292, 0 ), /* 159 driftfi */ - S_ST( 'o', 3, 293, 154 ), /* 160 dr */ - S_ST( 's', 3, 162, 153 ), /* 161 d */ - S_ST( 'c', 3, 294, 0 ), /* 162 ds */ - S_ST( 'u', 3, 164, 161 ), /* 163 d */ - S_ST( 'r', 3, 165, 0 ), /* 164 du */ - S_ST( 'a', 3, 166, 0 ), /* 165 dur */ - S_ST( 't', 3, 167, 0 ), /* 166 dura */ - S_ST( 'i', 3, 168, 0 ), /* 167 durat */ - S_ST( 'o', 3, 464, 0 ), /* 168 durati */ - S_ST( 'e', 3, 174, 126 ), /* 169 */ - S_ST( 'n', 3, 297, 0 ), /* 170 e */ - S_ST( 'a', 3, 172, 0 ), /* 171 en */ - S_ST( 'b', 3, 173, 0 ), /* 172 ena */ - S_ST( 'l', 3, 296, 0 ), /* 173 enab */ - S_ST( 'p', 3, 175, 170 ), /* 174 e */ - S_ST( 'e', 3, 176, 0 ), /* 175 ep */ - S_ST( 'e', 3, 298, 0 ), /* 176 epe */ - S_ST( 'f', 3, 198, 169 ), /* 177 */ - S_ST( 'i', 3, 179, 0 ), /* 178 f */ - S_ST( 'l', 3, 300, 0 ), /* 179 fi */ - S_ST( 'g', 3, 181, 0 ), /* 180 file */ - S_ST( 'e', 3, 301, 0 ), /* 181 fileg */ - S_ST( 'n', 3, 183, 180 ), /* 182 file */ - S_ST( 'u', 3, 302, 0 ), /* 183 filen */ - S_ST( 'l', 3, 188, 178 ), /* 184 f */ - S_ST( 'a', 3, 187, 0 ), /* 185 fl */ - S_ST( 'g', 3, 306, 0 ), /* 186 fla */ - S_ST( 'k', 3, 307, 186 ), /* 187 fla */ - S_ST( 'o', 3, 189, 185 ), /* 188 fl */ - S_ST( 'o', 3, 308, 0 ), /* 189 flo */ - S_ST( 'r', 3, 191, 184 ), /* 190 f */ - S_ST( 'e', 3, 309, 0 ), /* 191 fr */ - S_ST( '_', 3, 193, 0 ), /* 192 freq */ - S_ST( 'o', 3, 194, 0 ), /* 193 freq_ */ - S_ST( 'f', 3, 195, 0 ), /* 194 freq_o */ - S_ST( 'f', 3, 196, 0 ), /* 195 freq_of */ - S_ST( 's', 3, 197, 0 ), /* 196 freq_off */ - S_ST( 'e', 3, 465, 0 ), /* 197 freq_offs */ - S_ST( 'u', 3, 201, 190 ), /* 198 f */ - S_ST( 'd', 3, 200, 0 ), /* 199 fu */ - S_ST( 'g', 3, 310, 0 ), /* 200 fud */ - S_ST( 'z', 3, 311, 199 ), /* 201 fu */ - S_ST( 'h', 3, 205, 177 ), /* 202 */ - S_ST( 'o', 3, 204, 0 ), /* 203 h */ - S_ST( 's', 3, 312, 0 ), /* 204 ho */ - S_ST( 'u', 3, 206, 203 ), /* 205 h */ - S_ST( 'f', 3, 207, 0 ), /* 206 hu */ - S_ST( 'f', 3, 208, 0 ), /* 207 huf */ - S_ST( 'p', 3, 209, 0 ), /* 208 huff */ - S_ST( 'u', 3, 210, 0 ), /* 209 huffp */ - S_ST( 'f', 3, 313, 0 ), /* 210 huffpu */ - S_ST( 'i', 3, 255, 202 ), /* 211 */ - S_ST( 'b', 3, 213, 0 ), /* 212 i */ - S_ST( 'u', 3, 214, 0 ), /* 213 ib */ - S_ST( 'r', 3, 215, 0 ), /* 214 ibu */ - S_ST( 's', 3, 314, 0 ), /* 215 ibur */ - S_ST( 'd', 3, 217, 212 ), /* 216 i */ - S_ST( 'e', 3, 218, 0 ), /* 217 id */ - S_ST( 'n', 3, 315, 0 ), /* 218 ide */ - S_ST( 'g', 3, 220, 216 ), /* 219 i */ - S_ST( 'n', 3, 221, 0 ), /* 220 ig */ - S_ST( 'o', 3, 222, 0 ), /* 221 ign */ - S_ST( 'r', 3, 316, 0 ), /* 222 igno */ - S_ST( 'h', 3, 224, 0 ), /* 223 ignore */ - S_ST( 'a', 3, 225, 0 ), /* 224 ignoreh */ - S_ST( 's', 3, 317, 0 ), /* 225 ignoreha */ - S_ST( 'n', 3, 249, 219 ), /* 226 i */ - S_ST( 'c', 3, 239, 0 ), /* 227 in */ - S_ST( 'a', 3, 229, 0 ), /* 228 inc */ - S_ST( 'l', 3, 230, 0 ), /* 229 inca */ - S_ST( 'l', 3, 231, 0 ), /* 230 incal */ - S_ST( 'o', 3, 318, 0 ), /* 231 incall */ - S_ST( 'l', 3, 233, 228 ), /* 232 inc */ - S_ST( 'u', 3, 234, 0 ), /* 233 incl */ - S_ST( 'd', 3, 235, 0 ), /* 234 inclu */ - S_ST( 'e', 3, 236, 0 ), /* 235 includ */ - S_ST( 'f', 3, 237, 0 ), /* 236 include */ - S_ST( 'i', 3, 238, 0 ), /* 237 includef */ - S_ST( 'l', 3, 322, 0 ), /* 238 includefi */ - S_ST( 'm', 3, 240, 232 ), /* 239 inc */ - S_ST( 'e', 3, 319, 0 ), /* 240 incm */ - S_ST( 'i', 3, 242, 227 ), /* 241 in */ - S_ST( 't', 3, 247, 0 ), /* 242 ini */ - S_ST( 'a', 3, 244, 0 ), /* 243 init */ - S_ST( 'l', 3, 245, 0 ), /* 244 inita */ - S_ST( 'l', 3, 246, 0 ), /* 245 inital */ - S_ST( 'o', 3, 320, 0 ), /* 246 initall */ - S_ST( 'm', 3, 248, 243 ), /* 247 init */ - S_ST( 'e', 3, 321, 0 ), /* 248 initm */ - S_ST( 't', 3, 250, 241 ), /* 249 in */ - S_ST( 'e', 3, 251, 0 ), /* 250 int */ - S_ST( 'r', 3, 252, 0 ), /* 251 inte */ - S_ST( 'f', 3, 253, 0 ), /* 252 inter */ - S_ST( 'a', 3, 254, 0 ), /* 253 interf */ - S_ST( 'c', 3, 324, 0 ), /* 254 interfa */ - S_ST( 'p', 3, 445, 326 ), /* 255 i */ - S_ST( 'p', 3, 257, 0 ), /* 256 ip */ - S_ST( 'e', 3, 291, 0 ), /* 257 ipp */ + S_ST( 'l', 3, 134, 129 ), /* 133 de */ + S_ST( 'r', 3, 135, 0 ), /* 134 del */ + S_ST( 'e', 3, 136, 0 ), /* 135 delr */ + S_ST( 's', 3, 137, 0 ), /* 136 delre */ + S_ST( 't', 3, 138, 0 ), /* 137 delres */ + S_ST( 'r', 3, 139, 0 ), /* 138 delrest */ + S_ST( 'i', 3, 140, 0 ), /* 139 delrestr */ + S_ST( 'c', 3, 286, 0 ), /* 140 delrestri */ + S_ST( 'v', 3, 142, 133 ), /* 141 de */ + S_ST( 'i', 3, 143, 0 ), /* 142 dev */ + S_ST( 'c', 3, 287, 0 ), /* 143 devi */ + S_ST( 'i', 3, 148, 128 ), /* 144 d */ + S_ST( 'g', 3, 146, 0 ), /* 145 di */ + S_ST( 'e', 3, 147, 0 ), /* 146 dig */ + S_ST( 's', 3, 288, 0 ), /* 147 dige */ + S_ST( 's', 3, 155, 145 ), /* 148 di */ + S_ST( 'a', 3, 150, 0 ), /* 149 dis */ + S_ST( 'b', 3, 151, 0 ), /* 150 disa */ + S_ST( 'l', 3, 289, 0 ), /* 151 disab */ + S_ST( 'c', 3, 153, 149 ), /* 152 dis */ + S_ST( 'a', 3, 154, 0 ), /* 153 disc */ + S_ST( 'r', 3, 290, 0 ), /* 154 disca */ + S_ST( 'p', 3, 156, 152 ), /* 155 dis */ + S_ST( 'e', 3, 157, 0 ), /* 156 disp */ + S_ST( 'r', 3, 158, 0 ), /* 157 dispe */ + S_ST( 's', 3, 159, 0 ), /* 158 disper */ + S_ST( 'i', 3, 160, 0 ), /* 159 dispers */ + S_ST( 'o', 3, 291, 0 ), /* 160 dispersi */ + S_ST( 'r', 3, 168, 144 ), /* 161 d */ + S_ST( 'i', 3, 163, 0 ), /* 162 dr */ + S_ST( 'f', 3, 164, 0 ), /* 163 dri */ + S_ST( 't', 3, 165, 0 ), /* 164 drif */ + S_ST( 'f', 3, 166, 0 ), /* 165 drift */ + S_ST( 'i', 3, 167, 0 ), /* 166 driftf */ + S_ST( 'l', 3, 293, 0 ), /* 167 driftfi */ + S_ST( 'o', 3, 294, 162 ), /* 168 dr */ + S_ST( 's', 3, 170, 161 ), /* 169 d */ + S_ST( 'c', 3, 295, 0 ), /* 170 ds */ + S_ST( 'u', 3, 172, 169 ), /* 171 d */ + S_ST( 'r', 3, 173, 0 ), /* 172 du */ + S_ST( 'a', 3, 174, 0 ), /* 173 dur */ + S_ST( 't', 3, 175, 0 ), /* 174 dura */ + S_ST( 'i', 3, 176, 0 ), /* 175 durat */ + S_ST( 'o', 3, 465, 0 ), /* 176 durati */ + S_ST( 'e', 3, 182, 126 ), /* 177 */ + S_ST( 'n', 3, 298, 0 ), /* 178 e */ + S_ST( 'a', 3, 180, 0 ), /* 179 en */ + S_ST( 'b', 3, 181, 0 ), /* 180 ena */ + S_ST( 'l', 3, 297, 0 ), /* 181 enab */ + S_ST( 'p', 3, 183, 178 ), /* 182 e */ + S_ST( 'e', 3, 184, 0 ), /* 183 ep */ + S_ST( 'e', 3, 299, 0 ), /* 184 epe */ + S_ST( 'f', 3, 206, 177 ), /* 185 */ + S_ST( 'i', 3, 187, 0 ), /* 186 f */ + S_ST( 'l', 3, 301, 0 ), /* 187 fi */ + S_ST( 'g', 3, 189, 0 ), /* 188 file */ + S_ST( 'e', 3, 302, 0 ), /* 189 fileg */ + S_ST( 'n', 3, 191, 188 ), /* 190 file */ + S_ST( 'u', 3, 303, 0 ), /* 191 filen */ + S_ST( 'l', 3, 196, 186 ), /* 192 f */ + S_ST( 'a', 3, 195, 0 ), /* 193 fl */ + S_ST( 'g', 3, 307, 0 ), /* 194 fla */ + S_ST( 'k', 3, 308, 194 ), /* 195 fla */ + S_ST( 'o', 3, 197, 193 ), /* 196 fl */ + S_ST( 'o', 3, 309, 0 ), /* 197 flo */ + S_ST( 'r', 3, 199, 192 ), /* 198 f */ + S_ST( 'e', 3, 310, 0 ), /* 199 fr */ + S_ST( '_', 3, 201, 0 ), /* 200 freq */ + S_ST( 'o', 3, 202, 0 ), /* 201 freq_ */ + S_ST( 'f', 3, 203, 0 ), /* 202 freq_o */ + S_ST( 'f', 3, 204, 0 ), /* 203 freq_of */ + S_ST( 's', 3, 205, 0 ), /* 204 freq_off */ + S_ST( 'e', 3, 466, 0 ), /* 205 freq_offs */ + S_ST( 'u', 3, 209, 198 ), /* 206 f */ + S_ST( 'd', 3, 208, 0 ), /* 207 fu */ + S_ST( 'g', 3, 311, 0 ), /* 208 fud */ + S_ST( 'z', 3, 312, 207 ), /* 209 fu */ + S_ST( 'h', 3, 213, 185 ), /* 210 */ + S_ST( 'o', 3, 212, 0 ), /* 211 h */ + S_ST( 's', 3, 313, 0 ), /* 212 ho */ + S_ST( 'u', 3, 214, 211 ), /* 213 h */ + S_ST( 'f', 3, 215, 0 ), /* 214 hu */ + S_ST( 'f', 3, 216, 0 ), /* 215 huf */ + S_ST( 'p', 3, 217, 0 ), /* 216 huff */ + S_ST( 'u', 3, 218, 0 ), /* 217 huffp */ + S_ST( 'f', 3, 314, 0 ), /* 218 huffpu */ + S_ST( 'i', 3, 430, 210 ), /* 219 */ + S_ST( 'b', 3, 221, 0 ), /* 220 i */ + S_ST( 'u', 3, 222, 0 ), /* 221 ib */ + S_ST( 'r', 3, 223, 0 ), /* 222 ibu */ + S_ST( 's', 3, 315, 0 ), /* 223 ibur */ + S_ST( 'd', 3, 225, 220 ), /* 224 i */ + S_ST( 'e', 3, 226, 0 ), /* 225 id */ + S_ST( 'n', 3, 316, 0 ), /* 226 ide */ + S_ST( 'g', 3, 228, 224 ), /* 227 i */ + S_ST( 'n', 3, 229, 0 ), /* 228 ig */ + S_ST( 'o', 3, 230, 0 ), /* 229 ign */ + S_ST( 'r', 3, 317, 0 ), /* 230 igno */ + S_ST( 'h', 3, 232, 0 ), /* 231 ignore */ + S_ST( 'a', 3, 233, 0 ), /* 232 ignoreh */ + S_ST( 's', 3, 318, 0 ), /* 233 ignoreha */ + S_ST( 'n', 3, 257, 227 ), /* 234 i */ + S_ST( 'c', 3, 247, 0 ), /* 235 in */ + S_ST( 'a', 3, 237, 0 ), /* 236 inc */ + S_ST( 'l', 3, 238, 0 ), /* 237 inca */ + S_ST( 'l', 3, 239, 0 ), /* 238 incal */ + S_ST( 'o', 3, 319, 0 ), /* 239 incall */ + S_ST( 'l', 3, 241, 236 ), /* 240 inc */ + S_ST( 'u', 3, 242, 0 ), /* 241 incl */ + S_ST( 'd', 3, 243, 0 ), /* 242 inclu */ + S_ST( 'e', 3, 244, 0 ), /* 243 includ */ + S_ST( 'f', 3, 245, 0 ), /* 244 include */ + S_ST( 'i', 3, 246, 0 ), /* 245 includef */ + S_ST( 'l', 3, 323, 0 ), /* 246 includefi */ + S_ST( 'm', 3, 248, 240 ), /* 247 inc */ + S_ST( 'e', 3, 320, 0 ), /* 248 incm */ + S_ST( 'i', 3, 250, 235 ), /* 249 in */ + S_ST( 't', 3, 255, 0 ), /* 250 ini */ + S_ST( 'a', 3, 252, 0 ), /* 251 init */ + S_ST( 'l', 3, 253, 0 ), /* 252 inita */ + S_ST( 'l', 3, 254, 0 ), /* 253 inital */ + S_ST( 'o', 3, 321, 0 ), /* 254 initall */ + S_ST( 'm', 3, 256, 251 ), /* 255 init */ + S_ST( 'e', 3, 322, 0 ), /* 256 initm */ + S_ST( 't', 3, 292, 249 ), /* 257 in */ 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 */ @@ -515,721 +516,730 @@ const scan_state sst[1002] = { S_ST( 'l', 0, 0, 0 ), /* 283 T_Ctl */ S_ST( 'y', 0, 0, 0 ), /* 284 T_Day */ S_ST( 't', 0, 0, 0 ), /* 285 T_Default */ - S_ST( 'e', 1, 0, 0 ), /* 286 T_Device */ - S_ST( 't', 1, 0, 0 ), /* 287 T_Digest */ - S_ST( 'e', 0, 0, 0 ), /* 288 T_Disable */ - S_ST( 'd', 0, 0, 0 ), /* 289 T_Discard */ - S_ST( 'n', 0, 0, 0 ), /* 290 T_Dispersion */ - S_ST( 'e', 3, 299, 0 ), /* 291 ippe */ - S_ST( 'e', 1, 0, 0 ), /* 292 T_Driftfile */ - S_ST( 'p', 0, 0, 0 ), /* 293 T_Drop */ - S_ST( 'p', 0, 0, 0 ), /* 294 T_Dscp */ - S_ST( '.', 0, 0, 0 ), /* 295 T_Ellipsis */ - S_ST( 'e', 0, 0, 0 ), /* 296 T_Enable */ - S_ST( 'd', 0, 0, 171 ), /* 297 T_End */ - S_ST( 'r', 0, 0, 0 ), /* 298 T_Epeer */ - S_ST( 'r', 3, 323, 0 ), /* 299 ippee */ - S_ST( 'e', 1, 182, 0 ), /* 300 T_File */ - S_ST( 'n', 0, 0, 0 ), /* 301 T_Filegen */ - S_ST( 'm', 0, 0, 0 ), /* 302 T_Filenum */ - S_ST( '1', 0, 0, 0 ), /* 303 T_Flag1 */ - S_ST( '2', 0, 0, 303 ), /* 304 T_Flag2 */ - S_ST( '3', 0, 0, 304 ), /* 305 T_Flag3 */ - S_ST( '4', 0, 0, 305 ), /* 306 T_Flag4 */ - S_ST( 'e', 0, 0, 0 ), /* 307 T_Flake */ - S_ST( 'r', 0, 0, 0 ), /* 308 T_Floor */ - S_ST( 'q', 0, 192, 0 ), /* 309 T_Freq */ - S_ST( 'e', 1, 0, 0 ), /* 310 T_Fudge */ - S_ST( 'z', 0, 0, 0 ), /* 311 T_Fuzz */ - S_ST( 't', 1, 0, 0 ), /* 312 T_Host */ - S_ST( 'f', 0, 0, 0 ), /* 313 T_Huffpuff */ - S_ST( 't', 0, 0, 0 ), /* 314 T_Iburst */ - S_ST( 't', 1, 0, 0 ), /* 315 T_Ident */ - S_ST( 'e', 0, 223, 0 ), /* 316 T_Ignore */ - S_ST( 'h', 0, 0, 0 ), /* 317 T_Ignorehash */ - S_ST( 'c', 0, 0, 0 ), /* 318 T_Incalloc */ - S_ST( 'm', 0, 0, 0 ), /* 319 T_Incmem */ - S_ST( 'c', 0, 0, 0 ), /* 320 T_Initalloc */ - S_ST( 'm', 0, 0, 0 ), /* 321 T_Initmem */ - S_ST( 'e', 1, 0, 0 ), /* 322 T_Includefile */ - S_ST( 'l', 3, 325, 0 ), /* 323 ippeer */ - S_ST( 'e', 0, 0, 0 ), /* 324 T_Interface */ - S_ST( 'i', 3, 417, 0 ), /* 325 ippeerl */ - S_ST( 'o', 0, 0, 226 ), /* 326 T_Io */ - S_ST( 't', 0, 0, 0 ), /* 327 T_Ippeerlimit */ - S_ST( '4', 0, 0, 0 ), /* 328 T_Ipv4 */ - S_ST( '4', 0, 0, 0 ), /* 329 T_Ipv4_flag */ - S_ST( '6', 0, 0, 328 ), /* 330 T_Ipv6 */ - S_ST( '6', 0, 0, 329 ), /* 331 T_Ipv6_flag */ - S_ST( 'l', 0, 0, 0 ), /* 332 T_Kernel */ - S_ST( 'y', 0, 334, 474 ), /* 333 T_Key */ - S_ST( 's', 1, 477, 0 ), /* 334 T_Keys */ - S_ST( 'r', 1, 0, 0 ), /* 335 T_Keysdir */ - S_ST( 'd', 0, 0, 0 ), /* 336 T_Kod */ - S_ST( 'e', 1, 0, 0 ), /* 337 T_Leapfile */ - S_ST( 'l', 0, 0, 0 ), /* 338 T_Leapsmearinterval */ - S_ST( 'd', 0, 0, 0 ), /* 339 T_Limited */ - S_ST( 'k', 0, 0, 0 ), /* 340 T_Link */ - S_ST( 'n', 0, 0, 0 ), /* 341 T_Listen */ - S_ST( 'g', 2, 0, 0 ), /* 342 T_Logconfig */ - S_ST( 'e', 1, 0, 0 ), /* 343 T_Logfile */ - S_ST( 's', 0, 0, 0 ), /* 344 T_Loopstats */ - S_ST( 'p', 0, 0, 0 ), /* 345 T_Lowpriotrap */ - S_ST( 't', 1, 0, 0 ), /* 346 T_Manycastclient */ - S_ST( 'r', 2, 0, 0 ), /* 347 T_Manycastserver */ - S_ST( 'k', 0, 0, 0 ), /* 348 T_Mask */ - S_ST( 'e', 0, 0, 0 ), /* 349 T_Maxage */ - S_ST( 'k', 0, 0, 0 ), /* 350 T_Maxclock */ - S_ST( 'h', 0, 0, 0 ), /* 351 T_Maxdepth */ - S_ST( 't', 0, 0, 0 ), /* 352 T_Maxdist */ - S_ST( 'm', 0, 0, 0 ), /* 353 T_Maxmem */ - S_ST( 'l', 0, 0, 0 ), /* 354 T_Maxpoll */ - S_ST( 's', 0, 0, 0 ), /* 355 T_Mdnstries */ - S_ST( 'm', 0, 577, 0 ), /* 356 T_Mem */ - S_ST( 'k', 0, 0, 0 ), /* 357 T_Memlock */ - S_ST( 'k', 0, 0, 0 ), /* 358 T_Minclock */ - S_ST( 'h', 0, 0, 0 ), /* 359 T_Mindepth */ - S_ST( 't', 0, 0, 0 ), /* 360 T_Mindist */ - S_ST( 'm', 0, 0, 0 ), /* 361 T_Minimum */ - S_ST( 'r', 0, 0, 0 ), /* 362 T_Minjitter */ - S_ST( 'l', 0, 0, 0 ), /* 363 T_Minpoll */ - S_ST( 'e', 0, 0, 0 ), /* 364 T_Minsane */ - S_ST( 'e', 0, 366, 0 ), /* 365 T_Mode */ - S_ST( '7', 0, 0, 0 ), /* 366 T_Mode7 */ - S_ST( 'r', 0, 0, 0 ), /* 367 T_Monitor */ - S_ST( 'h', 0, 0, 0 ), /* 368 T_Month */ - S_ST( 'u', 0, 0, 0 ), /* 369 T_Mru */ - S_ST( 'p', 0, 0, 0 ), /* 370 T_Mssntp */ - S_ST( 't', 2, 0, 0 ), /* 371 T_Multicastclient */ - S_ST( 'c', 0, 0, 0 ), /* 372 T_Nic */ - S_ST( 'k', 0, 0, 0 ), /* 373 T_Nolink */ - S_ST( 'y', 0, 0, 0 ), /* 374 T_Nomodify */ - S_ST( 't', 0, 0, 0 ), /* 375 T_Nomrulist */ - S_ST( 'e', 0, 0, 0 ), /* 376 T_None */ - S_ST( 'e', 0, 0, 0 ), /* 377 T_Nonvolatile */ - S_ST( 'r', 0, 0, 0 ), /* 378 T_Noepeer */ - S_ST( 'r', 0, 0, 0 ), /* 379 T_Nopeer */ - S_ST( 'y', 0, 0, 0 ), /* 380 T_Noquery */ - S_ST( 't', 0, 0, 0 ), /* 381 T_Noselect */ - S_ST( 'e', 0, 0, 0 ), /* 382 T_Noserve */ - S_ST( 'p', 0, 0, 0 ), /* 383 T_Notrap */ - S_ST( 't', 0, 0, 0 ), /* 384 T_Notrust */ - S_ST( 'p', 0, 682, 0 ), /* 385 T_Ntp */ - S_ST( 't', 0, 0, 0 ), /* 386 T_Ntpport */ - S_ST( 't', 1, 0, 0 ), /* 387 T_NtpSignDsocket */ - S_ST( 'n', 0, 697, 0 ), /* 388 T_Orphan */ - S_ST( 't', 0, 0, 0 ), /* 389 T_Orphanwait */ - S_ST( 'y', 0, 0, 0 ), /* 390 T_PCEdigest */ - S_ST( 'c', 0, 0, 0 ), /* 391 T_Panic */ - S_ST( 'r', 1, 724, 0 ), /* 392 T_Peer */ - S_ST( 's', 0, 0, 0 ), /* 393 T_Peerstats */ - S_ST( 'e', 2, 0, 0 ), /* 394 T_Phone */ - S_ST( 'd', 0, 732, 0 ), /* 395 T_Pid */ - S_ST( 'e', 1, 0, 0 ), /* 396 T_Pidfile */ - S_ST( 'l', 0, 737, 0 ), /* 397 T_Poll */ - S_ST( 't', 0, 0, 0 ), /* 398 T_PollSkewList */ - S_ST( 'l', 1, 0, 0 ), /* 399 T_Pool */ - S_ST( 't', 0, 0, 0 ), /* 400 T_Port */ - S_ST( 'a', 1, 0, 0 ), /* 401 T_PpsData */ - S_ST( 't', 0, 0, 0 ), /* 402 T_Preempt */ - S_ST( 'r', 0, 0, 0 ), /* 403 T_Prefer */ - S_ST( 's', 0, 0, 0 ), /* 404 T_Protostats */ - S_ST( 'w', 1, 0, 751 ), /* 405 T_Pw */ - S_ST( 'e', 1, 0, 0 ), /* 406 T_Randfile */ - S_ST( 's', 0, 0, 0 ), /* 407 T_Rawstats */ - S_ST( 'd', 1, 0, 0 ), /* 408 T_Refid */ - S_ST( 'y', 0, 0, 0 ), /* 409 T_Requestkey */ - S_ST( 't', 0, 0, 0 ), /* 410 T_Reset */ - S_ST( 't', 0, 0, 0 ), /* 411 T_Restrict */ - S_ST( 'e', 0, 0, 0 ), /* 412 T_Revoke */ - S_ST( 't', 0, 0, 0 ), /* 413 T_Rlimit */ - S_ST( 'r', 1, 0, 0 ), /* 414 T_Saveconfigdir */ - S_ST( 'r', 1, 834, 0 ), /* 415 T_Server */ - S_ST( 'e', 0, 0, 0 ), /* 416 T_Serverresponse */ - S_ST( 'm', 3, 429, 0 ), /* 417 ippeerli */ - S_ST( 'r', 1, 0, 0 ), /* 418 T_Setvar */ - S_ST( 'e', 0, 0, 0 ), /* 419 T_Source */ - S_ST( 'e', 0, 0, 0 ), /* 420 T_Stacksize */ - S_ST( 's', 0, 0, 0 ), /* 421 T_Statistics */ - S_ST( 's', 0, 878, 873 ), /* 422 T_Stats */ - S_ST( 'r', 1, 0, 0 ), /* 423 T_Statsdir */ - S_ST( 'p', 0, 886, 0 ), /* 424 T_Step */ - S_ST( 'k', 0, 0, 0 ), /* 425 T_Stepback */ - S_ST( 'd', 0, 0, 0 ), /* 426 T_Stepfwd */ - S_ST( 't', 0, 0, 0 ), /* 427 T_Stepout */ - S_ST( 'm', 0, 0, 0 ), /* 428 T_Stratum */ - S_ST( 'i', 3, 327, 0 ), /* 429 ippeerlim */ - S_ST( 's', 0, 893, 0 ), /* 430 T_Sys */ - S_ST( 's', 0, 0, 0 ), /* 431 T_Sysstats */ - S_ST( 'k', 0, 0, 0 ), /* 432 T_Tick */ - S_ST( '1', 0, 0, 0 ), /* 433 T_Time1 */ - S_ST( '2', 0, 0, 433 ), /* 434 T_Time2 */ - S_ST( 'a', 1, 0, 0 ), /* 435 T_TimeData */ - S_ST( 'r', 0, 0, 902 ), /* 436 T_Timer */ - S_ST( 's', 0, 0, 0 ), /* 437 T_Timingstats */ - S_ST( 'r', 0, 0, 0 ), /* 438 T_Tinker */ - S_ST( 's', 0, 0, 0 ), /* 439 T_Tos */ - S_ST( 'p', 1, 0, 0 ), /* 440 T_Trap */ - S_ST( 'e', 0, 0, 0 ), /* 441 T_True */ - S_ST( 'y', 0, 0, 0 ), /* 442 T_Trustedkey */ - S_ST( 'l', 0, 0, 0 ), /* 443 T_Ttl */ - S_ST( 'e', 0, 0, 0 ), /* 444 T_Type */ - S_ST( 'v', 3, 330, 256 ), /* 445 ip */ - S_ST( 'y', 0, 0, 0 ), /* 446 T_UEcrypto */ - S_ST( 'y', 0, 0, 0 ), /* 447 T_UEcryptonak */ - S_ST( 'y', 0, 0, 0 ), /* 448 T_UEdigest */ - S_ST( 'g', 1, 0, 0 ), /* 449 T_Unconfig */ - S_ST( 'r', 1, 938, 0 ), /* 450 T_Unpeer */ - S_ST( 'n', 0, 0, 0 ), /* 451 T_Version */ - S_ST( 'j', 3, 458, 211 ), /* 452 */ - S_ST( 'k', 0, 0, 0 ), /* 453 T_Week */ - S_ST( 'd', 0, 0, 0 ), /* 454 T_Wildcard */ - S_ST( 'e', 0, 0, 0 ), /* 455 T_Xleave */ - S_ST( 'e', 0, 0, 0 ), /* 456 T_Xmtnonce */ - S_ST( 'r', 0, 0, 0 ), /* 457 T_Year */ - S_ST( 'i', 3, 459, 0 ), /* 458 j */ - S_ST( 't', 3, 470, 0 ), /* 459 ji */ - S_ST( 'e', 0, 0, 0 ), /* 460 T_Simulate */ - S_ST( 'y', 0, 0, 0 ), /* 461 T_Beep_Delay */ - S_ST( 'n', 0, 0, 0 ), /* 462 T_Sim_Duration */ - S_ST( 't', 0, 0, 0 ), /* 463 T_Server_Offset */ - S_ST( 'n', 0, 0, 0 ), /* 464 T_Duration */ - S_ST( 't', 0, 0, 0 ), /* 465 T_Freq_Offset */ - S_ST( 'r', 0, 0, 0 ), /* 466 T_Wander */ - S_ST( 'r', 0, 0, 0 ), /* 467 T_Jitter */ - S_ST( 'y', 0, 0, 0 ), /* 468 T_Prop_Delay */ - S_ST( 'y', 0, 0, 0 ), /* 469 T_Proc_Delay */ - S_ST( 't', 3, 471, 0 ), /* 470 jit */ - S_ST( 'e', 3, 467, 0 ), /* 471 jitt */ - S_ST( 'k', 3, 479, 452 ), /* 472 */ - S_ST( 'e', 3, 333, 0 ), /* 473 k */ - S_ST( 'r', 3, 475, 0 ), /* 474 ke */ - S_ST( 'n', 3, 476, 0 ), /* 475 ker */ - S_ST( 'e', 3, 332, 0 ), /* 476 kern */ - S_ST( 'd', 3, 478, 0 ), /* 477 keys */ - S_ST( 'i', 3, 335, 0 ), /* 478 keysd */ - S_ST( 'o', 3, 336, 473 ), /* 479 k */ - S_ST( 'l', 3, 508, 472 ), /* 480 */ - S_ST( 'e', 3, 482, 0 ), /* 481 l */ - S_ST( 'a', 3, 483, 0 ), /* 482 le */ - S_ST( 'p', 3, 487, 0 ), /* 483 lea */ - S_ST( 'f', 3, 485, 0 ), /* 484 leap */ - S_ST( 'i', 3, 486, 0 ), /* 485 leapf */ - S_ST( 'l', 3, 337, 0 ), /* 486 leapfi */ - S_ST( 's', 3, 488, 484 ), /* 487 leap */ - S_ST( 'm', 3, 489, 0 ), /* 488 leaps */ - S_ST( 'e', 3, 490, 0 ), /* 489 leapsm */ - S_ST( 'a', 3, 491, 0 ), /* 490 leapsme */ - S_ST( 'r', 3, 492, 0 ), /* 491 leapsmea */ - S_ST( 'i', 3, 493, 0 ), /* 492 leapsmear */ - S_ST( 'n', 3, 494, 0 ), /* 493 leapsmeari */ - S_ST( 't', 3, 495, 0 ), /* 494 leapsmearin */ - S_ST( 'e', 3, 496, 0 ), /* 495 leapsmearint */ - S_ST( 'r', 3, 497, 0 ), /* 496 leapsmearinte */ - S_ST( 'v', 3, 498, 0 ), /* 497 leapsmearinter */ - S_ST( 'a', 3, 338, 0 ), /* 498 leapsmearinterv */ - S_ST( 'i', 3, 505, 481 ), /* 499 l */ - S_ST( 'm', 3, 501, 0 ), /* 500 li */ - S_ST( 'i', 3, 502, 0 ), /* 501 lim */ - S_ST( 't', 3, 503, 0 ), /* 502 limi */ - S_ST( 'e', 3, 339, 0 ), /* 503 limit */ - S_ST( 'n', 3, 340, 500 ), /* 504 li */ - S_ST( 's', 3, 506, 504 ), /* 505 li */ - S_ST( 't', 3, 507, 0 ), /* 506 lis */ - S_ST( 'e', 3, 341, 0 ), /* 507 list */ - S_ST( 'o', 3, 524, 499 ), /* 508 l */ - S_ST( 'g', 3, 515, 0 ), /* 509 lo */ - S_ST( 'c', 3, 511, 0 ), /* 510 log */ - S_ST( 'o', 3, 512, 0 ), /* 511 logc */ - S_ST( 'n', 3, 513, 0 ), /* 512 logco */ - S_ST( 'f', 3, 514, 0 ), /* 513 logcon */ - S_ST( 'i', 3, 342, 0 ), /* 514 logconf */ - S_ST( 'f', 3, 516, 510 ), /* 515 log */ - S_ST( 'i', 3, 517, 0 ), /* 516 logf */ - S_ST( 'l', 3, 343, 0 ), /* 517 logfi */ - S_ST( 'o', 3, 519, 509 ), /* 518 lo */ - S_ST( 'p', 3, 520, 0 ), /* 519 loo */ - S_ST( 's', 3, 521, 0 ), /* 520 loop */ - S_ST( 't', 3, 522, 0 ), /* 521 loops */ - S_ST( 'a', 3, 523, 0 ), /* 522 loopst */ - S_ST( 't', 3, 344, 0 ), /* 523 loopsta */ - S_ST( 'w', 3, 525, 518 ), /* 524 lo */ - S_ST( 'p', 3, 526, 0 ), /* 525 low */ - S_ST( 'r', 3, 527, 0 ), /* 526 lowp */ - S_ST( 'i', 3, 528, 0 ), /* 527 lowpr */ - S_ST( 'o', 3, 529, 0 ), /* 528 lowpri */ - S_ST( 't', 3, 530, 0 ), /* 529 lowprio */ - S_ST( 'r', 3, 531, 0 ), /* 530 lowpriot */ - S_ST( 'a', 3, 345, 0 ), /* 531 lowpriotr */ - S_ST( 'm', 3, 618, 480 ), /* 532 */ - S_ST( 'a', 3, 551, 0 ), /* 533 m */ - S_ST( 'n', 3, 535, 0 ), /* 534 ma */ - S_ST( 'y', 3, 536, 0 ), /* 535 man */ - S_ST( 'c', 3, 537, 0 ), /* 536 many */ - S_ST( 'a', 3, 538, 0 ), /* 537 manyc */ - S_ST( 's', 3, 539, 0 ), /* 538 manyca */ - S_ST( 't', 3, 545, 0 ), /* 539 manycas */ - S_ST( 'c', 3, 541, 0 ), /* 540 manycast */ - S_ST( 'l', 3, 542, 0 ), /* 541 manycastc */ - S_ST( 'i', 3, 543, 0 ), /* 542 manycastcl */ - S_ST( 'e', 3, 544, 0 ), /* 543 manycastcli */ - S_ST( 'n', 3, 346, 0 ), /* 544 manycastclie */ - S_ST( 's', 3, 546, 540 ), /* 545 manycast */ - S_ST( 'e', 3, 547, 0 ), /* 546 manycasts */ - S_ST( 'r', 3, 548, 0 ), /* 547 manycastse */ - S_ST( 'v', 3, 549, 0 ), /* 548 manycastser */ - S_ST( 'e', 3, 347, 0 ), /* 549 manycastserv */ - S_ST( 's', 3, 348, 534 ), /* 550 ma */ - S_ST( 'x', 3, 566, 550 ), /* 551 ma */ - S_ST( 'a', 3, 553, 0 ), /* 552 max */ - S_ST( 'g', 3, 349, 0 ), /* 553 maxa */ - S_ST( 'c', 3, 555, 552 ), /* 554 max */ - S_ST( 'l', 3, 556, 0 ), /* 555 maxc */ - S_ST( 'o', 3, 557, 0 ), /* 556 maxcl */ - S_ST( 'c', 3, 350, 0 ), /* 557 maxclo */ - S_ST( 'd', 3, 562, 554 ), /* 558 max */ - S_ST( 'e', 3, 560, 0 ), /* 559 maxd */ - S_ST( 'p', 3, 561, 0 ), /* 560 maxde */ - S_ST( 't', 3, 351, 0 ), /* 561 maxdep */ - S_ST( 'i', 3, 563, 559 ), /* 562 maxd */ - S_ST( 's', 3, 352, 0 ), /* 563 maxdi */ - S_ST( 'm', 3, 565, 558 ), /* 564 max */ - S_ST( 'e', 3, 353, 0 ), /* 565 maxm */ - S_ST( 'p', 3, 567, 564 ), /* 566 max */ - S_ST( 'o', 3, 568, 0 ), /* 567 maxp */ - S_ST( 'l', 3, 354, 0 ), /* 568 maxpo */ - S_ST( 'd', 3, 570, 533 ), /* 569 m */ - S_ST( 'n', 3, 571, 0 ), /* 570 md */ - S_ST( 's', 3, 572, 0 ), /* 571 mdn */ - S_ST( 't', 3, 573, 0 ), /* 572 mdns */ - S_ST( 'r', 3, 574, 0 ), /* 573 mdnst */ - S_ST( 'i', 3, 575, 0 ), /* 574 mdnstr */ - S_ST( 'e', 3, 355, 0 ), /* 575 mdnstri */ - S_ST( 'e', 3, 356, 569 ), /* 576 m */ - S_ST( 'l', 3, 578, 0 ), /* 577 mem */ - S_ST( 'o', 3, 579, 0 ), /* 578 meml */ - S_ST( 'c', 3, 357, 0 ), /* 579 memlo */ - S_ST( 'i', 3, 581, 576 ), /* 580 m */ - S_ST( 'n', 3, 603, 0 ), /* 581 mi */ - S_ST( 'c', 3, 583, 0 ), /* 582 min */ - S_ST( 'l', 3, 584, 0 ), /* 583 minc */ - S_ST( 'o', 3, 585, 0 ), /* 584 mincl */ - S_ST( 'c', 3, 358, 0 ), /* 585 minclo */ - S_ST( 'd', 3, 590, 582 ), /* 586 min */ - S_ST( 'e', 3, 588, 0 ), /* 587 mind */ - S_ST( 'p', 3, 589, 0 ), /* 588 minde */ - S_ST( 't', 3, 359, 0 ), /* 589 mindep */ - S_ST( 'i', 3, 591, 587 ), /* 590 mind */ - S_ST( 's', 3, 360, 0 ), /* 591 mindi */ - S_ST( 'i', 3, 593, 586 ), /* 592 min */ - S_ST( 'm', 3, 594, 0 ), /* 593 mini */ - S_ST( 'u', 3, 361, 0 ), /* 594 minim */ - S_ST( 'j', 3, 596, 592 ), /* 595 min */ - S_ST( 'i', 3, 597, 0 ), /* 596 minj */ - S_ST( 't', 3, 598, 0 ), /* 597 minji */ - S_ST( 't', 3, 599, 0 ), /* 598 minjit */ - S_ST( 'e', 3, 362, 0 ), /* 599 minjitt */ - S_ST( 'p', 3, 601, 595 ), /* 600 min */ - S_ST( 'o', 3, 602, 0 ), /* 601 minp */ - S_ST( 'l', 3, 363, 0 ), /* 602 minpo */ - S_ST( 's', 3, 604, 600 ), /* 603 min */ - S_ST( 'a', 3, 605, 0 ), /* 604 mins */ - S_ST( 'n', 3, 364, 0 ), /* 605 minsa */ - S_ST( 'o', 3, 608, 580 ), /* 606 m */ - S_ST( 'd', 3, 365, 0 ), /* 607 mo */ - S_ST( 'n', 3, 612, 607 ), /* 608 mo */ - S_ST( 'i', 3, 610, 0 ), /* 609 mon */ - S_ST( 't', 3, 611, 0 ), /* 610 moni */ - S_ST( 'o', 3, 367, 0 ), /* 611 monit */ - S_ST( 't', 3, 368, 609 ), /* 612 mon */ - S_ST( 'r', 3, 369, 606 ), /* 613 m */ - S_ST( 's', 3, 615, 613 ), /* 614 m */ - S_ST( 's', 3, 616, 0 ), /* 615 ms */ - S_ST( 'n', 3, 617, 0 ), /* 616 mss */ - S_ST( 't', 3, 370, 0 ), /* 617 mssn */ - S_ST( 'u', 3, 619, 614 ), /* 618 m */ - S_ST( 'l', 3, 620, 0 ), /* 619 mu */ - S_ST( 't', 3, 621, 0 ), /* 620 mul */ - S_ST( 'i', 3, 622, 0 ), /* 621 mult */ - S_ST( 'c', 3, 623, 0 ), /* 622 multi */ - S_ST( 'a', 3, 624, 0 ), /* 623 multic */ - S_ST( 's', 3, 625, 0 ), /* 624 multica */ - S_ST( 't', 3, 626, 0 ), /* 625 multicas */ - S_ST( 'c', 3, 627, 0 ), /* 626 multicast */ - S_ST( 'l', 3, 628, 0 ), /* 627 multicastc */ - S_ST( 'i', 3, 629, 0 ), /* 628 multicastcl */ - S_ST( 'e', 3, 630, 0 ), /* 629 multicastcli */ - S_ST( 'n', 3, 371, 0 ), /* 630 multicastclie */ - S_ST( 'n', 3, 678, 532 ), /* 631 */ - S_ST( 'i', 3, 372, 0 ), /* 632 n */ - S_ST( 'o', 3, 673, 632 ), /* 633 n */ - S_ST( 'e', 3, 635, 0 ), /* 634 no */ - S_ST( 'p', 3, 636, 0 ), /* 635 noe */ - S_ST( 'e', 3, 637, 0 ), /* 636 noep */ - S_ST( 'e', 3, 378, 0 ), /* 637 noepe */ - S_ST( 'l', 3, 639, 634 ), /* 638 no */ - S_ST( 'i', 3, 640, 0 ), /* 639 nol */ - S_ST( 'n', 3, 373, 0 ), /* 640 noli */ - S_ST( 'm', 3, 646, 638 ), /* 641 no */ - S_ST( 'o', 3, 643, 0 ), /* 642 nom */ - S_ST( 'd', 3, 644, 0 ), /* 643 nomo */ - S_ST( 'i', 3, 645, 0 ), /* 644 nomod */ - S_ST( 'f', 3, 374, 0 ), /* 645 nomodi */ - S_ST( 'r', 3, 647, 642 ), /* 646 nom */ - S_ST( 'u', 3, 648, 0 ), /* 647 nomr */ - S_ST( 'l', 3, 649, 0 ), /* 648 nomru */ - S_ST( 'i', 3, 650, 0 ), /* 649 nomrul */ - S_ST( 's', 3, 375, 0 ), /* 650 nomruli */ - S_ST( 'n', 3, 652, 641 ), /* 651 no */ - S_ST( 'v', 3, 653, 376 ), /* 652 non */ - S_ST( 'o', 3, 654, 0 ), /* 653 nonv */ - S_ST( 'l', 3, 655, 0 ), /* 654 nonvo */ - S_ST( 'a', 3, 656, 0 ), /* 655 nonvol */ - S_ST( 't', 3, 657, 0 ), /* 656 nonvola */ - S_ST( 'i', 3, 658, 0 ), /* 657 nonvolat */ - S_ST( 'l', 3, 377, 0 ), /* 658 nonvolati */ - S_ST( 'p', 3, 660, 651 ), /* 659 no */ - S_ST( 'e', 3, 661, 0 ), /* 660 nop */ - S_ST( 'e', 3, 379, 0 ), /* 661 nope */ - S_ST( 'q', 3, 663, 659 ), /* 662 no */ - S_ST( 'u', 3, 664, 0 ), /* 663 noq */ - S_ST( 'e', 3, 665, 0 ), /* 664 noqu */ - S_ST( 'r', 3, 380, 0 ), /* 665 noque */ - S_ST( 's', 3, 667, 662 ), /* 666 no */ - S_ST( 'e', 3, 671, 0 ), /* 667 nos */ - S_ST( 'l', 3, 669, 0 ), /* 668 nose */ - S_ST( 'e', 3, 670, 0 ), /* 669 nosel */ - S_ST( 'c', 3, 381, 0 ), /* 670 nosele */ - S_ST( 'r', 3, 672, 668 ), /* 671 nose */ - S_ST( 'v', 3, 382, 0 ), /* 672 noser */ - S_ST( 't', 3, 674, 666 ), /* 673 no */ - S_ST( 'r', 3, 676, 0 ), /* 674 not */ - S_ST( 'a', 3, 383, 0 ), /* 675 notr */ - S_ST( 'u', 3, 677, 675 ), /* 676 notr */ - S_ST( 's', 3, 384, 0 ), /* 677 notru */ - S_ST( 't', 3, 385, 633 ), /* 678 n */ - S_ST( 'p', 3, 680, 0 ), /* 679 ntp */ - S_ST( 'o', 3, 681, 0 ), /* 680 ntpp */ - S_ST( 'r', 3, 386, 0 ), /* 681 ntppo */ - S_ST( 's', 3, 683, 679 ), /* 682 ntp */ - S_ST( 'i', 3, 684, 0 ), /* 683 ntps */ - S_ST( 'g', 3, 685, 0 ), /* 684 ntpsi */ - S_ST( 'n', 3, 686, 0 ), /* 685 ntpsig */ - S_ST( 'd', 3, 687, 0 ), /* 686 ntpsign */ - S_ST( 's', 3, 688, 0 ), /* 687 ntpsignd */ - S_ST( 'o', 3, 689, 0 ), /* 688 ntpsignds */ - S_ST( 'c', 3, 690, 0 ), /* 689 ntpsigndso */ - S_ST( 'k', 3, 691, 0 ), /* 690 ntpsigndsoc */ - S_ST( 'e', 3, 387, 0 ), /* 691 ntpsigndsock */ - S_ST( 'o', 3, 693, 631 ), /* 692 */ - S_ST( 'r', 3, 694, 0 ), /* 693 o */ - S_ST( 'p', 3, 695, 0 ), /* 694 or */ - S_ST( 'h', 3, 696, 0 ), /* 695 orp */ - S_ST( 'a', 3, 388, 0 ), /* 696 orph */ - S_ST( 'w', 3, 698, 0 ), /* 697 orphan */ - S_ST( 'a', 3, 699, 0 ), /* 698 orphanw */ - S_ST( 'i', 3, 389, 0 ), /* 699 orphanwa */ - S_ST( 'p', 3, 405, 692 ), /* 700 */ - S_ST( 'a', 3, 702, 0 ), /* 701 p */ - S_ST( 'n', 3, 703, 0 ), /* 702 pa */ - S_ST( 'i', 3, 391, 0 ), /* 703 pan */ - S_ST( 'e', 3, 705, 701 ), /* 704 p */ - S_ST( 'e', 3, 392, 0 ), /* 705 pe */ - S_ST( '_', 3, 707, 0 ), /* 706 peer */ - S_ST( 'c', 3, 708, 0 ), /* 707 peer_ */ - S_ST( 'l', 3, 709, 0 ), /* 708 peer_c */ - S_ST( 'e', 3, 710, 0 ), /* 709 peer_cl */ - S_ST( 'a', 3, 711, 0 ), /* 710 peer_cle */ - S_ST( 'r', 3, 712, 0 ), /* 711 peer_clea */ - S_ST( '_', 3, 713, 0 ), /* 712 peer_clear */ - S_ST( 'd', 3, 714, 0 ), /* 713 peer_clear_ */ - S_ST( 'i', 3, 715, 0 ), /* 714 peer_clear_d */ - S_ST( 'g', 3, 716, 0 ), /* 715 peer_clear_di */ - S_ST( 'e', 3, 717, 0 ), /* 716 peer_clear_dig */ - S_ST( 's', 3, 718, 0 ), /* 717 peer_clear_dige */ - S_ST( 't', 3, 719, 0 ), /* 718 peer_clear_diges */ - S_ST( '_', 3, 720, 0 ), /* 719 peer_clear_digest */ - S_ST( 'e', 3, 721, 0 ), /* 720 peer_clear_digest_ */ - S_ST( 'a', 3, 722, 0 ), /* 721 peer_clear_digest_e */ - S_ST( 'r', 3, 723, 0 ), /* 722 peer_clear_digest_ea */ - S_ST( 'l', 3, 390, 0 ), /* 723 peer_clear_digest_ear */ - S_ST( 's', 3, 725, 706 ), /* 724 peer */ - S_ST( 't', 3, 726, 0 ), /* 725 peers */ - S_ST( 'a', 3, 727, 0 ), /* 726 peerst */ - S_ST( 't', 3, 393, 0 ), /* 727 peersta */ - S_ST( 'h', 3, 729, 704 ), /* 728 p */ - S_ST( 'o', 3, 730, 0 ), /* 729 ph */ - S_ST( 'n', 3, 394, 0 ), /* 730 pho */ - S_ST( 'i', 3, 395, 728 ), /* 731 p */ - S_ST( 'f', 3, 733, 0 ), /* 732 pid */ - S_ST( 'i', 3, 734, 0 ), /* 733 pidf */ - S_ST( 'l', 3, 396, 0 ), /* 734 pidfi */ - S_ST( 'o', 3, 745, 731 ), /* 735 p */ - S_ST( 'l', 3, 397, 0 ), /* 736 po */ - S_ST( 's', 3, 738, 0 ), /* 737 poll */ - S_ST( 'k', 3, 739, 0 ), /* 738 polls */ - S_ST( 'e', 3, 740, 0 ), /* 739 pollsk */ - S_ST( 'w', 3, 741, 0 ), /* 740 pollske */ - S_ST( 'l', 3, 742, 0 ), /* 741 pollskew */ - S_ST( 'i', 3, 743, 0 ), /* 742 pollskewl */ - S_ST( 's', 3, 398, 0 ), /* 743 pollskewli */ - S_ST( 'o', 3, 399, 736 ), /* 744 po */ - S_ST( 'r', 3, 400, 744 ), /* 745 po */ - S_ST( 'p', 3, 747, 735 ), /* 746 p */ - S_ST( 's', 3, 748, 0 ), /* 747 pp */ - S_ST( 'd', 3, 749, 0 ), /* 748 pps */ - S_ST( 'a', 3, 750, 0 ), /* 749 ppsd */ - S_ST( 't', 3, 401, 0 ), /* 750 ppsda */ - S_ST( 'r', 3, 758, 746 ), /* 751 p */ - S_ST( 'e', 3, 756, 0 ), /* 752 pr */ - S_ST( 'e', 3, 754, 0 ), /* 753 pre */ - S_ST( 'm', 3, 755, 0 ), /* 754 pree */ - S_ST( 'p', 3, 402, 0 ), /* 755 preem */ - S_ST( 'f', 3, 757, 753 ), /* 756 pre */ - S_ST( 'e', 3, 403, 0 ), /* 757 pref */ - S_ST( 'o', 3, 771, 752 ), /* 758 pr */ - S_ST( 'c', 3, 760, 0 ), /* 759 pro */ - S_ST( '_', 3, 761, 0 ), /* 760 proc */ - S_ST( 'd', 3, 762, 0 ), /* 761 proc_ */ - S_ST( 'e', 3, 763, 0 ), /* 762 proc_d */ - S_ST( 'l', 3, 764, 0 ), /* 763 proc_de */ - S_ST( 'a', 3, 469, 0 ), /* 764 proc_del */ - S_ST( 'p', 3, 766, 759 ), /* 765 pro */ - S_ST( '_', 3, 767, 0 ), /* 766 prop */ - S_ST( 'd', 3, 768, 0 ), /* 767 prop_ */ - S_ST( 'e', 3, 769, 0 ), /* 768 prop_d */ - S_ST( 'l', 3, 770, 0 ), /* 769 prop_de */ - S_ST( 'a', 3, 468, 0 ), /* 770 prop_del */ - S_ST( 't', 3, 772, 765 ), /* 771 pro */ - S_ST( 'o', 3, 773, 0 ), /* 772 prot */ - S_ST( 's', 3, 774, 0 ), /* 773 proto */ - S_ST( 't', 3, 775, 0 ), /* 774 protos */ - S_ST( 'a', 3, 776, 0 ), /* 775 protost */ - S_ST( 't', 3, 404, 0 ), /* 776 protosta */ - S_ST( 'r', 3, 808, 700 ), /* 777 */ - S_ST( 'a', 3, 784, 0 ), /* 778 r */ - S_ST( 'n', 3, 780, 0 ), /* 779 ra */ - S_ST( 'd', 3, 781, 0 ), /* 780 ran */ - S_ST( 'f', 3, 782, 0 ), /* 781 rand */ - S_ST( 'i', 3, 783, 0 ), /* 782 randf */ - S_ST( 'l', 3, 406, 0 ), /* 783 randfi */ - S_ST( 'w', 3, 785, 779 ), /* 784 ra */ - S_ST( 's', 3, 786, 0 ), /* 785 raw */ - S_ST( 't', 3, 787, 0 ), /* 786 raws */ - S_ST( 'a', 3, 788, 0 ), /* 787 rawst */ - S_ST( 't', 3, 407, 0 ), /* 788 rawsta */ - S_ST( 'e', 3, 805, 778 ), /* 789 r */ - S_ST( 'f', 3, 791, 0 ), /* 790 re */ - S_ST( 'i', 3, 408, 0 ), /* 791 ref */ - S_ST( 'q', 3, 793, 790 ), /* 792 re */ - S_ST( 'u', 3, 794, 0 ), /* 793 req */ - S_ST( 'e', 3, 795, 0 ), /* 794 requ */ - S_ST( 's', 3, 796, 0 ), /* 795 reque */ - S_ST( 't', 3, 797, 0 ), /* 796 reques */ - S_ST( 'k', 3, 798, 0 ), /* 797 request */ - S_ST( 'e', 3, 409, 0 ), /* 798 requestk */ - S_ST( 's', 3, 801, 792 ), /* 799 re */ - S_ST( 'e', 3, 410, 0 ), /* 800 res */ - S_ST( 't', 3, 802, 800 ), /* 801 res */ - S_ST( 'r', 3, 803, 0 ), /* 802 rest */ - S_ST( 'i', 3, 804, 0 ), /* 803 restr */ - S_ST( 'c', 3, 411, 0 ), /* 804 restri */ - S_ST( 'v', 3, 806, 799 ), /* 805 re */ - S_ST( 'o', 3, 807, 0 ), /* 806 rev */ - S_ST( 'k', 3, 412, 0 ), /* 807 revo */ - S_ST( 'l', 3, 809, 789 ), /* 808 r */ - S_ST( 'i', 3, 810, 0 ), /* 809 rl */ - S_ST( 'm', 3, 811, 0 ), /* 810 rli */ - S_ST( 'i', 3, 413, 0 ), /* 811 rlim */ - S_ST( 's', 3, 892, 777 ), /* 812 */ - S_ST( 'a', 3, 814, 0 ), /* 813 s */ - S_ST( 'v', 3, 815, 0 ), /* 814 sa */ - S_ST( 'e', 3, 816, 0 ), /* 815 sav */ - S_ST( 'c', 3, 817, 0 ), /* 816 save */ - S_ST( 'o', 3, 818, 0 ), /* 817 savec */ - S_ST( 'n', 3, 819, 0 ), /* 818 saveco */ - S_ST( 'f', 3, 820, 0 ), /* 819 savecon */ - S_ST( 'i', 3, 821, 0 ), /* 820 saveconf */ - S_ST( 'g', 3, 822, 0 ), /* 821 saveconfi */ - S_ST( 'd', 3, 823, 0 ), /* 822 saveconfig */ - S_ST( 'i', 3, 414, 0 ), /* 823 saveconfigd */ - S_ST( 'e', 3, 841, 813 ), /* 824 s */ - S_ST( 'r', 3, 826, 0 ), /* 825 se */ - S_ST( 'v', 3, 827, 0 ), /* 826 ser */ - S_ST( 'e', 3, 415, 0 ), /* 827 serv */ - S_ST( '_', 3, 829, 0 ), /* 828 server */ - S_ST( 'o', 3, 830, 0 ), /* 829 server_ */ - S_ST( 'f', 3, 831, 0 ), /* 830 server_o */ - S_ST( 'f', 3, 832, 0 ), /* 831 server_of */ - S_ST( 's', 3, 833, 0 ), /* 832 server_off */ - S_ST( 'e', 3, 463, 0 ), /* 833 server_offs */ - S_ST( 'r', 3, 835, 828 ), /* 834 server */ - S_ST( 'e', 3, 836, 0 ), /* 835 serverr */ - S_ST( 's', 3, 837, 0 ), /* 836 serverre */ - S_ST( 'p', 3, 838, 0 ), /* 837 serverres */ - S_ST( 'o', 3, 839, 0 ), /* 838 serverresp */ - S_ST( 'n', 3, 840, 0 ), /* 839 serverrespo */ - S_ST( 's', 3, 416, 0 ), /* 840 serverrespon */ - S_ST( 't', 3, 842, 825 ), /* 841 se */ - S_ST( 'v', 3, 843, 0 ), /* 842 set */ - S_ST( 'a', 3, 418, 0 ), /* 843 setv */ - S_ST( 'i', 3, 845, 824 ), /* 844 s */ - S_ST( 'm', 3, 846, 0 ), /* 845 si */ - S_ST( 'u', 3, 847, 0 ), /* 846 sim */ - S_ST( 'l', 3, 848, 0 ), /* 847 simu */ - S_ST( 'a', 3, 849, 0 ), /* 848 simul */ - S_ST( 't', 3, 850, 0 ), /* 849 simula */ - S_ST( 'i', 3, 851, 460 ), /* 850 simulat */ - S_ST( 'o', 3, 852, 0 ), /* 851 simulati */ - S_ST( 'n', 3, 853, 0 ), /* 852 simulatio */ - S_ST( '_', 3, 854, 0 ), /* 853 simulation */ - S_ST( 'd', 3, 855, 0 ), /* 854 simulation_ */ - S_ST( 'u', 3, 856, 0 ), /* 855 simulation_d */ - S_ST( 'r', 3, 857, 0 ), /* 856 simulation_du */ - S_ST( 'a', 3, 858, 0 ), /* 857 simulation_dur */ - S_ST( 't', 3, 859, 0 ), /* 858 simulation_dura */ - S_ST( 'i', 3, 860, 0 ), /* 859 simulation_durat */ - S_ST( 'o', 3, 462, 0 ), /* 860 simulation_durati */ - S_ST( 'o', 3, 862, 844 ), /* 861 s */ - S_ST( 'u', 3, 863, 0 ), /* 862 so */ - S_ST( 'r', 3, 864, 0 ), /* 863 sou */ - S_ST( 'c', 3, 419, 0 ), /* 864 sour */ - S_ST( 't', 3, 888, 861 ), /* 865 s */ - S_ST( 'a', 3, 872, 0 ), /* 866 st */ - S_ST( 'c', 3, 868, 0 ), /* 867 sta */ - S_ST( 'k', 3, 869, 0 ), /* 868 stac */ - S_ST( 's', 3, 870, 0 ), /* 869 stack */ - S_ST( 'i', 3, 871, 0 ), /* 870 stacks */ - S_ST( 'z', 3, 420, 0 ), /* 871 stacksi */ - S_ST( 't', 3, 422, 867 ), /* 872 sta */ - S_ST( 'i', 3, 874, 0 ), /* 873 stat */ - S_ST( 's', 3, 875, 0 ), /* 874 stati */ - S_ST( 't', 3, 876, 0 ), /* 875 statis */ - S_ST( 'i', 3, 877, 0 ), /* 876 statist */ - S_ST( 'c', 3, 421, 0 ), /* 877 statisti */ - S_ST( 'd', 3, 879, 0 ), /* 878 stats */ - S_ST( 'i', 3, 423, 0 ), /* 879 statsd */ - S_ST( 'e', 3, 424, 866 ), /* 880 st */ - S_ST( 'b', 3, 882, 0 ), /* 881 step */ - S_ST( 'a', 3, 883, 0 ), /* 882 stepb */ - S_ST( 'c', 3, 425, 0 ), /* 883 stepba */ - S_ST( 'f', 3, 885, 881 ), /* 884 step */ - S_ST( 'w', 3, 426, 0 ), /* 885 stepf */ - S_ST( 'o', 3, 887, 884 ), /* 886 step */ - S_ST( 'u', 3, 427, 0 ), /* 887 stepo */ - S_ST( 'r', 3, 889, 880 ), /* 888 st */ - S_ST( 'a', 3, 890, 0 ), /* 889 str */ - S_ST( 't', 3, 891, 0 ), /* 890 stra */ - S_ST( 'u', 3, 428, 0 ), /* 891 strat */ - S_ST( 'y', 3, 430, 865 ), /* 892 s */ - S_ST( 's', 3, 894, 0 ), /* 893 sys */ - S_ST( 't', 3, 895, 0 ), /* 894 syss */ - S_ST( 'a', 3, 896, 0 ), /* 895 sysst */ - S_ST( 't', 3, 431, 0 ), /* 896 syssta */ - S_ST( 't', 3, 926, 812 ), /* 897 */ - S_ST( 'i', 3, 912, 0 ), /* 898 t */ - S_ST( 'c', 3, 432, 0 ), /* 899 ti */ - S_ST( 'm', 3, 905, 899 ), /* 900 ti */ - S_ST( 'e', 3, 436, 0 ), /* 901 tim */ - S_ST( 'd', 3, 903, 434 ), /* 902 time */ - S_ST( 'a', 3, 904, 0 ), /* 903 timed */ - S_ST( 't', 3, 435, 0 ), /* 904 timeda */ - S_ST( 'i', 3, 906, 901 ), /* 905 tim */ - S_ST( 'n', 3, 907, 0 ), /* 906 timi */ - S_ST( 'g', 3, 908, 0 ), /* 907 timin */ - S_ST( 's', 3, 909, 0 ), /* 908 timing */ - S_ST( 't', 3, 910, 0 ), /* 909 timings */ - S_ST( 'a', 3, 911, 0 ), /* 910 timingst */ - S_ST( 't', 3, 437, 0 ), /* 911 timingsta */ - S_ST( 'n', 3, 913, 900 ), /* 912 ti */ - S_ST( 'k', 3, 914, 0 ), /* 913 tin */ - S_ST( 'e', 3, 438, 0 ), /* 914 tink */ - S_ST( 'o', 3, 439, 898 ), /* 915 t */ - S_ST( 'r', 3, 918, 915 ), /* 916 t */ - S_ST( 'a', 3, 440, 0 ), /* 917 tr */ - S_ST( 'u', 3, 919, 917 ), /* 918 tr */ - S_ST( 's', 3, 920, 441 ), /* 919 tru */ - S_ST( 't', 3, 921, 0 ), /* 920 trus */ - S_ST( 'e', 3, 922, 0 ), /* 921 trust */ - S_ST( 'd', 3, 923, 0 ), /* 922 truste */ - S_ST( 'k', 3, 924, 0 ), /* 923 trusted */ - S_ST( 'e', 3, 442, 0 ), /* 924 trustedk */ - S_ST( 't', 3, 443, 916 ), /* 925 t */ - S_ST( 'y', 3, 927, 925 ), /* 926 t */ - S_ST( 'p', 3, 444, 0 ), /* 927 ty */ - S_ST( 'u', 3, 929, 897 ), /* 928 */ - S_ST( 'n', 3, 935, 0 ), /* 929 u */ - S_ST( 'c', 3, 931, 0 ), /* 930 un */ - S_ST( 'o', 3, 932, 0 ), /* 931 unc */ - S_ST( 'n', 3, 933, 0 ), /* 932 unco */ - S_ST( 'f', 3, 934, 0 ), /* 933 uncon */ - S_ST( 'i', 3, 449, 0 ), /* 934 unconf */ - S_ST( 'p', 3, 936, 930 ), /* 935 un */ - S_ST( 'e', 3, 937, 0 ), /* 936 unp */ - S_ST( 'e', 3, 450, 0 ), /* 937 unpe */ - S_ST( '_', 3, 958, 0 ), /* 938 unpeer */ - S_ST( 'c', 3, 940, 0 ), /* 939 unpeer_ */ - S_ST( 'r', 3, 941, 0 ), /* 940 unpeer_c */ - S_ST( 'y', 3, 942, 0 ), /* 941 unpeer_cr */ - S_ST( 'p', 3, 943, 0 ), /* 942 unpeer_cry */ - S_ST( 't', 3, 944, 0 ), /* 943 unpeer_cryp */ - S_ST( 'o', 3, 945, 0 ), /* 944 unpeer_crypt */ - S_ST( '_', 3, 950, 0 ), /* 945 unpeer_crypto */ - S_ST( 'e', 3, 947, 0 ), /* 946 unpeer_crypto_ */ - S_ST( 'a', 3, 948, 0 ), /* 947 unpeer_crypto_e */ - S_ST( 'r', 3, 949, 0 ), /* 948 unpeer_crypto_ea */ - S_ST( 'l', 3, 446, 0 ), /* 949 unpeer_crypto_ear */ - S_ST( 'n', 3, 951, 946 ), /* 950 unpeer_crypto_ */ - S_ST( 'a', 3, 952, 0 ), /* 951 unpeer_crypto_n */ - S_ST( 'k', 3, 953, 0 ), /* 952 unpeer_crypto_na */ - S_ST( '_', 3, 954, 0 ), /* 953 unpeer_crypto_nak */ - S_ST( 'e', 3, 955, 0 ), /* 954 unpeer_crypto_nak_ */ - S_ST( 'a', 3, 956, 0 ), /* 955 unpeer_crypto_nak_e */ - S_ST( 'r', 3, 957, 0 ), /* 956 unpeer_crypto_nak_ea */ - S_ST( 'l', 3, 447, 0 ), /* 957 unpeer_crypto_nak_ear */ - S_ST( 'd', 3, 959, 939 ), /* 958 unpeer_ */ - S_ST( 'i', 3, 960, 0 ), /* 959 unpeer_d */ - S_ST( 'g', 3, 961, 0 ), /* 960 unpeer_di */ - S_ST( 'e', 3, 962, 0 ), /* 961 unpeer_dig */ - S_ST( 's', 3, 963, 0 ), /* 962 unpeer_dige */ - S_ST( 't', 3, 964, 0 ), /* 963 unpeer_diges */ - S_ST( '_', 3, 965, 0 ), /* 964 unpeer_digest */ - S_ST( 'e', 3, 966, 0 ), /* 965 unpeer_digest_ */ - S_ST( 'a', 3, 967, 0 ), /* 966 unpeer_digest_e */ - S_ST( 'r', 3, 968, 0 ), /* 967 unpeer_digest_ea */ - S_ST( 'l', 3, 448, 0 ), /* 968 unpeer_digest_ear */ - S_ST( 'v', 3, 970, 928 ), /* 969 */ - S_ST( 'e', 3, 971, 0 ), /* 970 v */ - S_ST( 'r', 3, 972, 0 ), /* 971 ve */ - S_ST( 's', 3, 973, 0 ), /* 972 ver */ - S_ST( 'i', 3, 974, 0 ), /* 973 vers */ - S_ST( 'o', 3, 451, 0 ), /* 974 versi */ - S_ST( 'w', 3, 982, 969 ), /* 975 */ - S_ST( 'a', 3, 977, 0 ), /* 976 w */ - S_ST( 'n', 3, 978, 0 ), /* 977 wa */ - S_ST( 'd', 3, 979, 0 ), /* 978 wan */ - S_ST( 'e', 3, 466, 0 ), /* 979 wand */ - S_ST( 'e', 3, 981, 976 ), /* 980 w */ - S_ST( 'e', 3, 453, 0 ), /* 981 we */ - S_ST( 'i', 3, 983, 980 ), /* 982 w */ - S_ST( 'l', 3, 984, 0 ), /* 983 wi */ - S_ST( 'd', 3, 985, 0 ), /* 984 wil */ - S_ST( 'c', 3, 986, 0 ), /* 985 wild */ - S_ST( 'a', 3, 987, 0 ), /* 986 wildc */ - S_ST( 'r', 3, 454, 0 ), /* 987 wildca */ - S_ST( 'x', 3, 993, 975 ), /* 988 */ - S_ST( 'l', 3, 990, 0 ), /* 989 x */ - S_ST( 'e', 3, 991, 0 ), /* 990 xl */ - S_ST( 'a', 3, 992, 0 ), /* 991 xle */ - S_ST( 'v', 3, 455, 0 ), /* 992 xlea */ - S_ST( 'm', 3, 994, 989 ), /* 993 x */ - S_ST( 't', 3, 995, 0 ), /* 994 xm */ - S_ST( 'n', 3, 996, 0 ), /* 995 xmt */ - S_ST( 'o', 3, 997, 0 ), /* 996 xmtn */ - S_ST( 'n', 3, 998, 0 ), /* 997 xmtno */ - S_ST( 'c', 3, 456, 0 ), /* 998 xmtnon */ - S_ST( 'y', 3, 1000, 988 ), /* 999 [initial state] */ - S_ST( 'e', 3, 1001, 0 ), /* 1000 y */ - S_ST( 'a', 3, 457, 0 ) /* 1001 ye */ + S_ST( 't', 0, 0, 0 ), /* 286 T_Delrestrict */ + S_ST( 'e', 1, 0, 0 ), /* 287 T_Device */ + S_ST( 't', 1, 0, 0 ), /* 288 T_Digest */ + S_ST( 'e', 0, 0, 0 ), /* 289 T_Disable */ + S_ST( 'd', 0, 0, 0 ), /* 290 T_Discard */ + S_ST( 'n', 0, 0, 0 ), /* 291 T_Dispersion */ + S_ST( 'e', 3, 300, 0 ), /* 292 int */ + S_ST( 'e', 1, 0, 0 ), /* 293 T_Driftfile */ + S_ST( 'p', 0, 0, 0 ), /* 294 T_Drop */ + S_ST( 'p', 0, 0, 0 ), /* 295 T_Dscp */ + S_ST( '.', 0, 0, 0 ), /* 296 T_Ellipsis */ + S_ST( 'e', 0, 0, 0 ), /* 297 T_Enable */ + S_ST( 'd', 0, 0, 179 ), /* 298 T_End */ + S_ST( 'r', 0, 0, 0 ), /* 299 T_Epeer */ + S_ST( 'r', 3, 324, 0 ), /* 300 inte */ + S_ST( 'e', 1, 190, 0 ), /* 301 T_File */ + S_ST( 'n', 0, 0, 0 ), /* 302 T_Filegen */ + S_ST( 'm', 0, 0, 0 ), /* 303 T_Filenum */ + S_ST( '1', 0, 0, 0 ), /* 304 T_Flag1 */ + S_ST( '2', 0, 0, 304 ), /* 305 T_Flag2 */ + S_ST( '3', 0, 0, 305 ), /* 306 T_Flag3 */ + S_ST( '4', 0, 0, 306 ), /* 307 T_Flag4 */ + S_ST( 'e', 0, 0, 0 ), /* 308 T_Flake */ + S_ST( 'r', 0, 0, 0 ), /* 309 T_Floor */ + S_ST( 'q', 0, 200, 0 ), /* 310 T_Freq */ + S_ST( 'e', 1, 0, 0 ), /* 311 T_Fudge */ + S_ST( 'z', 0, 0, 0 ), /* 312 T_Fuzz */ + S_ST( 't', 1, 0, 0 ), /* 313 T_Host */ + S_ST( 'f', 0, 0, 0 ), /* 314 T_Huffpuff */ + S_ST( 't', 0, 0, 0 ), /* 315 T_Iburst */ + S_ST( 't', 1, 0, 0 ), /* 316 T_Ident */ + S_ST( 'e', 0, 231, 0 ), /* 317 T_Ignore */ + S_ST( 'h', 0, 0, 0 ), /* 318 T_Ignorehash */ + S_ST( 'c', 0, 0, 0 ), /* 319 T_Incalloc */ + S_ST( 'm', 0, 0, 0 ), /* 320 T_Incmem */ + S_ST( 'c', 0, 0, 0 ), /* 321 T_Initalloc */ + S_ST( 'm', 0, 0, 0 ), /* 322 T_Initmem */ + S_ST( 'e', 1, 0, 0 ), /* 323 T_Includefile */ + S_ST( 'f', 3, 326, 0 ), /* 324 inter */ + S_ST( 'e', 0, 0, 0 ), /* 325 T_Interface */ + S_ST( 'a', 3, 418, 0 ), /* 326 interf */ + S_ST( 'o', 0, 0, 234 ), /* 327 T_Io */ + S_ST( 't', 0, 0, 0 ), /* 328 T_Ippeerlimit */ + S_ST( '4', 0, 0, 0 ), /* 329 T_Ipv4 */ + S_ST( '4', 0, 0, 0 ), /* 330 T_Ipv4_flag */ + S_ST( '6', 0, 0, 329 ), /* 331 T_Ipv6 */ + S_ST( '6', 0, 0, 330 ), /* 332 T_Ipv6_flag */ + S_ST( 'l', 0, 0, 0 ), /* 333 T_Kernel */ + S_ST( 'y', 0, 335, 483 ), /* 334 T_Key */ + S_ST( 's', 1, 486, 0 ), /* 335 T_Keys */ + S_ST( 'r', 1, 0, 0 ), /* 336 T_Keysdir */ + S_ST( 'd', 0, 0, 0 ), /* 337 T_Kod */ + S_ST( 'e', 1, 0, 0 ), /* 338 T_Leapfile */ + S_ST( 'l', 0, 0, 0 ), /* 339 T_Leapsmearinterval */ + S_ST( 'd', 0, 0, 0 ), /* 340 T_Limited */ + S_ST( 'k', 0, 0, 0 ), /* 341 T_Link */ + S_ST( 'n', 0, 0, 0 ), /* 342 T_Listen */ + S_ST( 'g', 2, 0, 0 ), /* 343 T_Logconfig */ + S_ST( 'e', 1, 0, 0 ), /* 344 T_Logfile */ + S_ST( 's', 0, 0, 0 ), /* 345 T_Loopstats */ + S_ST( 'p', 0, 0, 0 ), /* 346 T_Lowpriotrap */ + S_ST( 't', 1, 0, 0 ), /* 347 T_Manycastclient */ + S_ST( 'r', 2, 0, 0 ), /* 348 T_Manycastserver */ + S_ST( 'k', 0, 0, 0 ), /* 349 T_Mask */ + S_ST( 'e', 0, 0, 0 ), /* 350 T_Maxage */ + S_ST( 'k', 0, 0, 0 ), /* 351 T_Maxclock */ + S_ST( 'h', 0, 0, 0 ), /* 352 T_Maxdepth */ + S_ST( 't', 0, 0, 0 ), /* 353 T_Maxdist */ + S_ST( 'm', 0, 0, 0 ), /* 354 T_Maxmem */ + S_ST( 'l', 0, 0, 0 ), /* 355 T_Maxpoll */ + S_ST( 's', 0, 0, 0 ), /* 356 T_Mdnstries */ + S_ST( 'm', 0, 586, 0 ), /* 357 T_Mem */ + S_ST( 'k', 0, 0, 0 ), /* 358 T_Memlock */ + S_ST( 'k', 0, 0, 0 ), /* 359 T_Minclock */ + S_ST( 'h', 0, 0, 0 ), /* 360 T_Mindepth */ + S_ST( 't', 0, 0, 0 ), /* 361 T_Mindist */ + S_ST( 'm', 0, 0, 0 ), /* 362 T_Minimum */ + S_ST( 'r', 0, 0, 0 ), /* 363 T_Minjitter */ + S_ST( 'l', 0, 0, 0 ), /* 364 T_Minpoll */ + S_ST( 'e', 0, 0, 0 ), /* 365 T_Minsane */ + S_ST( 'e', 0, 367, 0 ), /* 366 T_Mode */ + S_ST( '7', 0, 0, 0 ), /* 367 T_Mode7 */ + S_ST( 'r', 0, 0, 0 ), /* 368 T_Monitor */ + S_ST( 'h', 0, 0, 0 ), /* 369 T_Month */ + S_ST( 'u', 0, 0, 0 ), /* 370 T_Mru */ + S_ST( 'p', 0, 0, 0 ), /* 371 T_Mssntp */ + S_ST( 't', 2, 0, 0 ), /* 372 T_Multicastclient */ + S_ST( 'c', 0, 0, 0 ), /* 373 T_Nic */ + S_ST( 'k', 0, 0, 0 ), /* 374 T_Nolink */ + S_ST( 'y', 0, 0, 0 ), /* 375 T_Nomodify */ + S_ST( 't', 0, 0, 0 ), /* 376 T_Nomrulist */ + S_ST( 'e', 0, 0, 0 ), /* 377 T_None */ + S_ST( 'e', 0, 0, 0 ), /* 378 T_Nonvolatile */ + S_ST( 'r', 0, 0, 0 ), /* 379 T_Noepeer */ + S_ST( 'r', 0, 0, 0 ), /* 380 T_Nopeer */ + S_ST( 'y', 0, 0, 0 ), /* 381 T_Noquery */ + S_ST( 't', 0, 0, 0 ), /* 382 T_Noselect */ + S_ST( 'e', 0, 0, 0 ), /* 383 T_Noserve */ + S_ST( 'p', 0, 0, 0 ), /* 384 T_Notrap */ + S_ST( 't', 0, 0, 0 ), /* 385 T_Notrust */ + S_ST( 'p', 0, 691, 0 ), /* 386 T_Ntp */ + S_ST( 't', 0, 0, 0 ), /* 387 T_Ntpport */ + S_ST( 't', 1, 0, 0 ), /* 388 T_NtpSignDsocket */ + S_ST( 'n', 0, 706, 0 ), /* 389 T_Orphan */ + S_ST( 't', 0, 0, 0 ), /* 390 T_Orphanwait */ + S_ST( 'y', 0, 0, 0 ), /* 391 T_PCEdigest */ + S_ST( 'c', 0, 0, 0 ), /* 392 T_Panic */ + S_ST( 'r', 1, 733, 0 ), /* 393 T_Peer */ + S_ST( 's', 0, 0, 0 ), /* 394 T_Peerstats */ + S_ST( 'e', 2, 0, 0 ), /* 395 T_Phone */ + S_ST( 'd', 0, 741, 0 ), /* 396 T_Pid */ + S_ST( 'e', 1, 0, 0 ), /* 397 T_Pidfile */ + S_ST( 'l', 0, 746, 0 ), /* 398 T_Poll */ + S_ST( 't', 0, 0, 0 ), /* 399 T_PollSkewList */ + S_ST( 'l', 1, 0, 0 ), /* 400 T_Pool */ + S_ST( 't', 0, 0, 0 ), /* 401 T_Port */ + S_ST( 'a', 1, 0, 0 ), /* 402 T_PpsData */ + S_ST( 't', 0, 0, 0 ), /* 403 T_Preempt */ + S_ST( 'r', 0, 0, 0 ), /* 404 T_Prefer */ + S_ST( 's', 0, 0, 0 ), /* 405 T_Protostats */ + S_ST( 'w', 1, 0, 760 ), /* 406 T_Pw */ + S_ST( 'e', 1, 0, 0 ), /* 407 T_Randfile */ + S_ST( 's', 0, 0, 0 ), /* 408 T_Rawstats */ + S_ST( 'd', 1, 0, 0 ), /* 409 T_Refid */ + S_ST( 'y', 0, 0, 0 ), /* 410 T_Requestkey */ + S_ST( 't', 0, 0, 0 ), /* 411 T_Reset */ + S_ST( 't', 0, 0, 0 ), /* 412 T_Restrict */ + S_ST( 'e', 0, 0, 0 ), /* 413 T_Revoke */ + S_ST( 't', 0, 0, 0 ), /* 414 T_Rlimit */ + S_ST( 'r', 1, 0, 0 ), /* 415 T_Saveconfigdir */ + S_ST( 'r', 1, 843, 0 ), /* 416 T_Server */ + S_ST( 'e', 0, 0, 0 ), /* 417 T_Serverresponse */ + S_ST( 'c', 3, 325, 0 ), /* 418 interfa */ + S_ST( 'r', 1, 0, 0 ), /* 419 T_Setvar */ + S_ST( 'e', 0, 0, 0 ), /* 420 T_Source */ + S_ST( 'e', 0, 0, 0 ), /* 421 T_Stacksize */ + S_ST( 's', 0, 0, 0 ), /* 422 T_Statistics */ + S_ST( 's', 0, 887, 882 ), /* 423 T_Stats */ + S_ST( 'r', 1, 0, 0 ), /* 424 T_Statsdir */ + S_ST( 'p', 0, 895, 0 ), /* 425 T_Step */ + S_ST( 'k', 0, 0, 0 ), /* 426 T_Stepback */ + S_ST( 'd', 0, 0, 0 ), /* 427 T_Stepfwd */ + S_ST( 't', 0, 0, 0 ), /* 428 T_Stepout */ + S_ST( 'm', 0, 0, 0 ), /* 429 T_Stratum */ + S_ST( 'p', 3, 475, 327 ), /* 430 i */ + S_ST( 's', 0, 902, 0 ), /* 431 T_Sys */ + S_ST( 's', 0, 0, 0 ), /* 432 T_Sysstats */ + S_ST( 'k', 0, 0, 0 ), /* 433 T_Tick */ + S_ST( '1', 0, 0, 0 ), /* 434 T_Time1 */ + S_ST( '2', 0, 0, 434 ), /* 435 T_Time2 */ + S_ST( 'a', 1, 0, 0 ), /* 436 T_TimeData */ + S_ST( 'r', 0, 0, 911 ), /* 437 T_Timer */ + S_ST( 's', 0, 0, 0 ), /* 438 T_Timingstats */ + S_ST( 'r', 0, 0, 0 ), /* 439 T_Tinker */ + S_ST( 's', 0, 0, 0 ), /* 440 T_Tos */ + S_ST( 'p', 1, 0, 0 ), /* 441 T_Trap */ + S_ST( 'e', 0, 0, 0 ), /* 442 T_True */ + S_ST( 'y', 0, 0, 0 ), /* 443 T_Trustedkey */ + S_ST( 'l', 0, 0, 0 ), /* 444 T_Ttl */ + S_ST( 'e', 0, 0, 0 ), /* 445 T_Type */ + S_ST( 'p', 3, 453, 0 ), /* 446 ip */ + S_ST( 'y', 0, 0, 0 ), /* 447 T_UEcrypto */ + S_ST( 'y', 0, 0, 0 ), /* 448 T_UEcryptonak */ + S_ST( 'y', 0, 0, 0 ), /* 449 T_UEdigest */ + S_ST( 'g', 1, 0, 0 ), /* 450 T_Unconfig */ + S_ST( 'r', 1, 947, 0 ), /* 451 T_Unpeer */ + S_ST( 'n', 0, 0, 0 ), /* 452 T_Version */ + S_ST( 'e', 3, 459, 0 ), /* 453 ipp */ + S_ST( 'k', 0, 0, 0 ), /* 454 T_Week */ + S_ST( 'd', 0, 0, 0 ), /* 455 T_Wildcard */ + S_ST( 'e', 0, 0, 0 ), /* 456 T_Xleave */ + S_ST( 'e', 0, 0, 0 ), /* 457 T_Xmtnonce */ + S_ST( 'r', 0, 0, 0 ), /* 458 T_Year */ + S_ST( 'e', 3, 460, 0 ), /* 459 ippe */ + S_ST( 'r', 3, 471, 0 ), /* 460 ippee */ + S_ST( 'e', 0, 0, 0 ), /* 461 T_Simulate */ + S_ST( 'y', 0, 0, 0 ), /* 462 T_Beep_Delay */ + S_ST( 'n', 0, 0, 0 ), /* 463 T_Sim_Duration */ + S_ST( 't', 0, 0, 0 ), /* 464 T_Server_Offset */ + S_ST( 'n', 0, 0, 0 ), /* 465 T_Duration */ + S_ST( 't', 0, 0, 0 ), /* 466 T_Freq_Offset */ + S_ST( 'r', 0, 0, 0 ), /* 467 T_Wander */ + S_ST( 'r', 0, 0, 0 ), /* 468 T_Jitter */ + S_ST( 'y', 0, 0, 0 ), /* 469 T_Prop_Delay */ + S_ST( 'y', 0, 0, 0 ), /* 470 T_Proc_Delay */ + S_ST( 'l', 3, 472, 0 ), /* 471 ippeer */ + S_ST( 'i', 3, 473, 0 ), /* 472 ippeerl */ + S_ST( 'm', 3, 474, 0 ), /* 473 ippeerli */ + S_ST( 'i', 3, 328, 0 ), /* 474 ippeerlim */ + S_ST( 'v', 3, 331, 446 ), /* 475 ip */ + S_ST( 'j', 3, 477, 219 ), /* 476 */ + S_ST( 'i', 3, 478, 0 ), /* 477 j */ + S_ST( 't', 3, 479, 0 ), /* 478 ji */ + S_ST( 't', 3, 480, 0 ), /* 479 jit */ + S_ST( 'e', 3, 468, 0 ), /* 480 jitt */ + S_ST( 'k', 3, 488, 476 ), /* 481 */ + S_ST( 'e', 3, 334, 0 ), /* 482 k */ + S_ST( 'r', 3, 484, 0 ), /* 483 ke */ + S_ST( 'n', 3, 485, 0 ), /* 484 ker */ + S_ST( 'e', 3, 333, 0 ), /* 485 kern */ + S_ST( 'd', 3, 487, 0 ), /* 486 keys */ + S_ST( 'i', 3, 336, 0 ), /* 487 keysd */ + S_ST( 'o', 3, 337, 482 ), /* 488 k */ + S_ST( 'l', 3, 517, 481 ), /* 489 */ + S_ST( 'e', 3, 491, 0 ), /* 490 l */ + S_ST( 'a', 3, 492, 0 ), /* 491 le */ + S_ST( 'p', 3, 496, 0 ), /* 492 lea */ + S_ST( 'f', 3, 494, 0 ), /* 493 leap */ + S_ST( 'i', 3, 495, 0 ), /* 494 leapf */ + S_ST( 'l', 3, 338, 0 ), /* 495 leapfi */ + S_ST( 's', 3, 497, 493 ), /* 496 leap */ + S_ST( 'm', 3, 498, 0 ), /* 497 leaps */ + S_ST( 'e', 3, 499, 0 ), /* 498 leapsm */ + S_ST( 'a', 3, 500, 0 ), /* 499 leapsme */ + S_ST( 'r', 3, 501, 0 ), /* 500 leapsmea */ + S_ST( 'i', 3, 502, 0 ), /* 501 leapsmear */ + S_ST( 'n', 3, 503, 0 ), /* 502 leapsmeari */ + S_ST( 't', 3, 504, 0 ), /* 503 leapsmearin */ + S_ST( 'e', 3, 505, 0 ), /* 504 leapsmearint */ + S_ST( 'r', 3, 506, 0 ), /* 505 leapsmearinte */ + S_ST( 'v', 3, 507, 0 ), /* 506 leapsmearinter */ + S_ST( 'a', 3, 339, 0 ), /* 507 leapsmearinterv */ + S_ST( 'i', 3, 514, 490 ), /* 508 l */ + S_ST( 'm', 3, 510, 0 ), /* 509 li */ + S_ST( 'i', 3, 511, 0 ), /* 510 lim */ + S_ST( 't', 3, 512, 0 ), /* 511 limi */ + S_ST( 'e', 3, 340, 0 ), /* 512 limit */ + S_ST( 'n', 3, 341, 509 ), /* 513 li */ + S_ST( 's', 3, 515, 513 ), /* 514 li */ + S_ST( 't', 3, 516, 0 ), /* 515 lis */ + S_ST( 'e', 3, 342, 0 ), /* 516 list */ + S_ST( 'o', 3, 533, 508 ), /* 517 l */ + S_ST( 'g', 3, 524, 0 ), /* 518 lo */ + S_ST( 'c', 3, 520, 0 ), /* 519 log */ + S_ST( 'o', 3, 521, 0 ), /* 520 logc */ + S_ST( 'n', 3, 522, 0 ), /* 521 logco */ + S_ST( 'f', 3, 523, 0 ), /* 522 logcon */ + S_ST( 'i', 3, 343, 0 ), /* 523 logconf */ + S_ST( 'f', 3, 525, 519 ), /* 524 log */ + S_ST( 'i', 3, 526, 0 ), /* 525 logf */ + S_ST( 'l', 3, 344, 0 ), /* 526 logfi */ + S_ST( 'o', 3, 528, 518 ), /* 527 lo */ + S_ST( 'p', 3, 529, 0 ), /* 528 loo */ + S_ST( 's', 3, 530, 0 ), /* 529 loop */ + S_ST( 't', 3, 531, 0 ), /* 530 loops */ + S_ST( 'a', 3, 532, 0 ), /* 531 loopst */ + S_ST( 't', 3, 345, 0 ), /* 532 loopsta */ + S_ST( 'w', 3, 534, 527 ), /* 533 lo */ + S_ST( 'p', 3, 535, 0 ), /* 534 low */ + S_ST( 'r', 3, 536, 0 ), /* 535 lowp */ + S_ST( 'i', 3, 537, 0 ), /* 536 lowpr */ + S_ST( 'o', 3, 538, 0 ), /* 537 lowpri */ + S_ST( 't', 3, 539, 0 ), /* 538 lowprio */ + S_ST( 'r', 3, 540, 0 ), /* 539 lowpriot */ + S_ST( 'a', 3, 346, 0 ), /* 540 lowpriotr */ + S_ST( 'm', 3, 627, 489 ), /* 541 */ + S_ST( 'a', 3, 560, 0 ), /* 542 m */ + S_ST( 'n', 3, 544, 0 ), /* 543 ma */ + S_ST( 'y', 3, 545, 0 ), /* 544 man */ + S_ST( 'c', 3, 546, 0 ), /* 545 many */ + S_ST( 'a', 3, 547, 0 ), /* 546 manyc */ + S_ST( 's', 3, 548, 0 ), /* 547 manyca */ + S_ST( 't', 3, 554, 0 ), /* 548 manycas */ + S_ST( 'c', 3, 550, 0 ), /* 549 manycast */ + S_ST( 'l', 3, 551, 0 ), /* 550 manycastc */ + S_ST( 'i', 3, 552, 0 ), /* 551 manycastcl */ + S_ST( 'e', 3, 553, 0 ), /* 552 manycastcli */ + S_ST( 'n', 3, 347, 0 ), /* 553 manycastclie */ + S_ST( 's', 3, 555, 549 ), /* 554 manycast */ + S_ST( 'e', 3, 556, 0 ), /* 555 manycasts */ + S_ST( 'r', 3, 557, 0 ), /* 556 manycastse */ + S_ST( 'v', 3, 558, 0 ), /* 557 manycastser */ + S_ST( 'e', 3, 348, 0 ), /* 558 manycastserv */ + S_ST( 's', 3, 349, 543 ), /* 559 ma */ + S_ST( 'x', 3, 575, 559 ), /* 560 ma */ + S_ST( 'a', 3, 562, 0 ), /* 561 max */ + S_ST( 'g', 3, 350, 0 ), /* 562 maxa */ + S_ST( 'c', 3, 564, 561 ), /* 563 max */ + S_ST( 'l', 3, 565, 0 ), /* 564 maxc */ + S_ST( 'o', 3, 566, 0 ), /* 565 maxcl */ + S_ST( 'c', 3, 351, 0 ), /* 566 maxclo */ + S_ST( 'd', 3, 571, 563 ), /* 567 max */ + S_ST( 'e', 3, 569, 0 ), /* 568 maxd */ + S_ST( 'p', 3, 570, 0 ), /* 569 maxde */ + S_ST( 't', 3, 352, 0 ), /* 570 maxdep */ + S_ST( 'i', 3, 572, 568 ), /* 571 maxd */ + S_ST( 's', 3, 353, 0 ), /* 572 maxdi */ + S_ST( 'm', 3, 574, 567 ), /* 573 max */ + S_ST( 'e', 3, 354, 0 ), /* 574 maxm */ + S_ST( 'p', 3, 576, 573 ), /* 575 max */ + S_ST( 'o', 3, 577, 0 ), /* 576 maxp */ + S_ST( 'l', 3, 355, 0 ), /* 577 maxpo */ + S_ST( 'd', 3, 579, 542 ), /* 578 m */ + S_ST( 'n', 3, 580, 0 ), /* 579 md */ + S_ST( 's', 3, 581, 0 ), /* 580 mdn */ + S_ST( 't', 3, 582, 0 ), /* 581 mdns */ + S_ST( 'r', 3, 583, 0 ), /* 582 mdnst */ + S_ST( 'i', 3, 584, 0 ), /* 583 mdnstr */ + S_ST( 'e', 3, 356, 0 ), /* 584 mdnstri */ + S_ST( 'e', 3, 357, 578 ), /* 585 m */ + S_ST( 'l', 3, 587, 0 ), /* 586 mem */ + S_ST( 'o', 3, 588, 0 ), /* 587 meml */ + S_ST( 'c', 3, 358, 0 ), /* 588 memlo */ + S_ST( 'i', 3, 590, 585 ), /* 589 m */ + S_ST( 'n', 3, 612, 0 ), /* 590 mi */ + S_ST( 'c', 3, 592, 0 ), /* 591 min */ + S_ST( 'l', 3, 593, 0 ), /* 592 minc */ + S_ST( 'o', 3, 594, 0 ), /* 593 mincl */ + S_ST( 'c', 3, 359, 0 ), /* 594 minclo */ + S_ST( 'd', 3, 599, 591 ), /* 595 min */ + S_ST( 'e', 3, 597, 0 ), /* 596 mind */ + S_ST( 'p', 3, 598, 0 ), /* 597 minde */ + S_ST( 't', 3, 360, 0 ), /* 598 mindep */ + S_ST( 'i', 3, 600, 596 ), /* 599 mind */ + S_ST( 's', 3, 361, 0 ), /* 600 mindi */ + S_ST( 'i', 3, 602, 595 ), /* 601 min */ + S_ST( 'm', 3, 603, 0 ), /* 602 mini */ + S_ST( 'u', 3, 362, 0 ), /* 603 minim */ + S_ST( 'j', 3, 605, 601 ), /* 604 min */ + S_ST( 'i', 3, 606, 0 ), /* 605 minj */ + S_ST( 't', 3, 607, 0 ), /* 606 minji */ + S_ST( 't', 3, 608, 0 ), /* 607 minjit */ + S_ST( 'e', 3, 363, 0 ), /* 608 minjitt */ + S_ST( 'p', 3, 610, 604 ), /* 609 min */ + S_ST( 'o', 3, 611, 0 ), /* 610 minp */ + S_ST( 'l', 3, 364, 0 ), /* 611 minpo */ + S_ST( 's', 3, 613, 609 ), /* 612 min */ + S_ST( 'a', 3, 614, 0 ), /* 613 mins */ + S_ST( 'n', 3, 365, 0 ), /* 614 minsa */ + S_ST( 'o', 3, 617, 589 ), /* 615 m */ + S_ST( 'd', 3, 366, 0 ), /* 616 mo */ + S_ST( 'n', 3, 621, 616 ), /* 617 mo */ + S_ST( 'i', 3, 619, 0 ), /* 618 mon */ + S_ST( 't', 3, 620, 0 ), /* 619 moni */ + S_ST( 'o', 3, 368, 0 ), /* 620 monit */ + S_ST( 't', 3, 369, 618 ), /* 621 mon */ + S_ST( 'r', 3, 370, 615 ), /* 622 m */ + S_ST( 's', 3, 624, 622 ), /* 623 m */ + S_ST( 's', 3, 625, 0 ), /* 624 ms */ + S_ST( 'n', 3, 626, 0 ), /* 625 mss */ + S_ST( 't', 3, 371, 0 ), /* 626 mssn */ + S_ST( 'u', 3, 628, 623 ), /* 627 m */ + S_ST( 'l', 3, 629, 0 ), /* 628 mu */ + S_ST( 't', 3, 630, 0 ), /* 629 mul */ + S_ST( 'i', 3, 631, 0 ), /* 630 mult */ + S_ST( 'c', 3, 632, 0 ), /* 631 multi */ + S_ST( 'a', 3, 633, 0 ), /* 632 multic */ + S_ST( 's', 3, 634, 0 ), /* 633 multica */ + S_ST( 't', 3, 635, 0 ), /* 634 multicas */ + S_ST( 'c', 3, 636, 0 ), /* 635 multicast */ + S_ST( 'l', 3, 637, 0 ), /* 636 multicastc */ + S_ST( 'i', 3, 638, 0 ), /* 637 multicastcl */ + S_ST( 'e', 3, 639, 0 ), /* 638 multicastcli */ + S_ST( 'n', 3, 372, 0 ), /* 639 multicastclie */ + S_ST( 'n', 3, 687, 541 ), /* 640 */ + S_ST( 'i', 3, 373, 0 ), /* 641 n */ + S_ST( 'o', 3, 682, 641 ), /* 642 n */ + S_ST( 'e', 3, 644, 0 ), /* 643 no */ + S_ST( 'p', 3, 645, 0 ), /* 644 noe */ + S_ST( 'e', 3, 646, 0 ), /* 645 noep */ + S_ST( 'e', 3, 379, 0 ), /* 646 noepe */ + S_ST( 'l', 3, 648, 643 ), /* 647 no */ + S_ST( 'i', 3, 649, 0 ), /* 648 nol */ + S_ST( 'n', 3, 374, 0 ), /* 649 noli */ + S_ST( 'm', 3, 655, 647 ), /* 650 no */ + S_ST( 'o', 3, 652, 0 ), /* 651 nom */ + S_ST( 'd', 3, 653, 0 ), /* 652 nomo */ + S_ST( 'i', 3, 654, 0 ), /* 653 nomod */ + S_ST( 'f', 3, 375, 0 ), /* 654 nomodi */ + S_ST( 'r', 3, 656, 651 ), /* 655 nom */ + S_ST( 'u', 3, 657, 0 ), /* 656 nomr */ + S_ST( 'l', 3, 658, 0 ), /* 657 nomru */ + S_ST( 'i', 3, 659, 0 ), /* 658 nomrul */ + S_ST( 's', 3, 376, 0 ), /* 659 nomruli */ + S_ST( 'n', 3, 661, 650 ), /* 660 no */ + S_ST( 'v', 3, 662, 377 ), /* 661 non */ + S_ST( 'o', 3, 663, 0 ), /* 662 nonv */ + S_ST( 'l', 3, 664, 0 ), /* 663 nonvo */ + S_ST( 'a', 3, 665, 0 ), /* 664 nonvol */ + S_ST( 't', 3, 666, 0 ), /* 665 nonvola */ + S_ST( 'i', 3, 667, 0 ), /* 666 nonvolat */ + S_ST( 'l', 3, 378, 0 ), /* 667 nonvolati */ + S_ST( 'p', 3, 669, 660 ), /* 668 no */ + S_ST( 'e', 3, 670, 0 ), /* 669 nop */ + S_ST( 'e', 3, 380, 0 ), /* 670 nope */ + S_ST( 'q', 3, 672, 668 ), /* 671 no */ + S_ST( 'u', 3, 673, 0 ), /* 672 noq */ + S_ST( 'e', 3, 674, 0 ), /* 673 noqu */ + S_ST( 'r', 3, 381, 0 ), /* 674 noque */ + S_ST( 's', 3, 676, 671 ), /* 675 no */ + S_ST( 'e', 3, 680, 0 ), /* 676 nos */ + S_ST( 'l', 3, 678, 0 ), /* 677 nose */ + S_ST( 'e', 3, 679, 0 ), /* 678 nosel */ + S_ST( 'c', 3, 382, 0 ), /* 679 nosele */ + S_ST( 'r', 3, 681, 677 ), /* 680 nose */ + S_ST( 'v', 3, 383, 0 ), /* 681 noser */ + S_ST( 't', 3, 683, 675 ), /* 682 no */ + S_ST( 'r', 3, 685, 0 ), /* 683 not */ + S_ST( 'a', 3, 384, 0 ), /* 684 notr */ + S_ST( 'u', 3, 686, 684 ), /* 685 notr */ + S_ST( 's', 3, 385, 0 ), /* 686 notru */ + S_ST( 't', 3, 386, 642 ), /* 687 n */ + S_ST( 'p', 3, 689, 0 ), /* 688 ntp */ + S_ST( 'o', 3, 690, 0 ), /* 689 ntpp */ + S_ST( 'r', 3, 387, 0 ), /* 690 ntppo */ + S_ST( 's', 3, 692, 688 ), /* 691 ntp */ + S_ST( 'i', 3, 693, 0 ), /* 692 ntps */ + S_ST( 'g', 3, 694, 0 ), /* 693 ntpsi */ + S_ST( 'n', 3, 695, 0 ), /* 694 ntpsig */ + S_ST( 'd', 3, 696, 0 ), /* 695 ntpsign */ + S_ST( 's', 3, 697, 0 ), /* 696 ntpsignd */ + S_ST( 'o', 3, 698, 0 ), /* 697 ntpsignds */ + S_ST( 'c', 3, 699, 0 ), /* 698 ntpsigndso */ + S_ST( 'k', 3, 700, 0 ), /* 699 ntpsigndsoc */ + S_ST( 'e', 3, 388, 0 ), /* 700 ntpsigndsock */ + S_ST( 'o', 3, 702, 640 ), /* 701 */ + S_ST( 'r', 3, 703, 0 ), /* 702 o */ + S_ST( 'p', 3, 704, 0 ), /* 703 or */ + S_ST( 'h', 3, 705, 0 ), /* 704 orp */ + S_ST( 'a', 3, 389, 0 ), /* 705 orph */ + S_ST( 'w', 3, 707, 0 ), /* 706 orphan */ + S_ST( 'a', 3, 708, 0 ), /* 707 orphanw */ + S_ST( 'i', 3, 390, 0 ), /* 708 orphanwa */ + S_ST( 'p', 3, 406, 701 ), /* 709 */ + S_ST( 'a', 3, 711, 0 ), /* 710 p */ + S_ST( 'n', 3, 712, 0 ), /* 711 pa */ + S_ST( 'i', 3, 392, 0 ), /* 712 pan */ + S_ST( 'e', 3, 714, 710 ), /* 713 p */ + S_ST( 'e', 3, 393, 0 ), /* 714 pe */ + S_ST( '_', 3, 716, 0 ), /* 715 peer */ + S_ST( 'c', 3, 717, 0 ), /* 716 peer_ */ + S_ST( 'l', 3, 718, 0 ), /* 717 peer_c */ + S_ST( 'e', 3, 719, 0 ), /* 718 peer_cl */ + S_ST( 'a', 3, 720, 0 ), /* 719 peer_cle */ + S_ST( 'r', 3, 721, 0 ), /* 720 peer_clea */ + S_ST( '_', 3, 722, 0 ), /* 721 peer_clear */ + S_ST( 'd', 3, 723, 0 ), /* 722 peer_clear_ */ + S_ST( 'i', 3, 724, 0 ), /* 723 peer_clear_d */ + S_ST( 'g', 3, 725, 0 ), /* 724 peer_clear_di */ + S_ST( 'e', 3, 726, 0 ), /* 725 peer_clear_dig */ + S_ST( 's', 3, 727, 0 ), /* 726 peer_clear_dige */ + S_ST( 't', 3, 728, 0 ), /* 727 peer_clear_diges */ + S_ST( '_', 3, 729, 0 ), /* 728 peer_clear_digest */ + S_ST( 'e', 3, 730, 0 ), /* 729 peer_clear_digest_ */ + S_ST( 'a', 3, 731, 0 ), /* 730 peer_clear_digest_e */ + S_ST( 'r', 3, 732, 0 ), /* 731 peer_clear_digest_ea */ + S_ST( 'l', 3, 391, 0 ), /* 732 peer_clear_digest_ear */ + S_ST( 's', 3, 734, 715 ), /* 733 peer */ + S_ST( 't', 3, 735, 0 ), /* 734 peers */ + S_ST( 'a', 3, 736, 0 ), /* 735 peerst */ + S_ST( 't', 3, 394, 0 ), /* 736 peersta */ + S_ST( 'h', 3, 738, 713 ), /* 737 p */ + S_ST( 'o', 3, 739, 0 ), /* 738 ph */ + S_ST( 'n', 3, 395, 0 ), /* 739 pho */ + S_ST( 'i', 3, 396, 737 ), /* 740 p */ + S_ST( 'f', 3, 742, 0 ), /* 741 pid */ + S_ST( 'i', 3, 743, 0 ), /* 742 pidf */ + S_ST( 'l', 3, 397, 0 ), /* 743 pidfi */ + S_ST( 'o', 3, 754, 740 ), /* 744 p */ + S_ST( 'l', 3, 398, 0 ), /* 745 po */ + S_ST( 's', 3, 747, 0 ), /* 746 poll */ + S_ST( 'k', 3, 748, 0 ), /* 747 polls */ + S_ST( 'e', 3, 749, 0 ), /* 748 pollsk */ + S_ST( 'w', 3, 750, 0 ), /* 749 pollske */ + S_ST( 'l', 3, 751, 0 ), /* 750 pollskew */ + S_ST( 'i', 3, 752, 0 ), /* 751 pollskewl */ + S_ST( 's', 3, 399, 0 ), /* 752 pollskewli */ + S_ST( 'o', 3, 400, 745 ), /* 753 po */ + S_ST( 'r', 3, 401, 753 ), /* 754 po */ + S_ST( 'p', 3, 756, 744 ), /* 755 p */ + S_ST( 's', 3, 757, 0 ), /* 756 pp */ + S_ST( 'd', 3, 758, 0 ), /* 757 pps */ + S_ST( 'a', 3, 759, 0 ), /* 758 ppsd */ + S_ST( 't', 3, 402, 0 ), /* 759 ppsda */ + S_ST( 'r', 3, 767, 755 ), /* 760 p */ + S_ST( 'e', 3, 765, 0 ), /* 761 pr */ + S_ST( 'e', 3, 763, 0 ), /* 762 pre */ + S_ST( 'm', 3, 764, 0 ), /* 763 pree */ + S_ST( 'p', 3, 403, 0 ), /* 764 preem */ + S_ST( 'f', 3, 766, 762 ), /* 765 pre */ + S_ST( 'e', 3, 404, 0 ), /* 766 pref */ + S_ST( 'o', 3, 780, 761 ), /* 767 pr */ + S_ST( 'c', 3, 769, 0 ), /* 768 pro */ + S_ST( '_', 3, 770, 0 ), /* 769 proc */ + S_ST( 'd', 3, 771, 0 ), /* 770 proc_ */ + S_ST( 'e', 3, 772, 0 ), /* 771 proc_d */ + S_ST( 'l', 3, 773, 0 ), /* 772 proc_de */ + S_ST( 'a', 3, 470, 0 ), /* 773 proc_del */ + S_ST( 'p', 3, 775, 768 ), /* 774 pro */ + S_ST( '_', 3, 776, 0 ), /* 775 prop */ + S_ST( 'd', 3, 777, 0 ), /* 776 prop_ */ + S_ST( 'e', 3, 778, 0 ), /* 777 prop_d */ + S_ST( 'l', 3, 779, 0 ), /* 778 prop_de */ + S_ST( 'a', 3, 469, 0 ), /* 779 prop_del */ + S_ST( 't', 3, 781, 774 ), /* 780 pro */ + S_ST( 'o', 3, 782, 0 ), /* 781 prot */ + S_ST( 's', 3, 783, 0 ), /* 782 proto */ + S_ST( 't', 3, 784, 0 ), /* 783 protos */ + S_ST( 'a', 3, 785, 0 ), /* 784 protost */ + S_ST( 't', 3, 405, 0 ), /* 785 protosta */ + S_ST( 'r', 3, 817, 709 ), /* 786 */ + S_ST( 'a', 3, 793, 0 ), /* 787 r */ + S_ST( 'n', 3, 789, 0 ), /* 788 ra */ + S_ST( 'd', 3, 790, 0 ), /* 789 ran */ + S_ST( 'f', 3, 791, 0 ), /* 790 rand */ + S_ST( 'i', 3, 792, 0 ), /* 791 randf */ + S_ST( 'l', 3, 407, 0 ), /* 792 randfi */ + S_ST( 'w', 3, 794, 788 ), /* 793 ra */ + S_ST( 's', 3, 795, 0 ), /* 794 raw */ + S_ST( 't', 3, 796, 0 ), /* 795 raws */ + S_ST( 'a', 3, 797, 0 ), /* 796 rawst */ + S_ST( 't', 3, 408, 0 ), /* 797 rawsta */ + S_ST( 'e', 3, 814, 787 ), /* 798 r */ + S_ST( 'f', 3, 800, 0 ), /* 799 re */ + S_ST( 'i', 3, 409, 0 ), /* 800 ref */ + S_ST( 'q', 3, 802, 799 ), /* 801 re */ + S_ST( 'u', 3, 803, 0 ), /* 802 req */ + S_ST( 'e', 3, 804, 0 ), /* 803 requ */ + S_ST( 's', 3, 805, 0 ), /* 804 reque */ + S_ST( 't', 3, 806, 0 ), /* 805 reques */ + S_ST( 'k', 3, 807, 0 ), /* 806 request */ + S_ST( 'e', 3, 410, 0 ), /* 807 requestk */ + S_ST( 's', 3, 810, 801 ), /* 808 re */ + S_ST( 'e', 3, 411, 0 ), /* 809 res */ + S_ST( 't', 3, 811, 809 ), /* 810 res */ + S_ST( 'r', 3, 812, 0 ), /* 811 rest */ + S_ST( 'i', 3, 813, 0 ), /* 812 restr */ + S_ST( 'c', 3, 412, 0 ), /* 813 restri */ + S_ST( 'v', 3, 815, 808 ), /* 814 re */ + S_ST( 'o', 3, 816, 0 ), /* 815 rev */ + S_ST( 'k', 3, 413, 0 ), /* 816 revo */ + S_ST( 'l', 3, 818, 798 ), /* 817 r */ + S_ST( 'i', 3, 819, 0 ), /* 818 rl */ + S_ST( 'm', 3, 820, 0 ), /* 819 rli */ + S_ST( 'i', 3, 414, 0 ), /* 820 rlim */ + S_ST( 's', 3, 901, 786 ), /* 821 */ + S_ST( 'a', 3, 823, 0 ), /* 822 s */ + S_ST( 'v', 3, 824, 0 ), /* 823 sa */ + S_ST( 'e', 3, 825, 0 ), /* 824 sav */ + S_ST( 'c', 3, 826, 0 ), /* 825 save */ + S_ST( 'o', 3, 827, 0 ), /* 826 savec */ + S_ST( 'n', 3, 828, 0 ), /* 827 saveco */ + S_ST( 'f', 3, 829, 0 ), /* 828 savecon */ + S_ST( 'i', 3, 830, 0 ), /* 829 saveconf */ + S_ST( 'g', 3, 831, 0 ), /* 830 saveconfi */ + S_ST( 'd', 3, 832, 0 ), /* 831 saveconfig */ + S_ST( 'i', 3, 415, 0 ), /* 832 saveconfigd */ + S_ST( 'e', 3, 850, 822 ), /* 833 s */ + S_ST( 'r', 3, 835, 0 ), /* 834 se */ + S_ST( 'v', 3, 836, 0 ), /* 835 ser */ + S_ST( 'e', 3, 416, 0 ), /* 836 serv */ + S_ST( '_', 3, 838, 0 ), /* 837 server */ + S_ST( 'o', 3, 839, 0 ), /* 838 server_ */ + S_ST( 'f', 3, 840, 0 ), /* 839 server_o */ + S_ST( 'f', 3, 841, 0 ), /* 840 server_of */ + S_ST( 's', 3, 842, 0 ), /* 841 server_off */ + S_ST( 'e', 3, 464, 0 ), /* 842 server_offs */ + S_ST( 'r', 3, 844, 837 ), /* 843 server */ + S_ST( 'e', 3, 845, 0 ), /* 844 serverr */ + S_ST( 's', 3, 846, 0 ), /* 845 serverre */ + S_ST( 'p', 3, 847, 0 ), /* 846 serverres */ + S_ST( 'o', 3, 848, 0 ), /* 847 serverresp */ + S_ST( 'n', 3, 849, 0 ), /* 848 serverrespo */ + S_ST( 's', 3, 417, 0 ), /* 849 serverrespon */ + S_ST( 't', 3, 851, 834 ), /* 850 se */ + S_ST( 'v', 3, 852, 0 ), /* 851 set */ + S_ST( 'a', 3, 419, 0 ), /* 852 setv */ + S_ST( 'i', 3, 854, 833 ), /* 853 s */ + S_ST( 'm', 3, 855, 0 ), /* 854 si */ + S_ST( 'u', 3, 856, 0 ), /* 855 sim */ + S_ST( 'l', 3, 857, 0 ), /* 856 simu */ + S_ST( 'a', 3, 858, 0 ), /* 857 simul */ + S_ST( 't', 3, 859, 0 ), /* 858 simula */ + S_ST( 'i', 3, 860, 461 ), /* 859 simulat */ + S_ST( 'o', 3, 861, 0 ), /* 860 simulati */ + S_ST( 'n', 3, 862, 0 ), /* 861 simulatio */ + S_ST( '_', 3, 863, 0 ), /* 862 simulation */ + S_ST( 'd', 3, 864, 0 ), /* 863 simulation_ */ + S_ST( 'u', 3, 865, 0 ), /* 864 simulation_d */ + S_ST( 'r', 3, 866, 0 ), /* 865 simulation_du */ + S_ST( 'a', 3, 867, 0 ), /* 866 simulation_dur */ + S_ST( 't', 3, 868, 0 ), /* 867 simulation_dura */ + S_ST( 'i', 3, 869, 0 ), /* 868 simulation_durat */ + S_ST( 'o', 3, 463, 0 ), /* 869 simulation_durati */ + S_ST( 'o', 3, 871, 853 ), /* 870 s */ + S_ST( 'u', 3, 872, 0 ), /* 871 so */ + S_ST( 'r', 3, 873, 0 ), /* 872 sou */ + S_ST( 'c', 3, 420, 0 ), /* 873 sour */ + S_ST( 't', 3, 897, 870 ), /* 874 s */ + S_ST( 'a', 3, 881, 0 ), /* 875 st */ + S_ST( 'c', 3, 877, 0 ), /* 876 sta */ + S_ST( 'k', 3, 878, 0 ), /* 877 stac */ + S_ST( 's', 3, 879, 0 ), /* 878 stack */ + S_ST( 'i', 3, 880, 0 ), /* 879 stacks */ + S_ST( 'z', 3, 421, 0 ), /* 880 stacksi */ + S_ST( 't', 3, 423, 876 ), /* 881 sta */ + S_ST( 'i', 3, 883, 0 ), /* 882 stat */ + S_ST( 's', 3, 884, 0 ), /* 883 stati */ + S_ST( 't', 3, 885, 0 ), /* 884 statis */ + S_ST( 'i', 3, 886, 0 ), /* 885 statist */ + S_ST( 'c', 3, 422, 0 ), /* 886 statisti */ + S_ST( 'd', 3, 888, 0 ), /* 887 stats */ + S_ST( 'i', 3, 424, 0 ), /* 888 statsd */ + S_ST( 'e', 3, 425, 875 ), /* 889 st */ + S_ST( 'b', 3, 891, 0 ), /* 890 step */ + S_ST( 'a', 3, 892, 0 ), /* 891 stepb */ + S_ST( 'c', 3, 426, 0 ), /* 892 stepba */ + S_ST( 'f', 3, 894, 890 ), /* 893 step */ + S_ST( 'w', 3, 427, 0 ), /* 894 stepf */ + S_ST( 'o', 3, 896, 893 ), /* 895 step */ + S_ST( 'u', 3, 428, 0 ), /* 896 stepo */ + S_ST( 'r', 3, 898, 889 ), /* 897 st */ + S_ST( 'a', 3, 899, 0 ), /* 898 str */ + S_ST( 't', 3, 900, 0 ), /* 899 stra */ + S_ST( 'u', 3, 429, 0 ), /* 900 strat */ + S_ST( 'y', 3, 431, 874 ), /* 901 s */ + S_ST( 's', 3, 903, 0 ), /* 902 sys */ + S_ST( 't', 3, 904, 0 ), /* 903 syss */ + S_ST( 'a', 3, 905, 0 ), /* 904 sysst */ + S_ST( 't', 3, 432, 0 ), /* 905 syssta */ + S_ST( 't', 3, 935, 821 ), /* 906 */ + S_ST( 'i', 3, 921, 0 ), /* 907 t */ + S_ST( 'c', 3, 433, 0 ), /* 908 ti */ + S_ST( 'm', 3, 914, 908 ), /* 909 ti */ + S_ST( 'e', 3, 437, 0 ), /* 910 tim */ + S_ST( 'd', 3, 912, 435 ), /* 911 time */ + S_ST( 'a', 3, 913, 0 ), /* 912 timed */ + S_ST( 't', 3, 436, 0 ), /* 913 timeda */ + S_ST( 'i', 3, 915, 910 ), /* 914 tim */ + S_ST( 'n', 3, 916, 0 ), /* 915 timi */ + S_ST( 'g', 3, 917, 0 ), /* 916 timin */ + S_ST( 's', 3, 918, 0 ), /* 917 timing */ + S_ST( 't', 3, 919, 0 ), /* 918 timings */ + S_ST( 'a', 3, 920, 0 ), /* 919 timingst */ + S_ST( 't', 3, 438, 0 ), /* 920 timingsta */ + S_ST( 'n', 3, 922, 909 ), /* 921 ti */ + S_ST( 'k', 3, 923, 0 ), /* 922 tin */ + S_ST( 'e', 3, 439, 0 ), /* 923 tink */ + S_ST( 'o', 3, 440, 907 ), /* 924 t */ + S_ST( 'r', 3, 927, 924 ), /* 925 t */ + S_ST( 'a', 3, 441, 0 ), /* 926 tr */ + S_ST( 'u', 3, 928, 926 ), /* 927 tr */ + S_ST( 's', 3, 929, 442 ), /* 928 tru */ + S_ST( 't', 3, 930, 0 ), /* 929 trus */ + S_ST( 'e', 3, 931, 0 ), /* 930 trust */ + S_ST( 'd', 3, 932, 0 ), /* 931 truste */ + S_ST( 'k', 3, 933, 0 ), /* 932 trusted */ + S_ST( 'e', 3, 443, 0 ), /* 933 trustedk */ + S_ST( 't', 3, 444, 925 ), /* 934 t */ + S_ST( 'y', 3, 936, 934 ), /* 935 t */ + S_ST( 'p', 3, 445, 0 ), /* 936 ty */ + S_ST( 'u', 3, 938, 906 ), /* 937 */ + S_ST( 'n', 3, 944, 0 ), /* 938 u */ + S_ST( 'c', 3, 940, 0 ), /* 939 un */ + S_ST( 'o', 3, 941, 0 ), /* 940 unc */ + S_ST( 'n', 3, 942, 0 ), /* 941 unco */ + S_ST( 'f', 3, 943, 0 ), /* 942 uncon */ + S_ST( 'i', 3, 450, 0 ), /* 943 unconf */ + S_ST( 'p', 3, 945, 939 ), /* 944 un */ + S_ST( 'e', 3, 946, 0 ), /* 945 unp */ + S_ST( 'e', 3, 451, 0 ), /* 946 unpe */ + S_ST( '_', 3, 967, 0 ), /* 947 unpeer */ + S_ST( 'c', 3, 949, 0 ), /* 948 unpeer_ */ + S_ST( 'r', 3, 950, 0 ), /* 949 unpeer_c */ + S_ST( 'y', 3, 951, 0 ), /* 950 unpeer_cr */ + S_ST( 'p', 3, 952, 0 ), /* 951 unpeer_cry */ + S_ST( 't', 3, 953, 0 ), /* 952 unpeer_cryp */ + S_ST( 'o', 3, 954, 0 ), /* 953 unpeer_crypt */ + S_ST( '_', 3, 959, 0 ), /* 954 unpeer_crypto */ + S_ST( 'e', 3, 956, 0 ), /* 955 unpeer_crypto_ */ + S_ST( 'a', 3, 957, 0 ), /* 956 unpeer_crypto_e */ + S_ST( 'r', 3, 958, 0 ), /* 957 unpeer_crypto_ea */ + S_ST( 'l', 3, 447, 0 ), /* 958 unpeer_crypto_ear */ + S_ST( 'n', 3, 960, 955 ), /* 959 unpeer_crypto_ */ + S_ST( 'a', 3, 961, 0 ), /* 960 unpeer_crypto_n */ + S_ST( 'k', 3, 962, 0 ), /* 961 unpeer_crypto_na */ + S_ST( '_', 3, 963, 0 ), /* 962 unpeer_crypto_nak */ + S_ST( 'e', 3, 964, 0 ), /* 963 unpeer_crypto_nak_ */ + S_ST( 'a', 3, 965, 0 ), /* 964 unpeer_crypto_nak_e */ + S_ST( 'r', 3, 966, 0 ), /* 965 unpeer_crypto_nak_ea */ + S_ST( 'l', 3, 448, 0 ), /* 966 unpeer_crypto_nak_ear */ + S_ST( 'd', 3, 968, 948 ), /* 967 unpeer_ */ + S_ST( 'i', 3, 969, 0 ), /* 968 unpeer_d */ + S_ST( 'g', 3, 970, 0 ), /* 969 unpeer_di */ + S_ST( 'e', 3, 971, 0 ), /* 970 unpeer_dig */ + S_ST( 's', 3, 972, 0 ), /* 971 unpeer_dige */ + S_ST( 't', 3, 973, 0 ), /* 972 unpeer_diges */ + S_ST( '_', 3, 974, 0 ), /* 973 unpeer_digest */ + S_ST( 'e', 3, 975, 0 ), /* 974 unpeer_digest_ */ + S_ST( 'a', 3, 976, 0 ), /* 975 unpeer_digest_e */ + S_ST( 'r', 3, 977, 0 ), /* 976 unpeer_digest_ea */ + S_ST( 'l', 3, 449, 0 ), /* 977 unpeer_digest_ear */ + S_ST( 'v', 3, 979, 937 ), /* 978 */ + S_ST( 'e', 3, 980, 0 ), /* 979 v */ + S_ST( 'r', 3, 981, 0 ), /* 980 ve */ + S_ST( 's', 3, 982, 0 ), /* 981 ver */ + S_ST( 'i', 3, 983, 0 ), /* 982 vers */ + S_ST( 'o', 3, 452, 0 ), /* 983 versi */ + S_ST( 'w', 3, 991, 978 ), /* 984 */ + S_ST( 'a', 3, 986, 0 ), /* 985 w */ + S_ST( 'n', 3, 987, 0 ), /* 986 wa */ + S_ST( 'd', 3, 988, 0 ), /* 987 wan */ + S_ST( 'e', 3, 467, 0 ), /* 988 wand */ + S_ST( 'e', 3, 990, 985 ), /* 989 w */ + S_ST( 'e', 3, 454, 0 ), /* 990 we */ + S_ST( 'i', 3, 992, 989 ), /* 991 w */ + S_ST( 'l', 3, 993, 0 ), /* 992 wi */ + S_ST( 'd', 3, 994, 0 ), /* 993 wil */ + S_ST( 'c', 3, 995, 0 ), /* 994 wild */ + S_ST( 'a', 3, 996, 0 ), /* 995 wildc */ + S_ST( 'r', 3, 455, 0 ), /* 996 wildca */ + S_ST( 'x', 3, 1002, 984 ), /* 997 */ + S_ST( 'l', 3, 999, 0 ), /* 998 x */ + S_ST( 'e', 3, 1000, 0 ), /* 999 xl */ + S_ST( 'a', 3, 1001, 0 ), /* 1000 xle */ + S_ST( 'v', 3, 456, 0 ), /* 1001 xlea */ + S_ST( 'm', 3, 1003, 998 ), /* 1002 x */ + S_ST( 't', 3, 1004, 0 ), /* 1003 xm */ + S_ST( 'n', 3, 1005, 0 ), /* 1004 xmt */ + S_ST( 'o', 3, 1006, 0 ), /* 1005 xmtn */ + S_ST( 'n', 3, 1007, 0 ), /* 1006 xmtno */ + S_ST( 'c', 3, 457, 0 ), /* 1007 xmtnon */ + S_ST( 'y', 3, 1009, 997 ), /* 1008 [initial state] */ + S_ST( 'e', 3, 1010, 0 ), /* 1009 y */ + S_ST( 'a', 3, 458, 0 ) /* 1010 ye */ }; diff --git a/ntpd/ntp_leapsec.c b/ntpd/ntp_leapsec.c index 88f9d4e1cc23..2618862c57ba 100644 --- a/ntpd/ntp_leapsec.c +++ b/ntpd/ntp_leapsec.c @@ -13,39 +13,17 @@ #include <sys/stat.h> #include <ctype.h> -#include "ntp_types.h" -#include "ntp_fp.h" +#include "ntp.h" #include "ntp_stdlib.h" #include "ntp_calendar.h" #include "ntp_leapsec.h" -#include "ntp.h" #include "vint64ops.h" -#include "lib_strbuf.h" #include "isc/sha1.h" static const char * const logPrefix = "leapsecond file"; /* --------------------------------------------------------------------- - * GCC is rather sticky with its 'const' attribute. We have to do it more - * explicit than with a cast if we want to get rid of a CONST qualifier. - * Greetings from the PASCAL world, where casting was only possible via - * untagged unions... - */ -static inline void* -noconst( - const void* ptr - ) -{ - union { - const void * cp; - void * vp; - } tmp; - tmp.cp = ptr; - return tmp.vp; -} - -/* --------------------------------------------------------------------- * Our internal data structure */ #define MAX_HIST 10 /* history of leap seconds */ @@ -84,18 +62,20 @@ static leap_table_t _ltab[2], *_lptr; static int/*BOOL*/ _electric; /* Forward decls of local helpers */ -static int add_range(leap_table_t*, const leap_info_t*); -static char * get_line(leapsec_reader, void*, char*, size_t); -static char * skipws(const char*); -static int parsefail(const char * cp, const char * ep); -static void reload_limits(leap_table_t*, const vint64*); -static void fetch_leap_era(leap_era_t*, const leap_table_t*, - const vint64*); -static int betweenu32(uint32_t, uint32_t, uint32_t); -static void reset_times(leap_table_t*); -static int leapsec_add(leap_table_t*, const vint64*, int); -static int leapsec_raw(leap_table_t*, const vint64 *, int, int); -static const char * lstostr(const vint64 * ts); +static int add_range (leap_table_t *, const leap_info_t *); +static char * get_line (leapsec_reader, void *, char *, + size_t); +static inline char * skipws (char *ptr); +static int parsefail (const char *cp, const char *ep); +static void reload_limits (leap_table_t *, const vint64 *); +static void fetch_leap_era (leap_era_t *, const leap_table_t *, + const vint64 *); +static int betweenu32 (u_int32, u_int32, u_int32); +static void reset_times (leap_table_t *); +static int leapsec_add (leap_table_t *, const vint64 *, int); +static int leapsec_raw (leap_table_t *, const vint64 *, int, + int); +static const char * lstostr (const vint64 *ts); /* ===================================================================== * Get & Set the current leap table @@ -178,13 +158,13 @@ leapsec_clear( */ int/*BOOL*/ leapsec_load( - leap_table_t * pt , - leapsec_reader func, - void * farg, - int use_build_limit) + leap_table_t * pt, + leapsec_reader func, + void * farg, + int use_build_limit + ) { - char const *ep; - char *cp, *endp, linebuf[50]; + char *cp, *ep, *endp, linebuf[50]; vint64 ttime, limit; long taiof; struct calendar build; @@ -415,7 +395,7 @@ leapsec_reset_frame(void) } /* ------------------------------------------------------------------ */ -/* load a file from a FILE pointer. Note: If hcheck is true, load +/* load a file from a FILE pointer. Note: If vhash is true, load * only after successful signature check. The stream must be seekable * or this will fail. */ @@ -433,7 +413,7 @@ leapsec_load_stream( fname = "<unknown>"; if (vhash) { - rcheck = leapsec_validate((leapsec_reader)getc, ifp); + rcheck = leapsec_validate((leapsec_reader)&getc, ifp); if (logall) switch (rcheck) { @@ -822,13 +802,15 @@ get_line( } /* [internal] skips whitespace characters from a character buffer. */ -static char * +static inline char * skipws( - const char *ptr) + char * ptr + ) { - while (isspace((u_char)*ptr)) + while (isspace((u_char)*ptr)) { ptr++; - return (char*)noconst(ptr); + } + return ptr; } /* [internal] check if a strtoXYZ ended at EOL or whitespace and @@ -887,7 +869,7 @@ reload_limits( if (_electric) pt->head.dtime = pt->head.ttime; - else + else pt->head.dtime = addv64i32( &pt->head.ttime, pt->head.next_tai - pt->head.this_tai); diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index e76e4dce0711..6378e0d7e669 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -1027,6 +1027,22 @@ rstclock( tc_counter)); if (trans != state && trans != EVNT_FSET) report_event(trans, NULL, NULL); +#ifdef HAVE_WORKING_FORK + if (trans != state && EVNT_SYNC == trans) { + /* + * If our parent process is waiting for the + * first clock sync, send them home satisfied. + */ + if (daemon_pipe[1] != -1) { + if (2 != write(daemon_pipe[1], "S\n", 2)) { + msyslog(LOG_ERR, "daemon failed to notify parent ntpd (--wait-sync)"); + } + close(daemon_pipe[1]); + daemon_pipe[1] = -1; + } + } +#endif /* HAVE_WORKING_FORK */ + state = trans; last_offset = clock_offset = offset; clock_epoch = current_time; diff --git a/ntpd/ntp_monitor.c b/ntpd/ntp_monitor.c index b3db452a243e..8af8dff301c4 100644 --- a/ntpd/ntp_monitor.c +++ b/ntpd/ntp_monitor.c @@ -329,9 +329,9 @@ ntp_monitor( REQUIRE(rbufp != NULL); - if (mon_enabled == MON_OFF) + if (mon_enabled == MON_OFF) { return ~(RES_LIMITED | RES_KOD) & flags; - + } pkt = &rbufp->recv_pkt; hash = MON_HASH(&rbufp->recv_srcadr); mode = PKT_MODE(pkt->li_vn_mode); @@ -343,10 +343,11 @@ ntp_monitor( * otherwise cron'ed ntpdate or similar evades RES_LIMITED. */ - for (; mon != NULL; mon = mon->hash_next) - if (SOCK_EQ(&mon->rmtadr, &rbufp->recv_srcadr)) + for (; mon != NULL; mon = mon->hash_next) { + if (SOCK_EQ(&mon->rmtadr, &rbufp->recv_srcadr)) { break; - + } + } if (mon != NULL) { interval_fp = rbufp->recv_time; L_SUB(&interval_fp, &mon->last); @@ -388,17 +389,17 @@ ntp_monitor( * the average threshold plus the increment and leave * the RES_LIMITED and RES_KOD bits lit. Otherwise, * leave the counter alone and douse the RES_KOD bit. - * This rate-limits the KoDs to no less than the average - * headway. + * This rate-limits the KoDs to no more often than the + * average headway. */ if (interval + 1 >= ntp_minpkt && leak < limit) { mon->leak = leak - 2; restrict_mask &= ~(RES_LIMITED | RES_KOD); - } else if (mon->leak < limit) + } else if (mon->leak < limit) { mon->leak = limit + head; - else + } else { restrict_mask &= ~RES_KOD; - + } mon->flags = restrict_mask; return mon->flags; diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c index 834b1fbd1acc..e5ee5e10a459 100644 --- a/ntpd/ntp_parser.c +++ b/ntpd/ntp_parser.c @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +#define YYBISON 30802 /* Bison version string. */ -#define YYBISON_VERSION "3.7.6" +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -67,7 +67,7 @@ /* First part of user prologue. */ -#line 11 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 11 "../../ntpd/ntp_parser.y" #ifdef HAVE_CONFIG_H # include <config.h> @@ -102,7 +102,7 @@ # define ONLY_SIM(a) NULL #endif -#line 106 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 106 "ntp_parser.c" # ifndef YY_CAST # ifdef __cplusplus @@ -127,8 +127,8 @@ /* Use api.header.include to #include this header instead of duplicating it here. */ -#ifndef YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED -# define YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED +#ifndef YY_YY_NTP_PARSER_H_INCLUDED +# define YY_YY_NTP_PARSER_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -174,190 +174,191 @@ extern int yydebug; T_Ctl = 283, /* T_Ctl */ T_Day = 284, /* T_Day */ T_Default = 285, /* T_Default */ - T_Device = 286, /* T_Device */ - T_Digest = 287, /* T_Digest */ - T_Disable = 288, /* T_Disable */ - T_Discard = 289, /* T_Discard */ - T_Dispersion = 290, /* T_Dispersion */ - T_Double = 291, /* T_Double */ - T_Driftfile = 292, /* T_Driftfile */ - T_Drop = 293, /* T_Drop */ - T_Dscp = 294, /* T_Dscp */ - T_Ellipsis = 295, /* T_Ellipsis */ - T_Enable = 296, /* T_Enable */ - T_End = 297, /* T_End */ - T_Epeer = 298, /* T_Epeer */ - T_False = 299, /* T_False */ - T_File = 300, /* T_File */ - T_Filegen = 301, /* T_Filegen */ - T_Filenum = 302, /* T_Filenum */ - T_Flag1 = 303, /* T_Flag1 */ - T_Flag2 = 304, /* T_Flag2 */ - T_Flag3 = 305, /* T_Flag3 */ - T_Flag4 = 306, /* T_Flag4 */ - T_Flake = 307, /* T_Flake */ - T_Floor = 308, /* T_Floor */ - T_Freq = 309, /* T_Freq */ - T_Fudge = 310, /* T_Fudge */ - T_Fuzz = 311, /* T_Fuzz */ - T_Host = 312, /* T_Host */ - T_Huffpuff = 313, /* T_Huffpuff */ - T_Iburst = 314, /* T_Iburst */ - T_Ident = 315, /* T_Ident */ - T_Ignore = 316, /* T_Ignore */ - T_Ignorehash = 317, /* T_Ignorehash */ - T_Incalloc = 318, /* T_Incalloc */ - T_Incmem = 319, /* T_Incmem */ - T_Initalloc = 320, /* T_Initalloc */ - T_Initmem = 321, /* T_Initmem */ - T_Includefile = 322, /* T_Includefile */ - T_Integer = 323, /* T_Integer */ - T_Interface = 324, /* T_Interface */ - T_Intrange = 325, /* T_Intrange */ - T_Io = 326, /* T_Io */ - T_Ippeerlimit = 327, /* T_Ippeerlimit */ - T_Ipv4 = 328, /* T_Ipv4 */ - T_Ipv4_flag = 329, /* T_Ipv4_flag */ - T_Ipv6 = 330, /* T_Ipv6 */ - T_Ipv6_flag = 331, /* T_Ipv6_flag */ - T_Kernel = 332, /* T_Kernel */ - T_Key = 333, /* T_Key */ - T_Keys = 334, /* T_Keys */ - T_Keysdir = 335, /* T_Keysdir */ - T_Kod = 336, /* T_Kod */ - T_Leapfile = 337, /* T_Leapfile */ - T_Leapsmearinterval = 338, /* T_Leapsmearinterval */ - T_Limited = 339, /* T_Limited */ - T_Link = 340, /* T_Link */ - T_Listen = 341, /* T_Listen */ - T_Logconfig = 342, /* T_Logconfig */ - T_Logfile = 343, /* T_Logfile */ - T_Loopstats = 344, /* T_Loopstats */ - T_Lowpriotrap = 345, /* T_Lowpriotrap */ - T_Manycastclient = 346, /* T_Manycastclient */ - T_Manycastserver = 347, /* T_Manycastserver */ - T_Mask = 348, /* T_Mask */ - T_Maxage = 349, /* T_Maxage */ - T_Maxclock = 350, /* T_Maxclock */ - T_Maxdepth = 351, /* T_Maxdepth */ - T_Maxdist = 352, /* T_Maxdist */ - T_Maxmem = 353, /* T_Maxmem */ - T_Maxpoll = 354, /* T_Maxpoll */ - T_Mdnstries = 355, /* T_Mdnstries */ - T_Mem = 356, /* T_Mem */ - T_Memlock = 357, /* T_Memlock */ - T_Minclock = 358, /* T_Minclock */ - T_Mindepth = 359, /* T_Mindepth */ - T_Mindist = 360, /* T_Mindist */ - T_Minimum = 361, /* T_Minimum */ - T_Minjitter = 362, /* T_Minjitter */ - T_Minpoll = 363, /* T_Minpoll */ - T_Minsane = 364, /* T_Minsane */ - T_Mode = 365, /* T_Mode */ - T_Mode7 = 366, /* T_Mode7 */ - T_Monitor = 367, /* T_Monitor */ - T_Month = 368, /* T_Month */ - T_Mru = 369, /* T_Mru */ - T_Mssntp = 370, /* T_Mssntp */ - T_Multicastclient = 371, /* T_Multicastclient */ - T_Nic = 372, /* T_Nic */ - T_Nolink = 373, /* T_Nolink */ - T_Nomodify = 374, /* T_Nomodify */ - T_Nomrulist = 375, /* T_Nomrulist */ - T_None = 376, /* T_None */ - T_Nonvolatile = 377, /* T_Nonvolatile */ - T_Noepeer = 378, /* T_Noepeer */ - T_Nopeer = 379, /* T_Nopeer */ - T_Noquery = 380, /* T_Noquery */ - T_Noselect = 381, /* T_Noselect */ - T_Noserve = 382, /* T_Noserve */ - T_Notrap = 383, /* T_Notrap */ - T_Notrust = 384, /* T_Notrust */ - T_Ntp = 385, /* T_Ntp */ - T_Ntpport = 386, /* T_Ntpport */ - T_NtpSignDsocket = 387, /* T_NtpSignDsocket */ - T_Orphan = 388, /* T_Orphan */ - T_Orphanwait = 389, /* T_Orphanwait */ - T_PCEdigest = 390, /* T_PCEdigest */ - T_Panic = 391, /* T_Panic */ - T_Peer = 392, /* T_Peer */ - T_Peerstats = 393, /* T_Peerstats */ - T_Phone = 394, /* T_Phone */ - T_Pid = 395, /* T_Pid */ - T_Pidfile = 396, /* T_Pidfile */ - T_Poll = 397, /* T_Poll */ - T_PollSkewList = 398, /* T_PollSkewList */ - T_Pool = 399, /* T_Pool */ - T_Port = 400, /* T_Port */ - T_PpsData = 401, /* T_PpsData */ - T_Preempt = 402, /* T_Preempt */ - T_Prefer = 403, /* T_Prefer */ - T_Protostats = 404, /* T_Protostats */ - T_Pw = 405, /* T_Pw */ - T_Randfile = 406, /* T_Randfile */ - T_Rawstats = 407, /* T_Rawstats */ - T_Refid = 408, /* T_Refid */ - T_Requestkey = 409, /* T_Requestkey */ - T_Reset = 410, /* T_Reset */ - T_Restrict = 411, /* T_Restrict */ - T_Revoke = 412, /* T_Revoke */ - T_Rlimit = 413, /* T_Rlimit */ - T_Saveconfigdir = 414, /* T_Saveconfigdir */ - T_Server = 415, /* T_Server */ - T_Serverresponse = 416, /* T_Serverresponse */ - T_ServerresponseFuzz = 417, /* T_ServerresponseFuzz */ - T_Setvar = 418, /* T_Setvar */ - T_Source = 419, /* T_Source */ - T_Stacksize = 420, /* T_Stacksize */ - T_Statistics = 421, /* T_Statistics */ - T_Stats = 422, /* T_Stats */ - T_Statsdir = 423, /* T_Statsdir */ - T_Step = 424, /* T_Step */ - T_Stepback = 425, /* T_Stepback */ - T_Stepfwd = 426, /* T_Stepfwd */ - T_Stepout = 427, /* T_Stepout */ - T_Stratum = 428, /* T_Stratum */ - T_String = 429, /* T_String */ - T_Sys = 430, /* T_Sys */ - T_Sysstats = 431, /* T_Sysstats */ - T_Tick = 432, /* T_Tick */ - T_Time1 = 433, /* T_Time1 */ - T_Time2 = 434, /* T_Time2 */ - T_TimeData = 435, /* T_TimeData */ - T_Timer = 436, /* T_Timer */ - T_Timingstats = 437, /* T_Timingstats */ - T_Tinker = 438, /* T_Tinker */ - T_Tos = 439, /* T_Tos */ - T_Trap = 440, /* T_Trap */ - T_True = 441, /* T_True */ - T_Trustedkey = 442, /* T_Trustedkey */ - T_Ttl = 443, /* T_Ttl */ - T_Type = 444, /* T_Type */ - T_U_int = 445, /* T_U_int */ - T_UEcrypto = 446, /* T_UEcrypto */ - T_UEcryptonak = 447, /* T_UEcryptonak */ - T_UEdigest = 448, /* T_UEdigest */ - T_Unconfig = 449, /* T_Unconfig */ - T_Unpeer = 450, /* T_Unpeer */ - T_Version = 451, /* T_Version */ - T_WanderThreshold = 452, /* T_WanderThreshold */ - T_Week = 453, /* T_Week */ - T_Wildcard = 454, /* T_Wildcard */ - T_Xleave = 455, /* T_Xleave */ - T_Xmtnonce = 456, /* T_Xmtnonce */ - T_Year = 457, /* T_Year */ - T_Flag = 458, /* T_Flag */ - T_EOC = 459, /* T_EOC */ - T_Simulate = 460, /* T_Simulate */ - T_Beep_Delay = 461, /* T_Beep_Delay */ - T_Sim_Duration = 462, /* T_Sim_Duration */ - T_Server_Offset = 463, /* T_Server_Offset */ - T_Duration = 464, /* T_Duration */ - T_Freq_Offset = 465, /* T_Freq_Offset */ - T_Wander = 466, /* T_Wander */ - T_Jitter = 467, /* T_Jitter */ - T_Prop_Delay = 468, /* T_Prop_Delay */ - T_Proc_Delay = 469 /* T_Proc_Delay */ + T_Delrestrict = 286, /* T_Delrestrict */ + T_Device = 287, /* T_Device */ + T_Digest = 288, /* T_Digest */ + T_Disable = 289, /* T_Disable */ + T_Discard = 290, /* T_Discard */ + T_Dispersion = 291, /* T_Dispersion */ + T_Double = 292, /* T_Double */ + T_Driftfile = 293, /* T_Driftfile */ + T_Drop = 294, /* T_Drop */ + T_Dscp = 295, /* T_Dscp */ + T_Ellipsis = 296, /* T_Ellipsis */ + T_Enable = 297, /* T_Enable */ + T_End = 298, /* T_End */ + T_Epeer = 299, /* T_Epeer */ + T_False = 300, /* T_False */ + T_File = 301, /* T_File */ + T_Filegen = 302, /* T_Filegen */ + T_Filenum = 303, /* T_Filenum */ + T_Flag1 = 304, /* T_Flag1 */ + T_Flag2 = 305, /* T_Flag2 */ + T_Flag3 = 306, /* T_Flag3 */ + T_Flag4 = 307, /* T_Flag4 */ + T_Flake = 308, /* T_Flake */ + T_Floor = 309, /* T_Floor */ + T_Freq = 310, /* T_Freq */ + T_Fudge = 311, /* T_Fudge */ + T_Fuzz = 312, /* T_Fuzz */ + T_Host = 313, /* T_Host */ + T_Huffpuff = 314, /* T_Huffpuff */ + T_Iburst = 315, /* T_Iburst */ + T_Ident = 316, /* T_Ident */ + T_Ignore = 317, /* T_Ignore */ + T_Ignorehash = 318, /* T_Ignorehash */ + T_Incalloc = 319, /* T_Incalloc */ + T_Incmem = 320, /* T_Incmem */ + T_Initalloc = 321, /* T_Initalloc */ + T_Initmem = 322, /* T_Initmem */ + T_Includefile = 323, /* T_Includefile */ + T_Integer = 324, /* T_Integer */ + T_Interface = 325, /* T_Interface */ + T_Intrange = 326, /* T_Intrange */ + T_Io = 327, /* T_Io */ + T_Ippeerlimit = 328, /* T_Ippeerlimit */ + T_Ipv4 = 329, /* T_Ipv4 */ + T_Ipv4_flag = 330, /* T_Ipv4_flag */ + T_Ipv6 = 331, /* T_Ipv6 */ + T_Ipv6_flag = 332, /* T_Ipv6_flag */ + T_Kernel = 333, /* T_Kernel */ + T_Key = 334, /* T_Key */ + T_Keys = 335, /* T_Keys */ + T_Keysdir = 336, /* T_Keysdir */ + T_Kod = 337, /* T_Kod */ + T_Leapfile = 338, /* T_Leapfile */ + T_Leapsmearinterval = 339, /* T_Leapsmearinterval */ + T_Limited = 340, /* T_Limited */ + T_Link = 341, /* T_Link */ + T_Listen = 342, /* T_Listen */ + T_Logconfig = 343, /* T_Logconfig */ + T_Logfile = 344, /* T_Logfile */ + T_Loopstats = 345, /* T_Loopstats */ + T_Lowpriotrap = 346, /* T_Lowpriotrap */ + T_Manycastclient = 347, /* T_Manycastclient */ + T_Manycastserver = 348, /* T_Manycastserver */ + T_Mask = 349, /* T_Mask */ + T_Maxage = 350, /* T_Maxage */ + T_Maxclock = 351, /* T_Maxclock */ + T_Maxdepth = 352, /* T_Maxdepth */ + T_Maxdist = 353, /* T_Maxdist */ + T_Maxmem = 354, /* T_Maxmem */ + T_Maxpoll = 355, /* T_Maxpoll */ + T_Mdnstries = 356, /* T_Mdnstries */ + T_Mem = 357, /* T_Mem */ + T_Memlock = 358, /* T_Memlock */ + T_Minclock = 359, /* T_Minclock */ + T_Mindepth = 360, /* T_Mindepth */ + T_Mindist = 361, /* T_Mindist */ + T_Minimum = 362, /* T_Minimum */ + T_Minjitter = 363, /* T_Minjitter */ + T_Minpoll = 364, /* T_Minpoll */ + T_Minsane = 365, /* T_Minsane */ + T_Mode = 366, /* T_Mode */ + T_Mode7 = 367, /* T_Mode7 */ + T_Monitor = 368, /* T_Monitor */ + T_Month = 369, /* T_Month */ + T_Mru = 370, /* T_Mru */ + T_Mssntp = 371, /* T_Mssntp */ + T_Multicastclient = 372, /* T_Multicastclient */ + T_Nic = 373, /* T_Nic */ + T_Nolink = 374, /* T_Nolink */ + T_Nomodify = 375, /* T_Nomodify */ + T_Nomrulist = 376, /* T_Nomrulist */ + T_None = 377, /* T_None */ + T_Nonvolatile = 378, /* T_Nonvolatile */ + T_Noepeer = 379, /* T_Noepeer */ + T_Nopeer = 380, /* T_Nopeer */ + T_Noquery = 381, /* T_Noquery */ + T_Noselect = 382, /* T_Noselect */ + T_Noserve = 383, /* T_Noserve */ + T_Notrap = 384, /* T_Notrap */ + T_Notrust = 385, /* T_Notrust */ + T_Ntp = 386, /* T_Ntp */ + T_Ntpport = 387, /* T_Ntpport */ + T_NtpSignDsocket = 388, /* T_NtpSignDsocket */ + T_Orphan = 389, /* T_Orphan */ + T_Orphanwait = 390, /* T_Orphanwait */ + T_PCEdigest = 391, /* T_PCEdigest */ + T_Panic = 392, /* T_Panic */ + T_Peer = 393, /* T_Peer */ + T_Peerstats = 394, /* T_Peerstats */ + T_Phone = 395, /* T_Phone */ + T_Pid = 396, /* T_Pid */ + T_Pidfile = 397, /* T_Pidfile */ + T_Poll = 398, /* T_Poll */ + T_PollSkewList = 399, /* T_PollSkewList */ + T_Pool = 400, /* T_Pool */ + T_Port = 401, /* T_Port */ + T_PpsData = 402, /* T_PpsData */ + T_Preempt = 403, /* T_Preempt */ + T_Prefer = 404, /* T_Prefer */ + T_Protostats = 405, /* T_Protostats */ + T_Pw = 406, /* T_Pw */ + T_Randfile = 407, /* T_Randfile */ + T_Rawstats = 408, /* T_Rawstats */ + T_Refid = 409, /* T_Refid */ + T_Requestkey = 410, /* T_Requestkey */ + T_Reset = 411, /* T_Reset */ + T_Restrict = 412, /* T_Restrict */ + T_Revoke = 413, /* T_Revoke */ + T_Rlimit = 414, /* T_Rlimit */ + T_Saveconfigdir = 415, /* T_Saveconfigdir */ + T_Server = 416, /* T_Server */ + T_Serverresponse = 417, /* T_Serverresponse */ + T_ServerresponseFuzz = 418, /* T_ServerresponseFuzz */ + T_Setvar = 419, /* T_Setvar */ + T_Source = 420, /* T_Source */ + T_Stacksize = 421, /* T_Stacksize */ + T_Statistics = 422, /* T_Statistics */ + T_Stats = 423, /* T_Stats */ + T_Statsdir = 424, /* T_Statsdir */ + T_Step = 425, /* T_Step */ + T_Stepback = 426, /* T_Stepback */ + T_Stepfwd = 427, /* T_Stepfwd */ + T_Stepout = 428, /* T_Stepout */ + T_Stratum = 429, /* T_Stratum */ + T_String = 430, /* T_String */ + T_Sys = 431, /* T_Sys */ + T_Sysstats = 432, /* T_Sysstats */ + T_Tick = 433, /* T_Tick */ + T_Time1 = 434, /* T_Time1 */ + T_Time2 = 435, /* T_Time2 */ + T_TimeData = 436, /* T_TimeData */ + T_Timer = 437, /* T_Timer */ + T_Timingstats = 438, /* T_Timingstats */ + T_Tinker = 439, /* T_Tinker */ + T_Tos = 440, /* T_Tos */ + T_Trap = 441, /* T_Trap */ + T_True = 442, /* T_True */ + T_Trustedkey = 443, /* T_Trustedkey */ + T_Ttl = 444, /* T_Ttl */ + T_Type = 445, /* T_Type */ + T_U_int = 446, /* T_U_int */ + T_UEcrypto = 447, /* T_UEcrypto */ + T_UEcryptonak = 448, /* T_UEcryptonak */ + T_UEdigest = 449, /* T_UEdigest */ + T_Unconfig = 450, /* T_Unconfig */ + T_Unpeer = 451, /* T_Unpeer */ + T_Version = 452, /* T_Version */ + T_WanderThreshold = 453, /* T_WanderThreshold */ + T_Week = 454, /* T_Week */ + T_Wildcard = 455, /* T_Wildcard */ + T_Xleave = 456, /* T_Xleave */ + T_Xmtnonce = 457, /* T_Xmtnonce */ + T_Year = 458, /* T_Year */ + T_Flag = 459, /* T_Flag */ + T_EOC = 460, /* T_EOC */ + T_Simulate = 461, /* T_Simulate */ + T_Beep_Delay = 462, /* T_Beep_Delay */ + T_Sim_Duration = 463, /* T_Sim_Duration */ + T_Server_Offset = 464, /* T_Server_Offset */ + T_Duration = 465, /* T_Duration */ + T_Freq_Offset = 466, /* T_Freq_Offset */ + T_Wander = 467, /* T_Wander */ + T_Jitter = 468, /* T_Jitter */ + T_Prop_Delay = 469, /* T_Prop_Delay */ + T_Proc_Delay = 470 /* T_Proc_Delay */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -394,196 +395,197 @@ extern int yydebug; #define T_Ctl 283 #define T_Day 284 #define T_Default 285 -#define T_Device 286 -#define T_Digest 287 -#define T_Disable 288 -#define T_Discard 289 -#define T_Dispersion 290 -#define T_Double 291 -#define T_Driftfile 292 -#define T_Drop 293 -#define T_Dscp 294 -#define T_Ellipsis 295 -#define T_Enable 296 -#define T_End 297 -#define T_Epeer 298 -#define T_False 299 -#define T_File 300 -#define T_Filegen 301 -#define T_Filenum 302 -#define T_Flag1 303 -#define T_Flag2 304 -#define T_Flag3 305 -#define T_Flag4 306 -#define T_Flake 307 -#define T_Floor 308 -#define T_Freq 309 -#define T_Fudge 310 -#define T_Fuzz 311 -#define T_Host 312 -#define T_Huffpuff 313 -#define T_Iburst 314 -#define T_Ident 315 -#define T_Ignore 316 -#define T_Ignorehash 317 -#define T_Incalloc 318 -#define T_Incmem 319 -#define T_Initalloc 320 -#define T_Initmem 321 -#define T_Includefile 322 -#define T_Integer 323 -#define T_Interface 324 -#define T_Intrange 325 -#define T_Io 326 -#define T_Ippeerlimit 327 -#define T_Ipv4 328 -#define T_Ipv4_flag 329 -#define T_Ipv6 330 -#define T_Ipv6_flag 331 -#define T_Kernel 332 -#define T_Key 333 -#define T_Keys 334 -#define T_Keysdir 335 -#define T_Kod 336 -#define T_Leapfile 337 -#define T_Leapsmearinterval 338 -#define T_Limited 339 -#define T_Link 340 -#define T_Listen 341 -#define T_Logconfig 342 -#define T_Logfile 343 -#define T_Loopstats 344 -#define T_Lowpriotrap 345 -#define T_Manycastclient 346 -#define T_Manycastserver 347 -#define T_Mask 348 -#define T_Maxage 349 -#define T_Maxclock 350 -#define T_Maxdepth 351 -#define T_Maxdist 352 -#define T_Maxmem 353 -#define T_Maxpoll 354 -#define T_Mdnstries 355 -#define T_Mem 356 -#define T_Memlock 357 -#define T_Minclock 358 -#define T_Mindepth 359 -#define T_Mindist 360 -#define T_Minimum 361 -#define T_Minjitter 362 -#define T_Minpoll 363 -#define T_Minsane 364 -#define T_Mode 365 -#define T_Mode7 366 -#define T_Monitor 367 -#define T_Month 368 -#define T_Mru 369 -#define T_Mssntp 370 -#define T_Multicastclient 371 -#define T_Nic 372 -#define T_Nolink 373 -#define T_Nomodify 374 -#define T_Nomrulist 375 -#define T_None 376 -#define T_Nonvolatile 377 -#define T_Noepeer 378 -#define T_Nopeer 379 -#define T_Noquery 380 -#define T_Noselect 381 -#define T_Noserve 382 -#define T_Notrap 383 -#define T_Notrust 384 -#define T_Ntp 385 -#define T_Ntpport 386 -#define T_NtpSignDsocket 387 -#define T_Orphan 388 -#define T_Orphanwait 389 -#define T_PCEdigest 390 -#define T_Panic 391 -#define T_Peer 392 -#define T_Peerstats 393 -#define T_Phone 394 -#define T_Pid 395 -#define T_Pidfile 396 -#define T_Poll 397 -#define T_PollSkewList 398 -#define T_Pool 399 -#define T_Port 400 -#define T_PpsData 401 -#define T_Preempt 402 -#define T_Prefer 403 -#define T_Protostats 404 -#define T_Pw 405 -#define T_Randfile 406 -#define T_Rawstats 407 -#define T_Refid 408 -#define T_Requestkey 409 -#define T_Reset 410 -#define T_Restrict 411 -#define T_Revoke 412 -#define T_Rlimit 413 -#define T_Saveconfigdir 414 -#define T_Server 415 -#define T_Serverresponse 416 -#define T_ServerresponseFuzz 417 -#define T_Setvar 418 -#define T_Source 419 -#define T_Stacksize 420 -#define T_Statistics 421 -#define T_Stats 422 -#define T_Statsdir 423 -#define T_Step 424 -#define T_Stepback 425 -#define T_Stepfwd 426 -#define T_Stepout 427 -#define T_Stratum 428 -#define T_String 429 -#define T_Sys 430 -#define T_Sysstats 431 -#define T_Tick 432 -#define T_Time1 433 -#define T_Time2 434 -#define T_TimeData 435 -#define T_Timer 436 -#define T_Timingstats 437 -#define T_Tinker 438 -#define T_Tos 439 -#define T_Trap 440 -#define T_True 441 -#define T_Trustedkey 442 -#define T_Ttl 443 -#define T_Type 444 -#define T_U_int 445 -#define T_UEcrypto 446 -#define T_UEcryptonak 447 -#define T_UEdigest 448 -#define T_Unconfig 449 -#define T_Unpeer 450 -#define T_Version 451 -#define T_WanderThreshold 452 -#define T_Week 453 -#define T_Wildcard 454 -#define T_Xleave 455 -#define T_Xmtnonce 456 -#define T_Year 457 -#define T_Flag 458 -#define T_EOC 459 -#define T_Simulate 460 -#define T_Beep_Delay 461 -#define T_Sim_Duration 462 -#define T_Server_Offset 463 -#define T_Duration 464 -#define T_Freq_Offset 465 -#define T_Wander 466 -#define T_Jitter 467 -#define T_Prop_Delay 468 -#define T_Proc_Delay 469 +#define T_Delrestrict 286 +#define T_Device 287 +#define T_Digest 288 +#define T_Disable 289 +#define T_Discard 290 +#define T_Dispersion 291 +#define T_Double 292 +#define T_Driftfile 293 +#define T_Drop 294 +#define T_Dscp 295 +#define T_Ellipsis 296 +#define T_Enable 297 +#define T_End 298 +#define T_Epeer 299 +#define T_False 300 +#define T_File 301 +#define T_Filegen 302 +#define T_Filenum 303 +#define T_Flag1 304 +#define T_Flag2 305 +#define T_Flag3 306 +#define T_Flag4 307 +#define T_Flake 308 +#define T_Floor 309 +#define T_Freq 310 +#define T_Fudge 311 +#define T_Fuzz 312 +#define T_Host 313 +#define T_Huffpuff 314 +#define T_Iburst 315 +#define T_Ident 316 +#define T_Ignore 317 +#define T_Ignorehash 318 +#define T_Incalloc 319 +#define T_Incmem 320 +#define T_Initalloc 321 +#define T_Initmem 322 +#define T_Includefile 323 +#define T_Integer 324 +#define T_Interface 325 +#define T_Intrange 326 +#define T_Io 327 +#define T_Ippeerlimit 328 +#define T_Ipv4 329 +#define T_Ipv4_flag 330 +#define T_Ipv6 331 +#define T_Ipv6_flag 332 +#define T_Kernel 333 +#define T_Key 334 +#define T_Keys 335 +#define T_Keysdir 336 +#define T_Kod 337 +#define T_Leapfile 338 +#define T_Leapsmearinterval 339 +#define T_Limited 340 +#define T_Link 341 +#define T_Listen 342 +#define T_Logconfig 343 +#define T_Logfile 344 +#define T_Loopstats 345 +#define T_Lowpriotrap 346 +#define T_Manycastclient 347 +#define T_Manycastserver 348 +#define T_Mask 349 +#define T_Maxage 350 +#define T_Maxclock 351 +#define T_Maxdepth 352 +#define T_Maxdist 353 +#define T_Maxmem 354 +#define T_Maxpoll 355 +#define T_Mdnstries 356 +#define T_Mem 357 +#define T_Memlock 358 +#define T_Minclock 359 +#define T_Mindepth 360 +#define T_Mindist 361 +#define T_Minimum 362 +#define T_Minjitter 363 +#define T_Minpoll 364 +#define T_Minsane 365 +#define T_Mode 366 +#define T_Mode7 367 +#define T_Monitor 368 +#define T_Month 369 +#define T_Mru 370 +#define T_Mssntp 371 +#define T_Multicastclient 372 +#define T_Nic 373 +#define T_Nolink 374 +#define T_Nomodify 375 +#define T_Nomrulist 376 +#define T_None 377 +#define T_Nonvolatile 378 +#define T_Noepeer 379 +#define T_Nopeer 380 +#define T_Noquery 381 +#define T_Noselect 382 +#define T_Noserve 383 +#define T_Notrap 384 +#define T_Notrust 385 +#define T_Ntp 386 +#define T_Ntpport 387 +#define T_NtpSignDsocket 388 +#define T_Orphan 389 +#define T_Orphanwait 390 +#define T_PCEdigest 391 +#define T_Panic 392 +#define T_Peer 393 +#define T_Peerstats 394 +#define T_Phone 395 +#define T_Pid 396 +#define T_Pidfile 397 +#define T_Poll 398 +#define T_PollSkewList 399 +#define T_Pool 400 +#define T_Port 401 +#define T_PpsData 402 +#define T_Preempt 403 +#define T_Prefer 404 +#define T_Protostats 405 +#define T_Pw 406 +#define T_Randfile 407 +#define T_Rawstats 408 +#define T_Refid 409 +#define T_Requestkey 410 +#define T_Reset 411 +#define T_Restrict 412 +#define T_Revoke 413 +#define T_Rlimit 414 +#define T_Saveconfigdir 415 +#define T_Server 416 +#define T_Serverresponse 417 +#define T_ServerresponseFuzz 418 +#define T_Setvar 419 +#define T_Source 420 +#define T_Stacksize 421 +#define T_Statistics 422 +#define T_Stats 423 +#define T_Statsdir 424 +#define T_Step 425 +#define T_Stepback 426 +#define T_Stepfwd 427 +#define T_Stepout 428 +#define T_Stratum 429 +#define T_String 430 +#define T_Sys 431 +#define T_Sysstats 432 +#define T_Tick 433 +#define T_Time1 434 +#define T_Time2 435 +#define T_TimeData 436 +#define T_Timer 437 +#define T_Timingstats 438 +#define T_Tinker 439 +#define T_Tos 440 +#define T_Trap 441 +#define T_True 442 +#define T_Trustedkey 443 +#define T_Ttl 444 +#define T_Type 445 +#define T_U_int 446 +#define T_UEcrypto 447 +#define T_UEcryptonak 448 +#define T_UEdigest 449 +#define T_Unconfig 450 +#define T_Unpeer 451 +#define T_Version 452 +#define T_WanderThreshold 453 +#define T_Week 454 +#define T_Wildcard 455 +#define T_Xleave 456 +#define T_Xmtnonce 457 +#define T_Year 458 +#define T_Flag 459 +#define T_EOC 460 +#define T_Simulate 461 +#define T_Beep_Delay 462 +#define T_Sim_Duration 463 +#define T_Server_Offset 464 +#define T_Duration 465 +#define T_Freq_Offset 466 +#define T_Wander 467 +#define T_Jitter 468 +#define T_Prop_Delay 469 +#define T_Proc_Delay 470 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 52 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 52 "../../ntpd/ntp_parser.y" char * String; double Double; @@ -602,7 +604,7 @@ union YYSTYPE script_info * Sim_script; script_info_fifo * Sim_script_fifo; -#line 606 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 608 "ntp_parser.c" }; typedef union YYSTYPE YYSTYPE; @@ -613,9 +615,11 @@ typedef union YYSTYPE YYSTYPE; extern YYSTYPE yylval; + int yyparse (void); -#endif /* !YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED */ + +#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */ /* Symbol kind. */ enum yysymbol_kind_t { @@ -651,311 +655,313 @@ enum yysymbol_kind_t YYSYMBOL_T_Ctl = 28, /* T_Ctl */ YYSYMBOL_T_Day = 29, /* T_Day */ YYSYMBOL_T_Default = 30, /* T_Default */ - YYSYMBOL_T_Device = 31, /* T_Device */ - YYSYMBOL_T_Digest = 32, /* T_Digest */ - YYSYMBOL_T_Disable = 33, /* T_Disable */ - YYSYMBOL_T_Discard = 34, /* T_Discard */ - YYSYMBOL_T_Dispersion = 35, /* T_Dispersion */ - YYSYMBOL_T_Double = 36, /* T_Double */ - YYSYMBOL_T_Driftfile = 37, /* T_Driftfile */ - YYSYMBOL_T_Drop = 38, /* T_Drop */ - YYSYMBOL_T_Dscp = 39, /* T_Dscp */ - YYSYMBOL_T_Ellipsis = 40, /* T_Ellipsis */ - YYSYMBOL_T_Enable = 41, /* T_Enable */ - YYSYMBOL_T_End = 42, /* T_End */ - YYSYMBOL_T_Epeer = 43, /* T_Epeer */ - YYSYMBOL_T_False = 44, /* T_False */ - YYSYMBOL_T_File = 45, /* T_File */ - YYSYMBOL_T_Filegen = 46, /* T_Filegen */ - YYSYMBOL_T_Filenum = 47, /* T_Filenum */ - YYSYMBOL_T_Flag1 = 48, /* T_Flag1 */ - YYSYMBOL_T_Flag2 = 49, /* T_Flag2 */ - YYSYMBOL_T_Flag3 = 50, /* T_Flag3 */ - YYSYMBOL_T_Flag4 = 51, /* T_Flag4 */ - YYSYMBOL_T_Flake = 52, /* T_Flake */ - YYSYMBOL_T_Floor = 53, /* T_Floor */ - YYSYMBOL_T_Freq = 54, /* T_Freq */ - YYSYMBOL_T_Fudge = 55, /* T_Fudge */ - YYSYMBOL_T_Fuzz = 56, /* T_Fuzz */ - YYSYMBOL_T_Host = 57, /* T_Host */ - YYSYMBOL_T_Huffpuff = 58, /* T_Huffpuff */ - YYSYMBOL_T_Iburst = 59, /* T_Iburst */ - YYSYMBOL_T_Ident = 60, /* T_Ident */ - YYSYMBOL_T_Ignore = 61, /* T_Ignore */ - YYSYMBOL_T_Ignorehash = 62, /* T_Ignorehash */ - YYSYMBOL_T_Incalloc = 63, /* T_Incalloc */ - YYSYMBOL_T_Incmem = 64, /* T_Incmem */ - YYSYMBOL_T_Initalloc = 65, /* T_Initalloc */ - YYSYMBOL_T_Initmem = 66, /* T_Initmem */ - YYSYMBOL_T_Includefile = 67, /* T_Includefile */ - YYSYMBOL_T_Integer = 68, /* T_Integer */ - YYSYMBOL_T_Interface = 69, /* T_Interface */ - YYSYMBOL_T_Intrange = 70, /* T_Intrange */ - YYSYMBOL_T_Io = 71, /* T_Io */ - YYSYMBOL_T_Ippeerlimit = 72, /* T_Ippeerlimit */ - YYSYMBOL_T_Ipv4 = 73, /* T_Ipv4 */ - YYSYMBOL_T_Ipv4_flag = 74, /* T_Ipv4_flag */ - YYSYMBOL_T_Ipv6 = 75, /* T_Ipv6 */ - YYSYMBOL_T_Ipv6_flag = 76, /* T_Ipv6_flag */ - YYSYMBOL_T_Kernel = 77, /* T_Kernel */ - YYSYMBOL_T_Key = 78, /* T_Key */ - YYSYMBOL_T_Keys = 79, /* T_Keys */ - YYSYMBOL_T_Keysdir = 80, /* T_Keysdir */ - YYSYMBOL_T_Kod = 81, /* T_Kod */ - YYSYMBOL_T_Leapfile = 82, /* T_Leapfile */ - YYSYMBOL_T_Leapsmearinterval = 83, /* T_Leapsmearinterval */ - YYSYMBOL_T_Limited = 84, /* T_Limited */ - YYSYMBOL_T_Link = 85, /* T_Link */ - YYSYMBOL_T_Listen = 86, /* T_Listen */ - YYSYMBOL_T_Logconfig = 87, /* T_Logconfig */ - YYSYMBOL_T_Logfile = 88, /* T_Logfile */ - YYSYMBOL_T_Loopstats = 89, /* T_Loopstats */ - YYSYMBOL_T_Lowpriotrap = 90, /* T_Lowpriotrap */ - YYSYMBOL_T_Manycastclient = 91, /* T_Manycastclient */ - YYSYMBOL_T_Manycastserver = 92, /* T_Manycastserver */ - YYSYMBOL_T_Mask = 93, /* T_Mask */ - YYSYMBOL_T_Maxage = 94, /* T_Maxage */ - YYSYMBOL_T_Maxclock = 95, /* T_Maxclock */ - YYSYMBOL_T_Maxdepth = 96, /* T_Maxdepth */ - YYSYMBOL_T_Maxdist = 97, /* T_Maxdist */ - YYSYMBOL_T_Maxmem = 98, /* T_Maxmem */ - YYSYMBOL_T_Maxpoll = 99, /* T_Maxpoll */ - YYSYMBOL_T_Mdnstries = 100, /* T_Mdnstries */ - YYSYMBOL_T_Mem = 101, /* T_Mem */ - YYSYMBOL_T_Memlock = 102, /* T_Memlock */ - YYSYMBOL_T_Minclock = 103, /* T_Minclock */ - YYSYMBOL_T_Mindepth = 104, /* T_Mindepth */ - YYSYMBOL_T_Mindist = 105, /* T_Mindist */ - YYSYMBOL_T_Minimum = 106, /* T_Minimum */ - YYSYMBOL_T_Minjitter = 107, /* T_Minjitter */ - YYSYMBOL_T_Minpoll = 108, /* T_Minpoll */ - YYSYMBOL_T_Minsane = 109, /* T_Minsane */ - YYSYMBOL_T_Mode = 110, /* T_Mode */ - YYSYMBOL_T_Mode7 = 111, /* T_Mode7 */ - YYSYMBOL_T_Monitor = 112, /* T_Monitor */ - YYSYMBOL_T_Month = 113, /* T_Month */ - YYSYMBOL_T_Mru = 114, /* T_Mru */ - YYSYMBOL_T_Mssntp = 115, /* T_Mssntp */ - YYSYMBOL_T_Multicastclient = 116, /* T_Multicastclient */ - YYSYMBOL_T_Nic = 117, /* T_Nic */ - YYSYMBOL_T_Nolink = 118, /* T_Nolink */ - YYSYMBOL_T_Nomodify = 119, /* T_Nomodify */ - YYSYMBOL_T_Nomrulist = 120, /* T_Nomrulist */ - YYSYMBOL_T_None = 121, /* T_None */ - YYSYMBOL_T_Nonvolatile = 122, /* T_Nonvolatile */ - YYSYMBOL_T_Noepeer = 123, /* T_Noepeer */ - YYSYMBOL_T_Nopeer = 124, /* T_Nopeer */ - YYSYMBOL_T_Noquery = 125, /* T_Noquery */ - YYSYMBOL_T_Noselect = 126, /* T_Noselect */ - YYSYMBOL_T_Noserve = 127, /* T_Noserve */ - YYSYMBOL_T_Notrap = 128, /* T_Notrap */ - YYSYMBOL_T_Notrust = 129, /* T_Notrust */ - YYSYMBOL_T_Ntp = 130, /* T_Ntp */ - YYSYMBOL_T_Ntpport = 131, /* T_Ntpport */ - YYSYMBOL_T_NtpSignDsocket = 132, /* T_NtpSignDsocket */ - YYSYMBOL_T_Orphan = 133, /* T_Orphan */ - YYSYMBOL_T_Orphanwait = 134, /* T_Orphanwait */ - YYSYMBOL_T_PCEdigest = 135, /* T_PCEdigest */ - YYSYMBOL_T_Panic = 136, /* T_Panic */ - YYSYMBOL_T_Peer = 137, /* T_Peer */ - YYSYMBOL_T_Peerstats = 138, /* T_Peerstats */ - YYSYMBOL_T_Phone = 139, /* T_Phone */ - YYSYMBOL_T_Pid = 140, /* T_Pid */ - YYSYMBOL_T_Pidfile = 141, /* T_Pidfile */ - YYSYMBOL_T_Poll = 142, /* T_Poll */ - YYSYMBOL_T_PollSkewList = 143, /* T_PollSkewList */ - YYSYMBOL_T_Pool = 144, /* T_Pool */ - YYSYMBOL_T_Port = 145, /* T_Port */ - YYSYMBOL_T_PpsData = 146, /* T_PpsData */ - YYSYMBOL_T_Preempt = 147, /* T_Preempt */ - YYSYMBOL_T_Prefer = 148, /* T_Prefer */ - YYSYMBOL_T_Protostats = 149, /* T_Protostats */ - YYSYMBOL_T_Pw = 150, /* T_Pw */ - YYSYMBOL_T_Randfile = 151, /* T_Randfile */ - YYSYMBOL_T_Rawstats = 152, /* T_Rawstats */ - YYSYMBOL_T_Refid = 153, /* T_Refid */ - YYSYMBOL_T_Requestkey = 154, /* T_Requestkey */ - YYSYMBOL_T_Reset = 155, /* T_Reset */ - YYSYMBOL_T_Restrict = 156, /* T_Restrict */ - YYSYMBOL_T_Revoke = 157, /* T_Revoke */ - YYSYMBOL_T_Rlimit = 158, /* T_Rlimit */ - YYSYMBOL_T_Saveconfigdir = 159, /* T_Saveconfigdir */ - YYSYMBOL_T_Server = 160, /* T_Server */ - YYSYMBOL_T_Serverresponse = 161, /* T_Serverresponse */ - YYSYMBOL_T_ServerresponseFuzz = 162, /* T_ServerresponseFuzz */ - YYSYMBOL_T_Setvar = 163, /* T_Setvar */ - YYSYMBOL_T_Source = 164, /* T_Source */ - YYSYMBOL_T_Stacksize = 165, /* T_Stacksize */ - YYSYMBOL_T_Statistics = 166, /* T_Statistics */ - YYSYMBOL_T_Stats = 167, /* T_Stats */ - YYSYMBOL_T_Statsdir = 168, /* T_Statsdir */ - YYSYMBOL_T_Step = 169, /* T_Step */ - YYSYMBOL_T_Stepback = 170, /* T_Stepback */ - YYSYMBOL_T_Stepfwd = 171, /* T_Stepfwd */ - YYSYMBOL_T_Stepout = 172, /* T_Stepout */ - YYSYMBOL_T_Stratum = 173, /* T_Stratum */ - YYSYMBOL_T_String = 174, /* T_String */ - YYSYMBOL_T_Sys = 175, /* T_Sys */ - YYSYMBOL_T_Sysstats = 176, /* T_Sysstats */ - YYSYMBOL_T_Tick = 177, /* T_Tick */ - YYSYMBOL_T_Time1 = 178, /* T_Time1 */ - YYSYMBOL_T_Time2 = 179, /* T_Time2 */ - YYSYMBOL_T_TimeData = 180, /* T_TimeData */ - YYSYMBOL_T_Timer = 181, /* T_Timer */ - YYSYMBOL_T_Timingstats = 182, /* T_Timingstats */ - YYSYMBOL_T_Tinker = 183, /* T_Tinker */ - YYSYMBOL_T_Tos = 184, /* T_Tos */ - YYSYMBOL_T_Trap = 185, /* T_Trap */ - YYSYMBOL_T_True = 186, /* T_True */ - YYSYMBOL_T_Trustedkey = 187, /* T_Trustedkey */ - YYSYMBOL_T_Ttl = 188, /* T_Ttl */ - YYSYMBOL_T_Type = 189, /* T_Type */ - YYSYMBOL_T_U_int = 190, /* T_U_int */ - YYSYMBOL_T_UEcrypto = 191, /* T_UEcrypto */ - YYSYMBOL_T_UEcryptonak = 192, /* T_UEcryptonak */ - YYSYMBOL_T_UEdigest = 193, /* T_UEdigest */ - YYSYMBOL_T_Unconfig = 194, /* T_Unconfig */ - YYSYMBOL_T_Unpeer = 195, /* T_Unpeer */ - YYSYMBOL_T_Version = 196, /* T_Version */ - YYSYMBOL_T_WanderThreshold = 197, /* T_WanderThreshold */ - YYSYMBOL_T_Week = 198, /* T_Week */ - YYSYMBOL_T_Wildcard = 199, /* T_Wildcard */ - YYSYMBOL_T_Xleave = 200, /* T_Xleave */ - YYSYMBOL_T_Xmtnonce = 201, /* T_Xmtnonce */ - YYSYMBOL_T_Year = 202, /* T_Year */ - YYSYMBOL_T_Flag = 203, /* T_Flag */ - YYSYMBOL_T_EOC = 204, /* T_EOC */ - YYSYMBOL_T_Simulate = 205, /* T_Simulate */ - YYSYMBOL_T_Beep_Delay = 206, /* T_Beep_Delay */ - YYSYMBOL_T_Sim_Duration = 207, /* T_Sim_Duration */ - YYSYMBOL_T_Server_Offset = 208, /* T_Server_Offset */ - YYSYMBOL_T_Duration = 209, /* T_Duration */ - YYSYMBOL_T_Freq_Offset = 210, /* T_Freq_Offset */ - YYSYMBOL_T_Wander = 211, /* T_Wander */ - YYSYMBOL_T_Jitter = 212, /* T_Jitter */ - YYSYMBOL_T_Prop_Delay = 213, /* T_Prop_Delay */ - YYSYMBOL_T_Proc_Delay = 214, /* T_Proc_Delay */ - YYSYMBOL_215_ = 215, /* '|' */ - YYSYMBOL_216_ = 216, /* '=' */ - YYSYMBOL_217_ = 217, /* '(' */ - YYSYMBOL_218_ = 218, /* ')' */ - YYSYMBOL_219_ = 219, /* '{' */ - YYSYMBOL_220_ = 220, /* '}' */ - YYSYMBOL_YYACCEPT = 221, /* $accept */ - YYSYMBOL_configuration = 222, /* configuration */ - YYSYMBOL_command_list = 223, /* command_list */ - YYSYMBOL_command = 224, /* command */ - YYSYMBOL_server_command = 225, /* server_command */ - YYSYMBOL_client_type = 226, /* client_type */ - YYSYMBOL_address = 227, /* address */ - YYSYMBOL_ip_address = 228, /* ip_address */ - YYSYMBOL_address_fam = 229, /* address_fam */ - YYSYMBOL_option_list = 230, /* option_list */ - YYSYMBOL_option = 231, /* option */ - YYSYMBOL_option_flag = 232, /* option_flag */ - YYSYMBOL_option_flag_keyword = 233, /* option_flag_keyword */ - YYSYMBOL_option_int = 234, /* option_int */ - YYSYMBOL_option_int_keyword = 235, /* option_int_keyword */ - YYSYMBOL_option_str = 236, /* option_str */ - YYSYMBOL_option_str_keyword = 237, /* option_str_keyword */ - YYSYMBOL_unpeer_command = 238, /* unpeer_command */ - YYSYMBOL_unpeer_keyword = 239, /* unpeer_keyword */ - YYSYMBOL_other_mode_command = 240, /* other_mode_command */ - YYSYMBOL_authentication_command = 241, /* authentication_command */ - YYSYMBOL_crypto_command_list = 242, /* crypto_command_list */ - YYSYMBOL_crypto_command = 243, /* crypto_command */ - YYSYMBOL_crypto_str_keyword = 244, /* crypto_str_keyword */ - YYSYMBOL_orphan_mode_command = 245, /* orphan_mode_command */ - YYSYMBOL_tos_option_list = 246, /* tos_option_list */ - YYSYMBOL_tos_option = 247, /* tos_option */ - YYSYMBOL_tos_option_int_keyword = 248, /* tos_option_int_keyword */ - YYSYMBOL_tos_option_dbl_keyword = 249, /* tos_option_dbl_keyword */ - YYSYMBOL_monitoring_command = 250, /* monitoring_command */ - YYSYMBOL_stats_list = 251, /* stats_list */ - YYSYMBOL_stat = 252, /* stat */ - YYSYMBOL_filegen_option_list = 253, /* filegen_option_list */ - YYSYMBOL_filegen_option = 254, /* filegen_option */ - YYSYMBOL_link_nolink = 255, /* link_nolink */ - YYSYMBOL_enable_disable = 256, /* enable_disable */ - YYSYMBOL_filegen_type = 257, /* filegen_type */ - YYSYMBOL_access_control_command = 258, /* access_control_command */ - YYSYMBOL_res_ippeerlimit = 259, /* res_ippeerlimit */ - YYSYMBOL_ac_flag_list = 260, /* ac_flag_list */ - YYSYMBOL_access_control_flag = 261, /* access_control_flag */ - YYSYMBOL_discard_option_list = 262, /* discard_option_list */ - YYSYMBOL_discard_option = 263, /* discard_option */ - YYSYMBOL_discard_option_keyword = 264, /* discard_option_keyword */ - YYSYMBOL_mru_option_list = 265, /* mru_option_list */ - YYSYMBOL_mru_option = 266, /* mru_option */ - YYSYMBOL_mru_option_keyword = 267, /* mru_option_keyword */ - YYSYMBOL_fudge_command = 268, /* fudge_command */ - YYSYMBOL_fudge_factor_list = 269, /* fudge_factor_list */ - YYSYMBOL_fudge_factor = 270, /* fudge_factor */ - YYSYMBOL_fudge_factor_dbl_keyword = 271, /* fudge_factor_dbl_keyword */ - YYSYMBOL_fudge_factor_bool_keyword = 272, /* fudge_factor_bool_keyword */ - YYSYMBOL_device_command = 273, /* device_command */ - YYSYMBOL_device_item_list = 274, /* device_item_list */ - YYSYMBOL_device_item = 275, /* device_item */ - YYSYMBOL_device_item_path_keyword = 276, /* device_item_path_keyword */ - YYSYMBOL_rlimit_command = 277, /* rlimit_command */ - YYSYMBOL_rlimit_option_list = 278, /* rlimit_option_list */ - YYSYMBOL_rlimit_option = 279, /* rlimit_option */ - YYSYMBOL_rlimit_option_keyword = 280, /* rlimit_option_keyword */ - YYSYMBOL_system_option_command = 281, /* system_option_command */ - YYSYMBOL_system_option_list = 282, /* system_option_list */ - YYSYMBOL_system_option = 283, /* system_option */ - YYSYMBOL_system_option_flag_keyword = 284, /* system_option_flag_keyword */ - YYSYMBOL_system_option_local_flag_keyword = 285, /* system_option_local_flag_keyword */ - YYSYMBOL_tinker_command = 286, /* tinker_command */ - YYSYMBOL_tinker_option_list = 287, /* tinker_option_list */ - YYSYMBOL_tinker_option = 288, /* tinker_option */ - YYSYMBOL_tinker_option_keyword = 289, /* tinker_option_keyword */ - YYSYMBOL_miscellaneous_command = 290, /* miscellaneous_command */ - YYSYMBOL_misc_cmd_dbl_keyword = 291, /* misc_cmd_dbl_keyword */ - YYSYMBOL_misc_cmd_int_keyword = 292, /* misc_cmd_int_keyword */ - YYSYMBOL_opt_hash_check = 293, /* opt_hash_check */ - YYSYMBOL_misc_cmd_str_keyword = 294, /* misc_cmd_str_keyword */ - YYSYMBOL_misc_cmd_str_lcl_keyword = 295, /* misc_cmd_str_lcl_keyword */ - YYSYMBOL_drift_parm = 296, /* drift_parm */ - YYSYMBOL_pollskew_list = 297, /* pollskew_list */ - YYSYMBOL_pollskew_spec = 298, /* pollskew_spec */ - YYSYMBOL_pollskew_cycle = 299, /* pollskew_cycle */ - YYSYMBOL_variable_assign = 300, /* variable_assign */ - YYSYMBOL_t_default_or_zero = 301, /* t_default_or_zero */ - YYSYMBOL_trap_option_list = 302, /* trap_option_list */ - YYSYMBOL_trap_option = 303, /* trap_option */ - YYSYMBOL_log_config_list = 304, /* log_config_list */ - YYSYMBOL_log_config_command = 305, /* log_config_command */ - YYSYMBOL_interface_command = 306, /* interface_command */ - YYSYMBOL_interface_nic = 307, /* interface_nic */ - YYSYMBOL_nic_rule_class = 308, /* nic_rule_class */ - YYSYMBOL_nic_rule_action = 309, /* nic_rule_action */ - YYSYMBOL_reset_command = 310, /* reset_command */ - YYSYMBOL_counter_set_list = 311, /* counter_set_list */ - YYSYMBOL_counter_set_keyword = 312, /* counter_set_keyword */ - YYSYMBOL_integer_list = 313, /* integer_list */ - YYSYMBOL_integer_list_range = 314, /* integer_list_range */ - YYSYMBOL_integer_list_range_elt = 315, /* integer_list_range_elt */ - YYSYMBOL_integer_range = 316, /* integer_range */ - YYSYMBOL_string_list = 317, /* string_list */ - YYSYMBOL_address_list = 318, /* address_list */ - YYSYMBOL_boolean = 319, /* boolean */ - YYSYMBOL_number = 320, /* number */ - YYSYMBOL_basedate = 321, /* basedate */ - YYSYMBOL_simulate_command = 322, /* simulate_command */ - YYSYMBOL_sim_conf_start = 323, /* sim_conf_start */ - YYSYMBOL_sim_init_statement_list = 324, /* sim_init_statement_list */ - YYSYMBOL_sim_init_statement = 325, /* sim_init_statement */ - YYSYMBOL_sim_init_keyword = 326, /* sim_init_keyword */ - YYSYMBOL_sim_server_list = 327, /* sim_server_list */ - YYSYMBOL_sim_server = 328, /* sim_server */ - YYSYMBOL_sim_server_offset = 329, /* sim_server_offset */ - YYSYMBOL_sim_server_name = 330, /* sim_server_name */ - YYSYMBOL_sim_act_list = 331, /* sim_act_list */ - YYSYMBOL_sim_act = 332, /* sim_act */ - YYSYMBOL_sim_act_stmt_list = 333, /* sim_act_stmt_list */ - YYSYMBOL_sim_act_stmt = 334, /* sim_act_stmt */ - YYSYMBOL_sim_act_keyword = 335 /* sim_act_keyword */ + YYSYMBOL_T_Delrestrict = 31, /* T_Delrestrict */ + YYSYMBOL_T_Device = 32, /* T_Device */ + YYSYMBOL_T_Digest = 33, /* T_Digest */ + YYSYMBOL_T_Disable = 34, /* T_Disable */ + YYSYMBOL_T_Discard = 35, /* T_Discard */ + YYSYMBOL_T_Dispersion = 36, /* T_Dispersion */ + YYSYMBOL_T_Double = 37, /* T_Double */ + YYSYMBOL_T_Driftfile = 38, /* T_Driftfile */ + YYSYMBOL_T_Drop = 39, /* T_Drop */ + YYSYMBOL_T_Dscp = 40, /* T_Dscp */ + YYSYMBOL_T_Ellipsis = 41, /* T_Ellipsis */ + YYSYMBOL_T_Enable = 42, /* T_Enable */ + YYSYMBOL_T_End = 43, /* T_End */ + YYSYMBOL_T_Epeer = 44, /* T_Epeer */ + YYSYMBOL_T_False = 45, /* T_False */ + YYSYMBOL_T_File = 46, /* T_File */ + YYSYMBOL_T_Filegen = 47, /* T_Filegen */ + YYSYMBOL_T_Filenum = 48, /* T_Filenum */ + YYSYMBOL_T_Flag1 = 49, /* T_Flag1 */ + YYSYMBOL_T_Flag2 = 50, /* T_Flag2 */ + YYSYMBOL_T_Flag3 = 51, /* T_Flag3 */ + YYSYMBOL_T_Flag4 = 52, /* T_Flag4 */ + YYSYMBOL_T_Flake = 53, /* T_Flake */ + YYSYMBOL_T_Floor = 54, /* T_Floor */ + YYSYMBOL_T_Freq = 55, /* T_Freq */ + YYSYMBOL_T_Fudge = 56, /* T_Fudge */ + YYSYMBOL_T_Fuzz = 57, /* T_Fuzz */ + YYSYMBOL_T_Host = 58, /* T_Host */ + YYSYMBOL_T_Huffpuff = 59, /* T_Huffpuff */ + YYSYMBOL_T_Iburst = 60, /* T_Iburst */ + YYSYMBOL_T_Ident = 61, /* T_Ident */ + YYSYMBOL_T_Ignore = 62, /* T_Ignore */ + YYSYMBOL_T_Ignorehash = 63, /* T_Ignorehash */ + YYSYMBOL_T_Incalloc = 64, /* T_Incalloc */ + YYSYMBOL_T_Incmem = 65, /* T_Incmem */ + YYSYMBOL_T_Initalloc = 66, /* T_Initalloc */ + YYSYMBOL_T_Initmem = 67, /* T_Initmem */ + YYSYMBOL_T_Includefile = 68, /* T_Includefile */ + YYSYMBOL_T_Integer = 69, /* T_Integer */ + YYSYMBOL_T_Interface = 70, /* T_Interface */ + YYSYMBOL_T_Intrange = 71, /* T_Intrange */ + YYSYMBOL_T_Io = 72, /* T_Io */ + YYSYMBOL_T_Ippeerlimit = 73, /* T_Ippeerlimit */ + YYSYMBOL_T_Ipv4 = 74, /* T_Ipv4 */ + YYSYMBOL_T_Ipv4_flag = 75, /* T_Ipv4_flag */ + YYSYMBOL_T_Ipv6 = 76, /* T_Ipv6 */ + YYSYMBOL_T_Ipv6_flag = 77, /* T_Ipv6_flag */ + YYSYMBOL_T_Kernel = 78, /* T_Kernel */ + YYSYMBOL_T_Key = 79, /* T_Key */ + YYSYMBOL_T_Keys = 80, /* T_Keys */ + YYSYMBOL_T_Keysdir = 81, /* T_Keysdir */ + YYSYMBOL_T_Kod = 82, /* T_Kod */ + YYSYMBOL_T_Leapfile = 83, /* T_Leapfile */ + YYSYMBOL_T_Leapsmearinterval = 84, /* T_Leapsmearinterval */ + YYSYMBOL_T_Limited = 85, /* T_Limited */ + YYSYMBOL_T_Link = 86, /* T_Link */ + YYSYMBOL_T_Listen = 87, /* T_Listen */ + YYSYMBOL_T_Logconfig = 88, /* T_Logconfig */ + YYSYMBOL_T_Logfile = 89, /* T_Logfile */ + YYSYMBOL_T_Loopstats = 90, /* T_Loopstats */ + YYSYMBOL_T_Lowpriotrap = 91, /* T_Lowpriotrap */ + YYSYMBOL_T_Manycastclient = 92, /* T_Manycastclient */ + YYSYMBOL_T_Manycastserver = 93, /* T_Manycastserver */ + YYSYMBOL_T_Mask = 94, /* T_Mask */ + YYSYMBOL_T_Maxage = 95, /* T_Maxage */ + YYSYMBOL_T_Maxclock = 96, /* T_Maxclock */ + YYSYMBOL_T_Maxdepth = 97, /* T_Maxdepth */ + YYSYMBOL_T_Maxdist = 98, /* T_Maxdist */ + YYSYMBOL_T_Maxmem = 99, /* T_Maxmem */ + YYSYMBOL_T_Maxpoll = 100, /* T_Maxpoll */ + YYSYMBOL_T_Mdnstries = 101, /* T_Mdnstries */ + YYSYMBOL_T_Mem = 102, /* T_Mem */ + YYSYMBOL_T_Memlock = 103, /* T_Memlock */ + YYSYMBOL_T_Minclock = 104, /* T_Minclock */ + YYSYMBOL_T_Mindepth = 105, /* T_Mindepth */ + YYSYMBOL_T_Mindist = 106, /* T_Mindist */ + YYSYMBOL_T_Minimum = 107, /* T_Minimum */ + YYSYMBOL_T_Minjitter = 108, /* T_Minjitter */ + YYSYMBOL_T_Minpoll = 109, /* T_Minpoll */ + YYSYMBOL_T_Minsane = 110, /* T_Minsane */ + YYSYMBOL_T_Mode = 111, /* T_Mode */ + YYSYMBOL_T_Mode7 = 112, /* T_Mode7 */ + YYSYMBOL_T_Monitor = 113, /* T_Monitor */ + YYSYMBOL_T_Month = 114, /* T_Month */ + YYSYMBOL_T_Mru = 115, /* T_Mru */ + YYSYMBOL_T_Mssntp = 116, /* T_Mssntp */ + YYSYMBOL_T_Multicastclient = 117, /* T_Multicastclient */ + YYSYMBOL_T_Nic = 118, /* T_Nic */ + YYSYMBOL_T_Nolink = 119, /* T_Nolink */ + YYSYMBOL_T_Nomodify = 120, /* T_Nomodify */ + YYSYMBOL_T_Nomrulist = 121, /* T_Nomrulist */ + YYSYMBOL_T_None = 122, /* T_None */ + YYSYMBOL_T_Nonvolatile = 123, /* T_Nonvolatile */ + YYSYMBOL_T_Noepeer = 124, /* T_Noepeer */ + YYSYMBOL_T_Nopeer = 125, /* T_Nopeer */ + YYSYMBOL_T_Noquery = 126, /* T_Noquery */ + YYSYMBOL_T_Noselect = 127, /* T_Noselect */ + YYSYMBOL_T_Noserve = 128, /* T_Noserve */ + YYSYMBOL_T_Notrap = 129, /* T_Notrap */ + YYSYMBOL_T_Notrust = 130, /* T_Notrust */ + YYSYMBOL_T_Ntp = 131, /* T_Ntp */ + YYSYMBOL_T_Ntpport = 132, /* T_Ntpport */ + YYSYMBOL_T_NtpSignDsocket = 133, /* T_NtpSignDsocket */ + YYSYMBOL_T_Orphan = 134, /* T_Orphan */ + YYSYMBOL_T_Orphanwait = 135, /* T_Orphanwait */ + YYSYMBOL_T_PCEdigest = 136, /* T_PCEdigest */ + YYSYMBOL_T_Panic = 137, /* T_Panic */ + YYSYMBOL_T_Peer = 138, /* T_Peer */ + YYSYMBOL_T_Peerstats = 139, /* T_Peerstats */ + YYSYMBOL_T_Phone = 140, /* T_Phone */ + YYSYMBOL_T_Pid = 141, /* T_Pid */ + YYSYMBOL_T_Pidfile = 142, /* T_Pidfile */ + YYSYMBOL_T_Poll = 143, /* T_Poll */ + YYSYMBOL_T_PollSkewList = 144, /* T_PollSkewList */ + YYSYMBOL_T_Pool = 145, /* T_Pool */ + YYSYMBOL_T_Port = 146, /* T_Port */ + YYSYMBOL_T_PpsData = 147, /* T_PpsData */ + YYSYMBOL_T_Preempt = 148, /* T_Preempt */ + YYSYMBOL_T_Prefer = 149, /* T_Prefer */ + YYSYMBOL_T_Protostats = 150, /* T_Protostats */ + YYSYMBOL_T_Pw = 151, /* T_Pw */ + YYSYMBOL_T_Randfile = 152, /* T_Randfile */ + YYSYMBOL_T_Rawstats = 153, /* T_Rawstats */ + YYSYMBOL_T_Refid = 154, /* T_Refid */ + YYSYMBOL_T_Requestkey = 155, /* T_Requestkey */ + YYSYMBOL_T_Reset = 156, /* T_Reset */ + YYSYMBOL_T_Restrict = 157, /* T_Restrict */ + YYSYMBOL_T_Revoke = 158, /* T_Revoke */ + YYSYMBOL_T_Rlimit = 159, /* T_Rlimit */ + YYSYMBOL_T_Saveconfigdir = 160, /* T_Saveconfigdir */ + YYSYMBOL_T_Server = 161, /* T_Server */ + YYSYMBOL_T_Serverresponse = 162, /* T_Serverresponse */ + YYSYMBOL_T_ServerresponseFuzz = 163, /* T_ServerresponseFuzz */ + YYSYMBOL_T_Setvar = 164, /* T_Setvar */ + YYSYMBOL_T_Source = 165, /* T_Source */ + YYSYMBOL_T_Stacksize = 166, /* T_Stacksize */ + YYSYMBOL_T_Statistics = 167, /* T_Statistics */ + YYSYMBOL_T_Stats = 168, /* T_Stats */ + YYSYMBOL_T_Statsdir = 169, /* T_Statsdir */ + YYSYMBOL_T_Step = 170, /* T_Step */ + YYSYMBOL_T_Stepback = 171, /* T_Stepback */ + YYSYMBOL_T_Stepfwd = 172, /* T_Stepfwd */ + YYSYMBOL_T_Stepout = 173, /* T_Stepout */ + YYSYMBOL_T_Stratum = 174, /* T_Stratum */ + YYSYMBOL_T_String = 175, /* T_String */ + YYSYMBOL_T_Sys = 176, /* T_Sys */ + YYSYMBOL_T_Sysstats = 177, /* T_Sysstats */ + YYSYMBOL_T_Tick = 178, /* T_Tick */ + YYSYMBOL_T_Time1 = 179, /* T_Time1 */ + YYSYMBOL_T_Time2 = 180, /* T_Time2 */ + YYSYMBOL_T_TimeData = 181, /* T_TimeData */ + YYSYMBOL_T_Timer = 182, /* T_Timer */ + YYSYMBOL_T_Timingstats = 183, /* T_Timingstats */ + YYSYMBOL_T_Tinker = 184, /* T_Tinker */ + YYSYMBOL_T_Tos = 185, /* T_Tos */ + YYSYMBOL_T_Trap = 186, /* T_Trap */ + YYSYMBOL_T_True = 187, /* T_True */ + YYSYMBOL_T_Trustedkey = 188, /* T_Trustedkey */ + YYSYMBOL_T_Ttl = 189, /* T_Ttl */ + YYSYMBOL_T_Type = 190, /* T_Type */ + YYSYMBOL_T_U_int = 191, /* T_U_int */ + YYSYMBOL_T_UEcrypto = 192, /* T_UEcrypto */ + YYSYMBOL_T_UEcryptonak = 193, /* T_UEcryptonak */ + YYSYMBOL_T_UEdigest = 194, /* T_UEdigest */ + YYSYMBOL_T_Unconfig = 195, /* T_Unconfig */ + YYSYMBOL_T_Unpeer = 196, /* T_Unpeer */ + YYSYMBOL_T_Version = 197, /* T_Version */ + YYSYMBOL_T_WanderThreshold = 198, /* T_WanderThreshold */ + YYSYMBOL_T_Week = 199, /* T_Week */ + YYSYMBOL_T_Wildcard = 200, /* T_Wildcard */ + YYSYMBOL_T_Xleave = 201, /* T_Xleave */ + YYSYMBOL_T_Xmtnonce = 202, /* T_Xmtnonce */ + YYSYMBOL_T_Year = 203, /* T_Year */ + YYSYMBOL_T_Flag = 204, /* T_Flag */ + YYSYMBOL_T_EOC = 205, /* T_EOC */ + YYSYMBOL_T_Simulate = 206, /* T_Simulate */ + YYSYMBOL_T_Beep_Delay = 207, /* T_Beep_Delay */ + YYSYMBOL_T_Sim_Duration = 208, /* T_Sim_Duration */ + YYSYMBOL_T_Server_Offset = 209, /* T_Server_Offset */ + YYSYMBOL_T_Duration = 210, /* T_Duration */ + YYSYMBOL_T_Freq_Offset = 211, /* T_Freq_Offset */ + YYSYMBOL_T_Wander = 212, /* T_Wander */ + YYSYMBOL_T_Jitter = 213, /* T_Jitter */ + YYSYMBOL_T_Prop_Delay = 214, /* T_Prop_Delay */ + YYSYMBOL_T_Proc_Delay = 215, /* T_Proc_Delay */ + YYSYMBOL_216_ = 216, /* '|' */ + YYSYMBOL_217_ = 217, /* '=' */ + YYSYMBOL_218_ = 218, /* '(' */ + YYSYMBOL_219_ = 219, /* ')' */ + YYSYMBOL_220_ = 220, /* '{' */ + YYSYMBOL_221_ = 221, /* '}' */ + YYSYMBOL_YYACCEPT = 222, /* $accept */ + YYSYMBOL_configuration = 223, /* configuration */ + YYSYMBOL_command_list = 224, /* command_list */ + YYSYMBOL_command = 225, /* command */ + YYSYMBOL_server_command = 226, /* server_command */ + YYSYMBOL_client_type = 227, /* client_type */ + YYSYMBOL_address = 228, /* address */ + YYSYMBOL_ip_address = 229, /* ip_address */ + YYSYMBOL_address_fam = 230, /* address_fam */ + YYSYMBOL_option_list = 231, /* option_list */ + YYSYMBOL_option = 232, /* option */ + YYSYMBOL_option_flag = 233, /* option_flag */ + YYSYMBOL_option_flag_keyword = 234, /* option_flag_keyword */ + YYSYMBOL_option_int = 235, /* option_int */ + YYSYMBOL_option_int_keyword = 236, /* option_int_keyword */ + YYSYMBOL_option_str = 237, /* option_str */ + YYSYMBOL_option_str_keyword = 238, /* option_str_keyword */ + YYSYMBOL_unpeer_command = 239, /* unpeer_command */ + YYSYMBOL_unpeer_keyword = 240, /* unpeer_keyword */ + YYSYMBOL_other_mode_command = 241, /* other_mode_command */ + YYSYMBOL_authentication_command = 242, /* authentication_command */ + YYSYMBOL_crypto_command_list = 243, /* crypto_command_list */ + YYSYMBOL_crypto_command = 244, /* crypto_command */ + YYSYMBOL_crypto_str_keyword = 245, /* crypto_str_keyword */ + YYSYMBOL_orphan_mode_command = 246, /* orphan_mode_command */ + YYSYMBOL_tos_option_list = 247, /* tos_option_list */ + YYSYMBOL_tos_option = 248, /* tos_option */ + YYSYMBOL_tos_option_int_keyword = 249, /* tos_option_int_keyword */ + YYSYMBOL_tos_option_dbl_keyword = 250, /* tos_option_dbl_keyword */ + YYSYMBOL_monitoring_command = 251, /* monitoring_command */ + YYSYMBOL_stats_list = 252, /* stats_list */ + YYSYMBOL_stat = 253, /* stat */ + YYSYMBOL_filegen_option_list = 254, /* filegen_option_list */ + YYSYMBOL_filegen_option = 255, /* filegen_option */ + YYSYMBOL_link_nolink = 256, /* link_nolink */ + YYSYMBOL_enable_disable = 257, /* enable_disable */ + YYSYMBOL_filegen_type = 258, /* filegen_type */ + YYSYMBOL_access_control_command = 259, /* access_control_command */ + YYSYMBOL_restrict_mask = 260, /* restrict_mask */ + YYSYMBOL_res_ippeerlimit = 261, /* res_ippeerlimit */ + YYSYMBOL_ac_flag_list = 262, /* ac_flag_list */ + YYSYMBOL_access_control_flag = 263, /* access_control_flag */ + YYSYMBOL_discard_option_list = 264, /* discard_option_list */ + YYSYMBOL_discard_option = 265, /* discard_option */ + YYSYMBOL_discard_option_keyword = 266, /* discard_option_keyword */ + YYSYMBOL_mru_option_list = 267, /* mru_option_list */ + YYSYMBOL_mru_option = 268, /* mru_option */ + YYSYMBOL_mru_option_keyword = 269, /* mru_option_keyword */ + YYSYMBOL_fudge_command = 270, /* fudge_command */ + YYSYMBOL_fudge_factor_list = 271, /* fudge_factor_list */ + YYSYMBOL_fudge_factor = 272, /* fudge_factor */ + YYSYMBOL_fudge_factor_dbl_keyword = 273, /* fudge_factor_dbl_keyword */ + YYSYMBOL_fudge_factor_bool_keyword = 274, /* fudge_factor_bool_keyword */ + YYSYMBOL_device_command = 275, /* device_command */ + YYSYMBOL_device_item_list = 276, /* device_item_list */ + YYSYMBOL_device_item = 277, /* device_item */ + YYSYMBOL_device_item_path_keyword = 278, /* device_item_path_keyword */ + YYSYMBOL_rlimit_command = 279, /* rlimit_command */ + YYSYMBOL_rlimit_option_list = 280, /* rlimit_option_list */ + YYSYMBOL_rlimit_option = 281, /* rlimit_option */ + YYSYMBOL_rlimit_option_keyword = 282, /* rlimit_option_keyword */ + YYSYMBOL_system_option_command = 283, /* system_option_command */ + YYSYMBOL_system_option_list = 284, /* system_option_list */ + YYSYMBOL_system_option = 285, /* system_option */ + YYSYMBOL_system_option_flag_keyword = 286, /* system_option_flag_keyword */ + YYSYMBOL_system_option_local_flag_keyword = 287, /* system_option_local_flag_keyword */ + YYSYMBOL_tinker_command = 288, /* tinker_command */ + YYSYMBOL_tinker_option_list = 289, /* tinker_option_list */ + YYSYMBOL_tinker_option = 290, /* tinker_option */ + YYSYMBOL_tinker_option_keyword = 291, /* tinker_option_keyword */ + YYSYMBOL_miscellaneous_command = 292, /* miscellaneous_command */ + YYSYMBOL_misc_cmd_dbl_keyword = 293, /* misc_cmd_dbl_keyword */ + YYSYMBOL_misc_cmd_int_keyword = 294, /* misc_cmd_int_keyword */ + YYSYMBOL_opt_hash_check = 295, /* opt_hash_check */ + YYSYMBOL_misc_cmd_str_keyword = 296, /* misc_cmd_str_keyword */ + YYSYMBOL_misc_cmd_str_lcl_keyword = 297, /* misc_cmd_str_lcl_keyword */ + YYSYMBOL_drift_parm = 298, /* drift_parm */ + YYSYMBOL_pollskew_list = 299, /* pollskew_list */ + YYSYMBOL_pollskew_spec = 300, /* pollskew_spec */ + YYSYMBOL_pollskew_cycle = 301, /* pollskew_cycle */ + YYSYMBOL_variable_assign = 302, /* variable_assign */ + YYSYMBOL_t_default_or_zero = 303, /* t_default_or_zero */ + YYSYMBOL_trap_option_list = 304, /* trap_option_list */ + YYSYMBOL_trap_option = 305, /* trap_option */ + YYSYMBOL_log_config_list = 306, /* log_config_list */ + YYSYMBOL_log_config_command = 307, /* log_config_command */ + YYSYMBOL_interface_command = 308, /* interface_command */ + YYSYMBOL_interface_nic = 309, /* interface_nic */ + YYSYMBOL_nic_rule_class = 310, /* nic_rule_class */ + YYSYMBOL_nic_rule_action = 311, /* nic_rule_action */ + YYSYMBOL_reset_command = 312, /* reset_command */ + YYSYMBOL_counter_set_list = 313, /* counter_set_list */ + YYSYMBOL_counter_set_keyword = 314, /* counter_set_keyword */ + YYSYMBOL_integer_list = 315, /* integer_list */ + YYSYMBOL_integer_list_range = 316, /* integer_list_range */ + YYSYMBOL_integer_list_range_elt = 317, /* integer_list_range_elt */ + YYSYMBOL_integer_range = 318, /* integer_range */ + YYSYMBOL_string_list = 319, /* string_list */ + YYSYMBOL_address_list = 320, /* address_list */ + YYSYMBOL_boolean = 321, /* boolean */ + YYSYMBOL_number = 322, /* number */ + YYSYMBOL_basedate = 323, /* basedate */ + YYSYMBOL_simulate_command = 324, /* simulate_command */ + YYSYMBOL_sim_conf_start = 325, /* sim_conf_start */ + YYSYMBOL_sim_init_statement_list = 326, /* sim_init_statement_list */ + YYSYMBOL_sim_init_statement = 327, /* sim_init_statement */ + YYSYMBOL_sim_init_keyword = 328, /* sim_init_keyword */ + YYSYMBOL_sim_server_list = 329, /* sim_server_list */ + YYSYMBOL_sim_server = 330, /* sim_server */ + YYSYMBOL_sim_server_offset = 331, /* sim_server_offset */ + YYSYMBOL_sim_server_name = 332, /* sim_server_name */ + YYSYMBOL_sim_act_list = 333, /* sim_act_list */ + YYSYMBOL_sim_act = 334, /* sim_act */ + YYSYMBOL_sim_act_stmt_list = 335, /* sim_act_stmt_list */ + YYSYMBOL_sim_act_stmt = 336, /* sim_act_stmt */ + YYSYMBOL_sim_act_keyword = 337 /* sim_act_keyword */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -1113,12 +1119,18 @@ typedef int yy_state_fast_t; # define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -1275,21 +1287,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 222 +#define YYFINAL 225 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 688 +#define YYLAST 717 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 221 +#define YYNTOKENS 222 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 115 +#define YYNNTS 116 /* YYNRULES -- Number of rules. */ -#define YYNRULES 343 +#define YYNRULES 346 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 463 +#define YYNSTATES 467 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 469 +#define YYMAXUTOK 470 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -1307,15 +1319,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, - 217, 218, 2, 2, 2, 2, 2, 2, 2, 2, + 218, 219, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 216, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 217, 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, 219, 215, 220, 2, 2, 2, 2, + 2, 2, 2, 220, 216, 221, 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, @@ -1349,48 +1361,49 @@ static const yytype_uint8 yytranslate[] = 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214 + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215 }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 397, 397, 401, 402, 403, 418, 419, 420, 421, - 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, - 432, 440, 450, 451, 452, 453, 454, 458, 459, 464, - 469, 471, 477, 478, 486, 487, 488, 492, 497, 498, - 499, 500, 501, 502, 503, 504, 505, 509, 511, 516, - 517, 518, 519, 520, 521, 525, 530, 539, 549, 550, - 560, 562, 564, 566, 577, 584, 586, 591, 593, 595, - 597, 599, 609, 615, 616, 624, 626, 638, 639, 640, - 641, 642, 651, 656, 661, 669, 671, 673, 675, 680, - 681, 682, 683, 684, 685, 686, 687, 688, 692, 693, - 702, 704, 713, 723, 728, 736, 737, 738, 739, 740, - 741, 742, 743, 748, 749, 757, 767, 776, 791, 796, - 797, 801, 802, 806, 807, 808, 809, 810, 811, 812, - 821, 825, 829, 837, 845, 853, 868, 883, 896, 897, - 917, 918, 926, 937, 938, 939, 940, 941, 942, 943, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, - 957, 962, 970, 975, 976, 977, 981, 986, 994, 999, - 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1014, 1024, 1029, - 1037, 1039, 1041, 1050, 1052, 1057, 1058, 1059, 1063, 1064, - 1065, 1066, 1074, 1084, 1089, 1097, 1102, 1103, 1111, 1116, - 1121, 1129, 1134, 1135, 1136, 1145, 1147, 1152, 1157, 1165, - 1167, 1184, 1185, 1186, 1187, 1188, 1189, 1193, 1194, 1195, - 1196, 1197, 1198, 1206, 1211, 1216, 1224, 1229, 1230, 1231, - 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1247, 1248, 1249, - 1256, 1263, 1270, 1286, 1305, 1313, 1315, 1317, 1319, 1321, - 1323, 1325, 1332, 1337, 1338, 1339, 1343, 1347, 1356, 1358, - 1361, 1365, 1369, 1370, 1371, 1375, 1386, 1404, 1417, 1418, - 1423, 1449, 1450, 1455, 1460, 1462, 1467, 1468, 1476, 1478, - 1486, 1491, 1499, 1524, 1531, 1541, 1542, 1546, 1547, 1548, - 1549, 1553, 1554, 1555, 1559, 1564, 1569, 1577, 1578, 1579, - 1580, 1581, 1582, 1583, 1593, 1598, 1606, 1611, 1619, 1621, - 1625, 1630, 1635, 1643, 1648, 1656, 1665, 1666, 1670, 1671, - 1675, 1683, 1701, 1705, 1710, 1718, 1723, 1724, 1728, 1733, - 1741, 1746, 1751, 1756, 1761, 1769, 1774, 1779, 1787, 1792, - 1793, 1794, 1795, 1796 + 0, 399, 399, 403, 404, 405, 420, 421, 422, 423, + 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, + 434, 442, 452, 453, 454, 455, 456, 460, 461, 466, + 471, 473, 479, 480, 488, 489, 490, 494, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 511, 513, 518, + 519, 520, 521, 522, 523, 527, 532, 541, 551, 552, + 562, 564, 566, 568, 579, 586, 588, 593, 595, 597, + 599, 601, 611, 617, 618, 626, 628, 640, 641, 642, + 643, 644, 653, 658, 663, 671, 673, 675, 677, 682, + 683, 684, 685, 686, 687, 688, 689, 690, 694, 695, + 704, 706, 715, 725, 730, 738, 739, 740, 741, 742, + 743, 744, 745, 750, 751, 759, 769, 778, 793, 798, + 799, 803, 804, 808, 809, 810, 811, 812, 813, 814, + 823, 827, 831, 840, 849, 865, 881, 891, 900, 916, + 917, 925, 926, 946, 947, 955, 966, 967, 968, 969, + 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, + 980, 981, 982, 986, 991, 999, 1004, 1005, 1006, 1010, + 1015, 1023, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, + 1043, 1053, 1058, 1066, 1068, 1070, 1079, 1081, 1086, 1087, + 1088, 1092, 1093, 1094, 1095, 1103, 1113, 1118, 1126, 1131, + 1132, 1140, 1145, 1150, 1158, 1163, 1164, 1165, 1174, 1176, + 1181, 1186, 1194, 1196, 1213, 1214, 1215, 1216, 1217, 1218, + 1222, 1223, 1224, 1225, 1226, 1227, 1235, 1240, 1245, 1253, + 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, + 1276, 1277, 1278, 1285, 1292, 1299, 1315, 1334, 1342, 1344, + 1346, 1348, 1350, 1352, 1354, 1361, 1366, 1367, 1368, 1372, + 1376, 1385, 1387, 1390, 1394, 1398, 1399, 1400, 1404, 1415, + 1433, 1446, 1447, 1452, 1478, 1484, 1489, 1494, 1496, 1501, + 1502, 1510, 1512, 1520, 1525, 1533, 1558, 1565, 1575, 1576, + 1580, 1581, 1582, 1583, 1587, 1588, 1589, 1593, 1598, 1603, + 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1627, 1632, 1640, + 1645, 1653, 1655, 1659, 1664, 1669, 1677, 1682, 1690, 1699, + 1700, 1704, 1705, 1709, 1717, 1735, 1739, 1744, 1752, 1757, + 1758, 1762, 1767, 1775, 1780, 1785, 1790, 1795, 1803, 1808, + 1813, 1821, 1826, 1827, 1828, 1829, 1830 }; #endif @@ -1412,11 +1425,11 @@ static const char *const yytname[] = "T_Broadcast", "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate", "T_Ceiling", "T_Checkhash", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto", "T_Cryptostats", "T_Ctl", "T_Day", - "T_Default", "T_Device", "T_Digest", "T_Disable", "T_Discard", - "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "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_Fuzz", "T_Host", + "T_Default", "T_Delrestrict", "T_Device", "T_Digest", "T_Disable", + "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", + "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_Fuzz", "T_Host", "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Ignorehash", "T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer", "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit", @@ -1458,10 +1471,10 @@ static const char *const yytname[] = "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", + "access_control_command", "restrict_mask", "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", "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword", "device_command", "device_item_list", "device_item", "device_item_path_keyword", "rlimit_command", "rlimit_option_list", @@ -1492,38 +1505,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 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, 454, - 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 468, 469, 124, 61, 40, 41, 123, - 125 -}; -#endif - -#define YYPACT_NINF (-247) +#define YYPACT_NINF (-280) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -1533,390 +1515,396 @@ static const yytype_int16 yytoknum[] = #define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { - 5, -178, -19, -247, -247, -247, -2, -247, -58, 294, - 29, -94, -247, 294, -247, 109, -58, -247, -79, -247, - -70, -68, -65, -247, -63, -247, -247, -58, 42, 205, - -58, -247, -247, -56, -247, -50, -247, -247, -247, 45, - 27, 41, 55, -34, -247, -247, -49, 109, -41, -247, - 271, 554, -40, -64, 72, -247, -247, -247, 145, 196, - -54, -247, -58, -247, -58, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -247, 33, 83, -22, -17, - -247, -11, -247, -247, -52, -247, -247, -247, 26, -247, - -247, -247, -121, -247, -5, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -247, -247, 294, -247, -247, - -247, -247, -247, -247, 29, -247, 86, 119, -247, 294, - -247, -247, -247, -247, -247, -247, -247, -247, -247, 319, - 377, -247, -247, -10, -247, -63, -247, -247, -58, -247, - -247, -247, -247, -247, -247, -247, -247, -247, 205, -247, - 104, -58, -247, -247, 7, 23, -247, -247, -247, -247, - -247, -247, -247, -247, 27, -247, 103, 154, 156, 103, - 1, -247, -247, -247, -247, -34, -247, 126, -29, -247, - 109, -247, -247, -247, -247, -247, -247, -247, -247, -247, - -247, -247, -247, 271, -247, 33, 30, -247, -247, -247, - -20, -247, -247, -247, -247, -247, -247, -247, -247, 554, - -247, 139, 33, -247, -247, -247, 143, -64, -247, -247, - -247, 155, -247, 20, -247, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -247, 4, -104, -247, -247, - -247, -247, -247, 157, -247, 54, -247, -247, -121, -247, - 57, -247, -247, -247, -247, -247, -4, 58, -247, -247, - -247, -247, -247, 67, 175, -247, -247, 319, -247, 33, - -20, -247, -247, -247, -247, -247, -247, -247, -247, -247, - -247, -247, -247, 178, -247, 184, -247, 103, 103, -247, - -40, -247, -247, -247, 79, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -247, -55, 214, -247, -247, - -247, 48, -247, -247, -247, -247, -247, -247, -247, -247, - -143, 51, 43, -247, -247, -247, -247, -247, -247, 88, - -247, -247, -1, -247, -247, -247, -247, -247, -247, -247, - -247, -247, 49, -247, 465, -247, -247, 465, 103, 465, - 227, -40, 192, -247, 198, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -61, -247, 98, 64, 69, - -150, -247, 62, -247, 33, -247, -247, -247, -247, -247, - -247, -247, -247, -247, 206, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, - -247, 226, -247, -247, 465, 465, -247, -247, -247, -247, - -247, 68, -247, -247, -247, -58, -247, -247, -247, 81, - -247, -247, -247, 465, -247, -247, 74, 84, 33, 76, - -131, -247, 90, 33, -247, -247, -247, 78, 131, -247, - -247, -247, -247, -247, 6, 91, 82, -247, 100, -247, - 33, -247, -247 + 10, -173, -31, -280, -280, -280, -11, -280, -89, -28, + 301, 3, -115, -280, 301, -280, 82, -28, -280, -98, + -280, -94, -83, -75, -280, -74, -280, -280, -28, 19, + 213, -28, -280, -280, -69, -280, -62, -280, -280, -280, + 35, 15, 101, 45, -42, -280, -280, -56, 82, -53, + -280, 53, 582, -49, -65, 49, -280, -280, -280, 129, + 202, -64, -280, -28, -280, -28, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, 0, 61, -29, + -24, -280, -22, -280, -280, -76, -280, -280, -280, 102, + -49, -280, 62, -280, -280, -113, -280, -18, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + 301, -280, -280, -280, -280, -280, -280, 3, -280, 89, + 122, -280, 301, -280, -280, -280, -280, -280, -280, -280, + -280, -280, 281, 384, -280, -280, -1, -280, -74, -280, + -280, -28, -280, -280, -280, -280, -280, -280, -280, -280, + -280, 213, -280, 92, -28, -280, -280, -13, -5, -280, + -280, -280, -280, -280, -280, -280, -280, 15, -280, 91, + 143, 145, 91, 62, -280, -280, -280, -280, -42, -280, + 111, -35, -280, 82, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, 53, -280, 0, 6, + -280, -280, -280, -38, -280, -280, -280, -280, -280, -280, + -280, -280, 582, -280, 115, 0, -280, -280, -280, 116, + -65, -280, -280, -280, 117, -280, -16, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, 8, + -112, -280, -280, -280, -280, -280, 118, -280, 17, -280, + -49, -280, -280, -280, -113, -280, 26, -280, -280, -280, + -280, -280, 21, 27, -280, -280, -280, -280, -280, 28, + 138, -280, -280, 281, -280, 0, -38, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, 140, + -280, 141, -280, 91, 91, -280, 91, -280, -280, 38, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -61, 173, -280, -280, -280, 387, -280, -280, -280, + -280, -280, -280, -280, -280, -87, 12, 5, -280, -280, + -280, -280, -280, -280, -280, 54, -280, -280, 1, -280, + -280, -280, -280, -280, -280, -280, -280, -280, 14, -280, + 513, -280, -280, 513, -280, 208, -49, 170, -280, 172, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -57, -280, 72, 31, 47, -151, -280, 30, -280, 0, + -280, -280, -280, -280, -280, -280, -280, -280, -280, 186, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, 199, -280, -280, 513, + 513, 513, -280, -280, -280, -280, 42, -280, -280, -280, + -28, -280, -280, -280, 48, -280, -280, -280, -280, -280, + 50, 52, 0, 56, -192, -280, 59, 0, -280, -280, + -280, 51, 139, -280, -280, -280, -280, -280, 85, 64, + 57, -280, 70, -280, 0, -280, -280 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int16 yydefact[] = { - 0, 0, 0, 25, 60, 253, 0, 73, 0, 0, - 0, 267, 256, 0, 245, 0, 0, 261, 0, 285, - 0, 0, 0, 257, 0, 262, 26, 0, 0, 0, - 0, 286, 254, 0, 24, 0, 263, 268, 23, 0, - 0, 0, 0, 0, 264, 22, 0, 0, 0, 255, - 0, 0, 0, 0, 0, 58, 59, 322, 0, 2, - 0, 7, 0, 8, 0, 9, 10, 13, 11, 12, - 14, 20, 15, 16, 17, 18, 0, 0, 0, 0, - 237, 0, 238, 19, 0, 5, 64, 65, 66, 30, - 31, 29, 0, 27, 0, 211, 212, 213, 214, 217, - 215, 216, 218, 219, 220, 221, 222, 206, 208, 209, - 210, 163, 164, 165, 130, 161, 0, 265, 246, 205, - 105, 106, 107, 108, 112, 109, 110, 111, 113, 0, - 6, 67, 68, 260, 282, 247, 281, 314, 61, 63, - 169, 170, 171, 172, 173, 174, 175, 176, 131, 167, - 0, 62, 72, 312, 248, 249, 69, 297, 298, 299, - 300, 301, 302, 303, 294, 296, 138, 30, 31, 138, - 138, 70, 204, 202, 203, 198, 200, 0, 0, 250, - 100, 104, 101, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 223, 225, 0, 0, 89, 90, 91, - 0, 92, 93, 99, 94, 98, 95, 96, 97, 82, - 84, 0, 0, 88, 276, 308, 0, 71, 307, 309, - 305, 252, 1, 0, 4, 32, 57, 319, 318, 239, - 240, 241, 242, 293, 292, 291, 0, 0, 81, 77, - 78, 79, 80, 0, 74, 0, 197, 196, 192, 194, - 0, 28, 207, 160, 162, 266, 102, 0, 188, 189, - 190, 191, 187, 0, 0, 185, 186, 177, 179, 0, - 0, 243, 259, 258, 244, 280, 313, 166, 168, 311, - 272, 271, 269, 0, 295, 0, 140, 138, 138, 140, - 0, 140, 199, 201, 0, 103, 224, 226, 320, 317, - 315, 316, 87, 83, 85, 86, 251, 0, 306, 304, - 3, 21, 287, 288, 289, 284, 290, 283, 326, 327, - 0, 0, 0, 76, 75, 193, 195, 122, 121, 0, - 119, 120, 0, 114, 117, 118, 183, 184, 182, 178, - 180, 181, 0, 139, 134, 140, 140, 137, 138, 132, - 275, 0, 0, 277, 0, 38, 39, 40, 56, 49, - 51, 50, 53, 41, 42, 43, 44, 52, 54, 45, - 46, 33, 34, 37, 35, 0, 36, 0, 0, 0, - 0, 329, 0, 324, 0, 115, 129, 125, 127, 123, - 124, 126, 128, 116, 0, 143, 144, 145, 146, 147, - 148, 149, 151, 152, 150, 153, 154, 155, 156, 157, - 158, 0, 159, 141, 135, 136, 140, 274, 273, 279, - 278, 0, 47, 48, 55, 0, 323, 321, 328, 0, - 325, 270, 142, 133, 310, 332, 0, 0, 0, 0, - 0, 334, 0, 0, 330, 333, 331, 0, 0, 339, - 340, 341, 342, 343, 0, 0, 0, 335, 0, 337, - 0, 336, 338 + 0, 0, 0, 25, 60, 256, 0, 73, 0, 0, + 0, 0, 270, 259, 0, 248, 0, 0, 264, 0, + 288, 0, 0, 0, 260, 0, 265, 26, 0, 0, + 0, 0, 289, 257, 0, 24, 0, 266, 271, 23, + 0, 0, 0, 0, 0, 267, 22, 0, 0, 0, + 258, 0, 0, 0, 0, 0, 58, 59, 325, 0, + 2, 0, 7, 0, 8, 0, 9, 10, 13, 11, + 12, 14, 20, 15, 16, 17, 18, 0, 0, 0, + 0, 240, 0, 241, 19, 0, 5, 64, 65, 66, + 0, 29, 139, 30, 31, 0, 27, 0, 214, 215, + 216, 217, 220, 218, 219, 221, 222, 223, 224, 225, + 209, 211, 212, 213, 166, 167, 168, 130, 164, 0, + 268, 249, 208, 105, 106, 107, 108, 112, 109, 110, + 111, 113, 0, 6, 67, 68, 263, 285, 250, 284, + 317, 61, 63, 172, 173, 174, 175, 176, 177, 178, + 179, 131, 170, 0, 62, 72, 315, 251, 252, 69, + 300, 301, 302, 303, 304, 305, 306, 297, 299, 141, + 30, 31, 141, 139, 70, 207, 205, 206, 201, 203, + 0, 0, 253, 100, 104, 101, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 226, 228, 0, 0, + 89, 90, 91, 0, 92, 93, 99, 94, 98, 95, + 96, 97, 82, 84, 0, 0, 88, 279, 311, 0, + 71, 310, 312, 308, 255, 1, 0, 4, 32, 57, + 322, 321, 242, 243, 244, 245, 296, 295, 294, 0, + 0, 81, 77, 78, 79, 80, 0, 74, 0, 138, + 0, 137, 200, 199, 195, 197, 0, 28, 210, 163, + 165, 269, 102, 0, 191, 192, 193, 194, 190, 0, + 0, 188, 189, 180, 182, 0, 0, 246, 262, 261, + 247, 283, 316, 169, 171, 314, 275, 274, 272, 0, + 298, 0, 143, 141, 141, 143, 141, 202, 204, 0, + 103, 227, 229, 323, 320, 318, 319, 87, 83, 85, + 86, 254, 0, 309, 307, 3, 21, 290, 291, 292, + 287, 293, 286, 329, 330, 0, 0, 0, 76, 75, + 140, 196, 198, 122, 121, 0, 119, 120, 0, 114, + 117, 118, 186, 187, 185, 181, 183, 184, 0, 142, + 133, 143, 143, 136, 143, 278, 0, 0, 280, 0, + 38, 39, 40, 56, 49, 51, 50, 53, 41, 42, + 43, 44, 52, 54, 45, 46, 33, 34, 37, 35, + 0, 36, 0, 0, 0, 0, 332, 0, 327, 0, + 115, 129, 125, 127, 123, 124, 126, 128, 116, 0, + 146, 147, 148, 149, 150, 151, 152, 154, 155, 153, + 156, 157, 158, 159, 160, 161, 0, 162, 144, 134, + 135, 132, 277, 276, 282, 281, 0, 47, 48, 55, + 0, 326, 324, 331, 0, 328, 273, 145, 313, 335, + 0, 0, 0, 0, 0, 337, 0, 0, 333, 336, + 334, 0, 0, 342, 343, 344, 345, 346, 0, 0, + 0, 338, 0, 340, 0, 339, 341 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -247, -247, -247, -48, -247, -247, -8, -51, -247, -247, - -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, - -247, -247, -247, -247, -247, -247, 96, -247, -247, -247, - -247, -42, -247, -247, -247, -247, -247, -247, -108, -246, - -247, -247, 194, -247, -247, 163, -247, -247, -247, 50, - -247, -247, -247, -247, 71, -247, -247, -247, 140, -247, - -247, 303, -87, -247, -247, -247, -247, 127, -247, -247, - -247, -247, -247, -247, -247, -247, -247, -247, -247, -247, - -247, -247, -247, -247, 186, -247, -247, -247, -247, -247, - -247, 159, -247, -247, 107, -247, -247, 296, 60, -193, - -247, -247, -247, -247, 11, -247, -247, -53, -247, -247, - -247, -106, -247, -122, -247 + -280, -280, -280, -36, -280, -280, -9, -7, -280, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, -280, 69, -280, -280, -280, + -280, -45, -280, -280, -280, -280, -280, -280, 114, -157, + -279, -280, -280, 171, -280, -280, 142, -280, -280, -280, + 16, -280, -280, -280, -280, 68, -280, -280, -280, 123, + -280, -280, 278, -71, -280, -280, -280, -280, 106, -280, + -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, + -280, -280, -280, -280, -280, 166, -280, -280, -280, -280, + -280, -280, 144, -280, -280, 87, -280, -280, 274, 37, + -196, -280, -280, -280, -280, -10, -280, -280, -59, -280, + -280, -280, -128, -280, -135, -280 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 58, 59, 60, 61, 62, 137, 93, 94, 311, - 371, 372, 373, 374, 375, 376, 377, 63, 64, 65, - 66, 88, 244, 245, 67, 209, 210, 211, 212, 68, - 180, 128, 256, 333, 334, 335, 393, 69, 286, 344, - 413, 114, 115, 116, 148, 149, 150, 70, 267, 268, - 269, 270, 71, 248, 249, 250, 72, 175, 176, 177, - 73, 107, 108, 109, 110, 74, 193, 194, 195, 75, - 76, 77, 274, 78, 79, 118, 155, 282, 283, 179, - 418, 306, 353, 135, 136, 80, 81, 317, 236, 82, - 164, 165, 221, 217, 218, 219, 154, 138, 302, 229, - 213, 83, 84, 320, 321, 322, 380, 381, 437, 382, - 440, 441, 454, 455, 456 + 0, 59, 60, 61, 62, 63, 140, 96, 97, 316, + 376, 377, 378, 379, 380, 381, 382, 64, 65, 66, + 67, 89, 247, 248, 68, 212, 213, 214, 215, 69, + 183, 131, 262, 339, 340, 341, 398, 70, 251, 292, + 350, 418, 117, 118, 119, 151, 152, 153, 71, 273, + 274, 275, 276, 72, 254, 255, 256, 73, 178, 179, + 180, 74, 110, 111, 112, 113, 75, 196, 197, 198, + 76, 77, 78, 280, 79, 80, 121, 158, 288, 289, + 182, 423, 311, 358, 138, 139, 81, 82, 322, 239, + 83, 167, 168, 224, 220, 221, 222, 157, 141, 307, + 232, 216, 84, 85, 325, 326, 327, 385, 386, 441, + 387, 444, 445, 458, 459, 460 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 92, 214, 297, 386, 215, 181, 1, 422, 129, 312, - 378, 223, 272, 172, 351, 2, 89, 378, 90, 305, - 252, 3, 4, 5, 299, 246, 85, 233, 387, 327, - 6, 7, 252, 170, 157, 158, 8, 328, 9, 10, - 111, 329, 11, 347, 12, 349, 13, 14, 300, 86, - 234, 15, 273, 280, 225, 159, 226, 355, 238, 247, - 16, 289, 291, 318, 319, 17, 87, 356, 173, 227, - 427, 166, 18, 285, 19, 235, 340, 313, 439, 314, - 117, 330, 271, 239, 20, 21, 240, 22, 23, 444, - 352, 281, 24, 25, 290, 130, 26, 27, 160, 414, - 415, 228, 318, 319, 131, 28, 132, 357, 358, 133, - 139, 134, 388, 156, 331, 167, 91, 168, 152, 29, - 389, 30, 31, 171, 153, 178, 359, 32, 161, 423, - 276, 174, 120, 182, 91, 112, 121, 33, 295, 390, - 220, 113, 34, 276, 35, 222, 36, 360, 37, 38, - 224, 230, 231, 216, 254, 255, 361, 232, 362, 39, - 40, 41, 42, 43, 44, 45, 301, 237, 46, 251, - 433, 47, 278, 48, 363, 285, 241, 242, 315, 345, - 346, 279, 49, 243, 287, 332, 288, 294, 50, 51, - 52, 430, 53, 54, 293, 364, 365, 391, 122, 55, - 56, 392, 162, 316, 298, 169, 2, 304, 163, -6, - 57, 307, 3, 4, 5, 91, 449, 450, 451, 452, - 453, 6, 7, 309, 310, 323, 457, 8, 324, 9, - 10, 326, 336, 11, 366, 12, 367, 13, 14, 348, - 416, 337, 15, 338, 368, 442, 342, 123, 369, 370, - 447, 16, 343, 350, 354, 383, 17, 417, 124, 384, - 420, 125, 385, 18, 394, 19, 421, 462, 140, 141, - 142, 143, 424, 426, 431, 20, 21, 183, 22, 23, - 425, 429, 432, 24, 25, 126, 434, 26, 27, 436, - 438, 127, 443, 439, 446, 459, 28, 448, 460, 144, - 419, 145, 95, 146, 461, 303, 184, 96, 253, 147, - 29, 277, 30, 31, 97, 292, 119, 339, 32, 325, - 296, 275, 257, 284, 308, 185, 151, 428, 33, 186, - 341, 379, 458, 34, 445, 35, 0, 36, 0, 37, - 38, 449, 450, 451, 452, 453, 0, 0, 0, 0, - 39, 40, 41, 42, 43, 44, 45, 0, 0, 46, - 0, 0, 47, 0, 48, 0, 0, 258, 259, 260, - 261, 98, 0, 49, 0, 0, 0, 0, 0, 50, - 51, 52, 0, 53, 54, 0, 0, 2, 0, 0, - 55, 56, 0, 3, 4, 5, 0, 0, 0, 0, - -6, 57, 6, 7, 0, 99, 100, 187, 8, 0, - 9, 10, 0, 0, 11, 0, 12, 435, 13, 14, - 0, 0, 0, 15, 101, 0, 262, 0, 0, 102, - 0, 0, 16, 0, 0, 0, 0, 17, 0, 0, - 188, 189, 190, 191, 18, 0, 19, 0, 192, 0, - 0, 0, 0, 0, 0, 0, 20, 21, 0, 22, - 23, 103, 0, 0, 24, 25, 0, 0, 26, 27, - 0, 0, 263, 0, 0, 0, 0, 28, 0, 0, - 0, 0, 0, 0, 0, 104, 105, 106, 0, 0, - 0, 29, 264, 30, 31, 0, 0, 265, 266, 32, - 0, 0, 0, 0, 0, 0, 0, 0, 395, 33, - 0, 0, 0, 0, 34, 0, 35, 396, 36, 0, - 37, 38, 0, 0, 0, 0, 397, 0, 0, 0, - 0, 39, 40, 41, 42, 43, 44, 45, 0, 0, - 46, 0, 0, 47, 0, 48, 398, 0, 0, 399, - 0, 0, 0, 0, 49, 400, 0, 0, 0, 0, - 50, 51, 52, 0, 53, 54, 196, 0, 197, 198, - 0, 55, 56, 0, 0, 199, 0, 0, 200, 0, - 401, 0, 57, 0, 402, 403, 0, 0, 404, 405, - 406, 0, 407, 408, 409, 0, 410, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, + 95, 92, 302, 184, 218, 391, 175, 304, 132, 356, + 383, 1, 427, 317, 114, 295, 353, 236, 443, 310, + 2, 278, 160, 161, 226, 286, 3, 4, 5, 448, + 392, 305, 86, 173, 252, 6, 7, 230, 87, 258, + 237, 8, 9, 162, 10, 11, 217, 93, 12, 94, + 13, 258, 14, 15, 228, 333, 229, 16, 88, 186, + 120, 176, 279, 334, 287, 238, 17, 335, 253, 231, + 432, 18, 419, 420, 383, 421, 90, 133, 19, 346, + 20, 134, 318, 249, 319, 357, 91, 163, 142, 187, + 21, 22, 135, 23, 24, 323, 324, 277, 25, 26, + 136, 137, 27, 28, 159, 123, 155, 336, 188, 124, + 115, 29, 189, 156, 174, 393, 116, 164, 223, 181, + 323, 324, 185, 394, 177, 30, 91, 31, 32, 225, + 233, 169, 282, 33, 428, 241, 351, 352, 300, 354, + 337, 227, 395, 34, 240, 282, 234, 91, 35, 306, + 36, 235, 37, 219, 38, 39, 250, 257, 260, 261, + 242, 284, 285, 243, 291, 40, 41, 42, 43, 44, + 45, 46, 125, 293, 47, 294, 170, 48, 171, 49, + 298, 303, 299, 320, 309, 312, 314, 328, 50, 315, + 190, 165, 329, 435, 51, 52, 53, 166, 54, 55, + 396, 332, 342, 343, 397, 56, 57, 344, 321, 348, + 349, 338, 2, 355, 359, -6, 58, 388, 3, 4, + 5, 126, 389, 191, 192, 193, 194, 6, 7, 390, + 399, 195, 127, 8, 9, 128, 10, 11, 422, 425, + 12, 426, 13, 330, 14, 15, 446, 429, 430, 16, + 434, 451, 431, 244, 245, 436, 437, 440, 17, 129, + 246, 438, 443, 18, 450, 130, 172, 442, 466, 463, + 19, 452, 20, 447, 464, 465, 91, 143, 144, 145, + 146, 308, 21, 22, 263, 23, 24, 296, 259, 345, + 25, 26, 122, 283, 27, 28, 453, 454, 455, 456, + 457, 297, 301, 29, 281, 154, 461, 313, 147, 98, + 148, 290, 149, 347, 99, 384, 449, 30, 150, 31, + 32, 100, 331, 462, 0, 33, 433, 0, 0, 0, + 264, 265, 266, 267, 0, 34, 0, 0, 0, 0, + 35, 0, 36, 0, 37, 0, 38, 39, 0, 424, + 453, 454, 455, 456, 457, 0, 0, 40, 41, 42, + 43, 44, 45, 46, 0, 0, 47, 0, 0, 48, + 0, 49, 0, 0, 0, 0, 0, 0, 0, 101, + 50, 0, 0, 0, 0, 0, 51, 52, 53, 268, + 54, 55, 0, 0, 2, 0, 360, 56, 57, 0, + 3, 4, 5, 0, 0, 0, 361, -6, 58, 6, + 7, 0, 0, 102, 103, 8, 9, 0, 10, 11, + 0, 439, 12, 0, 13, 0, 14, 15, 0, 0, + 0, 16, 104, 0, 0, 269, 0, 105, 0, 0, + 17, 0, 0, 0, 0, 18, 0, 362, 363, 0, + 0, 0, 19, 0, 20, 270, 0, 0, 0, 0, + 271, 272, 0, 0, 21, 22, 364, 23, 24, 106, + 0, 0, 25, 26, 0, 0, 27, 28, 0, 0, + 0, 0, 0, 0, 0, 29, 0, 365, 0, 0, + 0, 0, 0, 107, 108, 109, 366, 0, 367, 30, + 0, 31, 32, 0, 0, 0, 0, 33, 0, 0, + 0, 0, 0, 0, 368, 0, 0, 34, 0, 0, + 0, 0, 35, 0, 36, 0, 37, 0, 38, 39, + 0, 0, 0, 0, 0, 369, 370, 0, 0, 40, + 41, 42, 43, 44, 45, 46, 0, 0, 47, 0, + 0, 48, 0, 49, 0, 0, 0, 400, 0, 0, + 0, 0, 50, 0, 0, 0, 401, 0, 51, 52, + 53, 0, 54, 55, 371, 402, 372, 0, 0, 56, + 57, 0, 0, 0, 373, 0, 0, 0, 374, 375, + 58, 0, 0, 0, 199, 403, 200, 201, 404, 0, + 0, 0, 0, 202, 405, 0, 203, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 406, + 0, 0, 0, 407, 408, 0, 204, 409, 410, 411, + 0, 412, 413, 414, 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, - 0, 203, 0, 0, 0, 0, 0, 204, 0, 205, - 0, 412, 0, 206, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 416, 0, 0, 205, 0, + 206, 0, 0, 0, 0, 0, 207, 0, 208, 0, + 0, 0, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 207, 208 + 417, 0, 0, 0, 0, 0, 210, 211 }; static const yytype_int16 yycheck[] = { - 8, 52, 195, 4, 68, 47, 1, 68, 16, 5, - 160, 59, 22, 47, 69, 10, 74, 160, 76, 212, - 107, 16, 17, 18, 44, 146, 204, 38, 29, 33, - 25, 26, 119, 41, 7, 8, 31, 41, 33, 34, - 11, 45, 37, 289, 39, 291, 41, 42, 68, 68, - 61, 46, 62, 30, 62, 28, 64, 9, 32, 180, - 55, 169, 170, 206, 207, 60, 68, 19, 102, 36, - 220, 30, 67, 72, 69, 86, 269, 73, 209, 75, - 174, 85, 130, 57, 79, 80, 60, 82, 83, 220, - 145, 68, 87, 88, 93, 174, 91, 92, 71, 345, - 346, 68, 206, 207, 174, 100, 174, 59, 60, 174, - 68, 174, 113, 68, 118, 74, 174, 76, 174, 114, - 121, 116, 117, 68, 174, 174, 78, 122, 101, 190, - 138, 165, 23, 174, 174, 106, 27, 132, 180, 140, - 68, 112, 137, 151, 139, 0, 141, 99, 143, 144, - 204, 68, 174, 217, 68, 36, 108, 174, 110, 154, - 155, 156, 157, 158, 159, 160, 186, 219, 163, 174, - 416, 166, 68, 168, 126, 72, 150, 151, 174, 287, - 288, 174, 177, 157, 30, 189, 30, 216, 183, 184, - 185, 384, 187, 188, 68, 147, 148, 198, 89, 194, - 195, 202, 175, 199, 174, 164, 10, 68, 181, 204, - 205, 68, 16, 17, 18, 174, 210, 211, 212, 213, - 214, 25, 26, 68, 204, 68, 220, 31, 174, 33, - 34, 174, 174, 37, 186, 39, 188, 41, 42, 290, - 348, 174, 46, 68, 196, 438, 68, 138, 200, 201, - 443, 55, 68, 174, 40, 204, 60, 30, 149, 216, - 68, 152, 174, 67, 215, 69, 68, 460, 63, 64, - 65, 66, 174, 204, 68, 79, 80, 6, 82, 83, - 216, 219, 56, 87, 88, 176, 218, 91, 92, 208, - 216, 182, 216, 209, 204, 204, 100, 219, 216, 94, - 351, 96, 8, 98, 204, 209, 35, 13, 114, 104, - 114, 148, 116, 117, 20, 175, 13, 267, 122, 248, - 193, 135, 3, 164, 217, 54, 30, 380, 132, 58, - 270, 320, 454, 137, 440, 139, -1, 141, -1, 143, - 144, 210, 211, 212, 213, 214, -1, -1, -1, -1, - 154, 155, 156, 157, 158, 159, 160, -1, -1, 163, - -1, -1, 166, -1, 168, -1, -1, 48, 49, 50, - 51, 77, -1, 177, -1, -1, -1, -1, -1, 183, - 184, 185, -1, 187, 188, -1, -1, 10, -1, -1, - 194, 195, -1, 16, 17, 18, -1, -1, -1, -1, - 204, 205, 25, 26, -1, 111, 112, 136, 31, -1, - 33, 34, -1, -1, 37, -1, 39, 425, 41, 42, - -1, -1, -1, 46, 130, -1, 107, -1, -1, 135, - -1, -1, 55, -1, -1, -1, -1, 60, -1, -1, - 169, 170, 171, 172, 67, -1, 69, -1, 177, -1, - -1, -1, -1, -1, -1, -1, 79, 80, -1, 82, - 83, 167, -1, -1, 87, 88, -1, -1, 91, 92, - -1, -1, 153, -1, -1, -1, -1, 100, -1, -1, - -1, -1, -1, -1, -1, 191, 192, 193, -1, -1, - -1, 114, 173, 116, 117, -1, -1, 178, 179, 122, - -1, -1, -1, -1, -1, -1, -1, -1, 43, 132, - -1, -1, -1, -1, 137, -1, 139, 52, 141, -1, - 143, 144, -1, -1, -1, -1, 61, -1, -1, -1, - -1, 154, 155, 156, 157, 158, 159, 160, -1, -1, - 163, -1, -1, 166, -1, 168, 81, -1, -1, 84, - -1, -1, -1, -1, 177, 90, -1, -1, -1, -1, - 183, 184, 185, -1, 187, 188, 12, -1, 14, 15, - -1, 194, 195, -1, -1, 21, -1, -1, 24, -1, - 115, -1, 205, -1, 119, 120, -1, -1, 123, 124, - 125, -1, 127, 128, 129, -1, 131, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, + 9, 8, 198, 48, 69, 4, 48, 45, 17, 70, + 161, 1, 69, 5, 11, 172, 295, 39, 210, 215, + 10, 22, 7, 8, 60, 30, 16, 17, 18, 221, + 29, 69, 205, 42, 147, 25, 26, 37, 69, 110, + 62, 31, 32, 28, 34, 35, 53, 75, 38, 77, + 40, 122, 42, 43, 63, 34, 65, 47, 69, 6, + 175, 103, 63, 42, 69, 87, 56, 46, 181, 69, + 221, 61, 351, 352, 161, 354, 165, 175, 68, 275, + 70, 175, 74, 90, 76, 146, 175, 72, 69, 36, + 80, 81, 175, 83, 84, 207, 208, 133, 88, 89, + 175, 175, 92, 93, 69, 23, 175, 86, 55, 27, + 107, 101, 59, 175, 69, 114, 113, 102, 69, 175, + 207, 208, 175, 122, 166, 115, 175, 117, 118, 0, + 69, 30, 141, 123, 191, 33, 293, 294, 183, 296, + 119, 205, 141, 133, 220, 154, 175, 175, 138, 187, + 140, 175, 142, 218, 144, 145, 94, 175, 69, 37, + 58, 69, 175, 61, 73, 155, 156, 157, 158, 159, + 160, 161, 90, 30, 164, 30, 75, 167, 77, 169, + 69, 175, 217, 175, 69, 69, 69, 69, 178, 205, + 137, 176, 175, 389, 184, 185, 186, 182, 188, 189, + 199, 175, 175, 175, 203, 195, 196, 69, 200, 69, + 69, 190, 10, 175, 41, 205, 206, 205, 16, 17, + 18, 139, 217, 170, 171, 172, 173, 25, 26, 175, + 216, 178, 150, 31, 32, 153, 34, 35, 30, 69, + 38, 69, 40, 250, 42, 43, 442, 175, 217, 47, + 220, 447, 205, 151, 152, 69, 57, 209, 56, 177, + 158, 219, 210, 61, 205, 183, 165, 217, 464, 205, + 68, 220, 70, 217, 217, 205, 175, 64, 65, 66, + 67, 212, 80, 81, 3, 83, 84, 173, 117, 273, + 88, 89, 14, 151, 92, 93, 211, 212, 213, 214, + 215, 178, 196, 101, 138, 31, 221, 220, 95, 8, + 97, 167, 99, 276, 13, 325, 444, 115, 105, 117, + 118, 20, 254, 458, -1, 123, 385, -1, -1, -1, + 49, 50, 51, 52, -1, 133, -1, -1, -1, -1, + 138, -1, 140, -1, 142, -1, 144, 145, -1, 356, + 211, 212, 213, 214, 215, -1, -1, 155, 156, 157, + 158, 159, 160, 161, -1, -1, 164, -1, -1, 167, + -1, 169, -1, -1, -1, -1, -1, -1, -1, 78, + 178, -1, -1, -1, -1, -1, 184, 185, 186, 108, + 188, 189, -1, -1, 10, -1, 9, 195, 196, -1, + 16, 17, 18, -1, -1, -1, 19, 205, 206, 25, + 26, -1, -1, 112, 113, 31, 32, -1, 34, 35, + -1, 430, 38, -1, 40, -1, 42, 43, -1, -1, + -1, 47, 131, -1, -1, 154, -1, 136, -1, -1, + 56, -1, -1, -1, -1, 61, -1, 60, 61, -1, + -1, -1, 68, -1, 70, 174, -1, -1, -1, -1, + 179, 180, -1, -1, 80, 81, 79, 83, 84, 168, + -1, -1, 88, 89, -1, -1, 92, 93, -1, -1, + -1, -1, -1, -1, -1, 101, -1, 100, -1, -1, + -1, -1, -1, 192, 193, 194, 109, -1, 111, 115, + -1, 117, 118, -1, -1, -1, -1, 123, -1, -1, + -1, -1, -1, -1, 127, -1, -1, 133, -1, -1, + -1, -1, 138, -1, 140, -1, 142, -1, 144, 145, + -1, -1, -1, -1, -1, 148, 149, -1, -1, 155, + 156, 157, 158, 159, 160, 161, -1, -1, 164, -1, + -1, 167, -1, 169, -1, -1, -1, 44, -1, -1, + -1, -1, 178, -1, -1, -1, 53, -1, 184, 185, + 186, -1, 188, 189, 187, 62, 189, -1, -1, 195, + 196, -1, -1, -1, 197, -1, -1, -1, 201, 202, + 206, -1, -1, -1, 12, 82, 14, 15, 85, -1, + -1, -1, -1, 21, 91, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 161, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, + -1, -1, -1, 120, 121, -1, 54, 124, 125, 126, + -1, 128, 129, 130, -1, 132, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, - -1, 97, -1, -1, -1, -1, -1, 103, -1, 105, - -1, 196, -1, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 133, 134 + -1, -1, -1, -1, -1, 162, -1, -1, 96, -1, + 98, -1, -1, -1, -1, -1, 104, -1, 106, -1, + -1, -1, 110, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 197, -1, -1, -1, -1, -1, 134, 135 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_int16 yystos[] = { - 0, 1, 10, 16, 17, 18, 25, 26, 31, 33, - 34, 37, 39, 41, 42, 46, 55, 60, 67, 69, - 79, 80, 82, 83, 87, 88, 91, 92, 100, 114, - 116, 117, 122, 132, 137, 139, 141, 143, 144, 154, - 155, 156, 157, 158, 159, 160, 163, 166, 168, 177, - 183, 184, 185, 187, 188, 194, 195, 205, 222, 223, - 224, 225, 226, 238, 239, 240, 241, 245, 250, 258, - 268, 273, 277, 281, 286, 290, 291, 292, 294, 295, - 306, 307, 310, 322, 323, 204, 68, 68, 242, 74, - 76, 174, 227, 228, 229, 8, 13, 20, 77, 111, - 112, 130, 135, 167, 191, 192, 193, 282, 283, 284, - 285, 11, 106, 112, 262, 263, 264, 174, 296, 282, - 23, 27, 89, 138, 149, 152, 176, 182, 252, 227, - 174, 174, 174, 174, 174, 304, 305, 227, 318, 68, - 63, 64, 65, 66, 94, 96, 98, 104, 265, 266, - 267, 318, 174, 174, 317, 297, 68, 7, 8, 28, - 71, 101, 175, 181, 311, 312, 30, 74, 76, 164, - 227, 68, 47, 102, 165, 278, 279, 280, 174, 300, - 251, 252, 174, 6, 35, 54, 58, 136, 169, 170, - 171, 172, 177, 287, 288, 289, 12, 14, 15, 21, - 24, 53, 95, 97, 103, 105, 109, 133, 134, 246, - 247, 248, 249, 321, 228, 68, 217, 314, 315, 316, - 68, 313, 0, 224, 204, 227, 227, 36, 68, 320, - 68, 174, 174, 38, 61, 86, 309, 219, 32, 57, - 60, 150, 151, 157, 243, 244, 146, 180, 274, 275, - 276, 174, 283, 263, 68, 36, 253, 3, 48, 49, - 50, 51, 107, 153, 173, 178, 179, 269, 270, 271, - 272, 224, 22, 62, 293, 305, 227, 266, 68, 174, - 30, 68, 298, 299, 312, 72, 259, 30, 30, 259, - 93, 259, 279, 68, 216, 252, 288, 320, 174, 44, - 68, 186, 319, 247, 68, 320, 302, 68, 315, 68, - 204, 230, 5, 73, 75, 174, 199, 308, 206, 207, - 324, 325, 326, 68, 174, 275, 174, 33, 41, 45, - 85, 118, 189, 254, 255, 256, 174, 174, 68, 270, - 320, 319, 68, 68, 260, 259, 259, 260, 228, 260, - 174, 69, 145, 303, 40, 9, 19, 59, 60, 78, - 99, 108, 110, 126, 147, 148, 186, 188, 196, 200, - 201, 231, 232, 233, 234, 235, 236, 237, 160, 325, - 327, 328, 330, 204, 216, 174, 4, 29, 113, 121, - 140, 198, 202, 257, 215, 43, 52, 61, 81, 84, - 90, 115, 119, 120, 123, 124, 125, 127, 128, 129, - 131, 161, 196, 261, 260, 260, 259, 30, 301, 228, - 68, 68, 68, 190, 174, 216, 204, 220, 328, 219, - 320, 68, 56, 260, 218, 227, 208, 329, 216, 209, - 331, 332, 320, 216, 220, 332, 204, 320, 219, 210, - 211, 212, 213, 214, 333, 334, 335, 220, 334, 204, - 216, 204, 320 + 0, 1, 10, 16, 17, 18, 25, 26, 31, 32, + 34, 35, 38, 40, 42, 43, 47, 56, 61, 68, + 70, 80, 81, 83, 84, 88, 89, 92, 93, 101, + 115, 117, 118, 123, 133, 138, 140, 142, 144, 145, + 155, 156, 157, 158, 159, 160, 161, 164, 167, 169, + 178, 184, 185, 186, 188, 189, 195, 196, 206, 223, + 224, 225, 226, 227, 239, 240, 241, 242, 246, 251, + 259, 270, 275, 279, 283, 288, 292, 293, 294, 296, + 297, 308, 309, 312, 324, 325, 205, 69, 69, 243, + 165, 175, 229, 75, 77, 228, 229, 230, 8, 13, + 20, 78, 112, 113, 131, 136, 168, 192, 193, 194, + 284, 285, 286, 287, 11, 107, 113, 264, 265, 266, + 175, 298, 284, 23, 27, 90, 139, 150, 153, 177, + 183, 253, 228, 175, 175, 175, 175, 175, 306, 307, + 228, 320, 69, 64, 65, 66, 67, 95, 97, 99, + 105, 267, 268, 269, 320, 175, 175, 319, 299, 69, + 7, 8, 28, 72, 102, 176, 182, 313, 314, 30, + 75, 77, 165, 228, 69, 48, 103, 166, 280, 281, + 282, 175, 302, 252, 253, 175, 6, 36, 55, 59, + 137, 170, 171, 172, 173, 178, 289, 290, 291, 12, + 14, 15, 21, 24, 54, 96, 98, 104, 106, 110, + 134, 135, 247, 248, 249, 250, 323, 229, 69, 218, + 316, 317, 318, 69, 315, 0, 225, 205, 228, 228, + 37, 69, 322, 69, 175, 175, 39, 62, 87, 311, + 220, 33, 58, 61, 151, 152, 158, 244, 245, 229, + 94, 260, 147, 181, 276, 277, 278, 175, 285, 265, + 69, 37, 254, 3, 49, 50, 51, 52, 108, 154, + 174, 179, 180, 271, 272, 273, 274, 225, 22, 63, + 295, 307, 228, 268, 69, 175, 30, 69, 300, 301, + 314, 73, 261, 30, 30, 261, 260, 281, 69, 217, + 253, 290, 322, 175, 45, 69, 187, 321, 248, 69, + 322, 304, 69, 317, 69, 205, 231, 5, 74, 76, + 175, 200, 310, 207, 208, 326, 327, 328, 69, 175, + 229, 277, 175, 34, 42, 46, 86, 119, 190, 255, + 256, 257, 175, 175, 69, 272, 322, 321, 69, 69, + 262, 261, 261, 262, 261, 175, 70, 146, 305, 41, + 9, 19, 60, 61, 79, 100, 109, 111, 127, 148, + 149, 187, 189, 197, 201, 202, 232, 233, 234, 235, + 236, 237, 238, 161, 327, 329, 330, 332, 205, 217, + 175, 4, 29, 114, 122, 141, 199, 203, 258, 216, + 44, 53, 62, 82, 85, 91, 116, 120, 121, 124, + 125, 126, 128, 129, 130, 132, 162, 197, 263, 262, + 262, 262, 30, 303, 229, 69, 69, 69, 191, 175, + 217, 205, 221, 330, 220, 322, 69, 57, 219, 228, + 209, 331, 217, 210, 333, 334, 322, 217, 221, 334, + 205, 322, 220, 211, 212, 213, 214, 215, 335, 336, + 337, 221, 336, 205, 217, 205, 322 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { - 0, 221, 222, 223, 223, 223, 224, 224, 224, 224, - 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, - 224, 225, 226, 226, 226, 226, 226, 227, 227, 228, - 229, 229, 230, 230, 231, 231, 231, 232, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 234, 234, 235, - 235, 235, 235, 235, 235, 236, 237, 238, 239, 239, - 240, 240, 240, 240, 241, 241, 241, 241, 241, 241, - 241, 241, 241, 242, 242, 243, 243, 244, 244, 244, - 244, 244, 245, 246, 246, 247, 247, 247, 247, 248, - 248, 248, 248, 248, 248, 248, 248, 248, 249, 249, - 250, 250, 250, 251, 251, 252, 252, 252, 252, 252, - 252, 252, 252, 253, 253, 254, 254, 254, 254, 255, - 255, 256, 256, 257, 257, 257, 257, 257, 257, 257, - 258, 258, 258, 258, 258, 258, 258, 258, 259, 259, - 260, 260, 260, 261, 261, 261, 261, 261, 261, 261, - 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, - 262, 262, 263, 264, 264, 264, 265, 265, 266, 267, - 267, 267, 267, 267, 267, 267, 267, 268, 269, 269, - 270, 270, 270, 270, 270, 271, 271, 271, 272, 272, - 272, 272, 273, 274, 274, 275, 276, 276, 277, 278, - 278, 279, 280, 280, 280, 281, 281, 282, 282, 283, - 283, 284, 284, 284, 284, 284, 284, 285, 285, 285, - 285, 285, 285, 286, 287, 287, 288, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 291, 291, 291, 292, 292, 293, 293, - 293, 294, 295, 295, 295, 296, 296, 296, 297, 297, - 298, 299, 299, 300, 301, 301, 302, 302, 303, 303, - 304, 304, 305, 306, 306, 307, 307, 308, 308, 308, - 308, 309, 309, 309, 310, 311, 311, 312, 312, 312, - 312, 312, 312, 312, 313, 313, 314, 314, 315, 315, - 316, 317, 317, 318, 318, 319, 319, 319, 320, 320, - 321, 322, 323, 324, 324, 325, 326, 326, 327, 327, - 328, 329, 330, 331, 331, 332, 333, 333, 334, 335, - 335, 335, 335, 335 + 0, 222, 223, 224, 224, 224, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 226, 227, 227, 227, 227, 227, 228, 228, 229, + 230, 230, 231, 231, 232, 232, 232, 233, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 235, 235, 236, + 236, 236, 236, 236, 236, 237, 238, 239, 240, 240, + 241, 241, 241, 241, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 243, 243, 244, 244, 245, 245, 245, + 245, 245, 246, 247, 247, 248, 248, 248, 248, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 250, 250, + 251, 251, 251, 252, 252, 253, 253, 253, 253, 253, + 253, 253, 253, 254, 254, 255, 255, 255, 255, 256, + 256, 257, 257, 258, 258, 258, 258, 258, 258, 258, + 259, 259, 259, 259, 259, 259, 259, 259, 259, 260, + 260, 261, 261, 262, 262, 262, 263, 263, 263, 263, + 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, + 263, 263, 263, 264, 264, 265, 266, 266, 266, 267, + 267, 268, 269, 269, 269, 269, 269, 269, 269, 269, + 270, 271, 271, 272, 272, 272, 272, 272, 273, 273, + 273, 274, 274, 274, 274, 275, 276, 276, 277, 278, + 278, 279, 280, 280, 281, 282, 282, 282, 283, 283, + 284, 284, 285, 285, 286, 286, 286, 286, 286, 286, + 287, 287, 287, 287, 287, 287, 288, 289, 289, 290, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 293, 293, 293, 294, + 294, 295, 295, 295, 296, 297, 297, 297, 298, 298, + 298, 299, 299, 300, 301, 301, 302, 303, 303, 304, + 304, 305, 305, 306, 306, 307, 308, 308, 309, 309, + 310, 310, 310, 310, 311, 311, 311, 312, 313, 313, + 314, 314, 314, 314, 314, 314, 314, 315, 315, 316, + 316, 317, 317, 318, 319, 319, 320, 320, 321, 321, + 321, 322, 322, 323, 324, 325, 326, 326, 327, 328, + 328, 329, 329, 330, 331, 332, 333, 333, 334, 335, + 335, 336, 337, 337, 337, 337, 337 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 1, 3, 2, 2, 0, 1, 1, 1, @@ -1932,28 +1920,28 @@ static const yytype_int8 yyr2[] = 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, 3, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 5, 4, 5, 5, 4, 3, 3, 0, + 2, 0, 2, 0, 2, 3, 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, 1, 3, 2, 1, 2, 1, 1, 2, 2, - 1, 2, 1, 1, 1, 2, 2, 2, 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, 1, 3, 2, 1, 2, 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, 1, 2, 2, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, - 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 2, 0, 0, 2, - 4, 1, 1, 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 + 1, 1, 2, 2, 2, 2, 3, 3, 1, 2, + 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, + 0, 0, 2, 4, 1, 1, 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 }; @@ -1965,6 +1953,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -2005,10 +1994,7 @@ do { \ YYFPRINTF Args; \ } while (0) -/* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif + # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -2035,10 +2021,6 @@ yy_symbol_value_print (FILE *yyo, YY_USE (yyoutput); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END @@ -2223,6 +2205,7 @@ yyparse (void) YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; @@ -2248,7 +2231,7 @@ yysetstate: if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -2276,7 +2259,7 @@ yysetstate: # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -2287,7 +2270,7 @@ yysetstate: YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -2309,6 +2292,7 @@ yysetstate: } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -2421,7 +2405,7 @@ yyreduce: switch (yyn) { case 5: /* command_list: error T_EOC */ -#line 404 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 406 "../../ntpd/ntp_parser.y" { /* I will need to incorporate much more fine grained * error messages. The following should suffice for @@ -2434,85 +2418,85 @@ yyreduce: ip_ctx->errpos.nline, ip_ctx->errpos.ncol); } -#line 2438 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2422 "ntp_parser.c" break; case 21: /* server_command: client_type address option_list */ -#line 441 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 443 "../../ntpd/ntp_parser.y" { 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 2449 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2433 "ntp_parser.c" break; case 28: /* address: address_fam T_String */ -#line 460 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 462 "../../ntpd/ntp_parser.y" { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); } -#line 2455 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2439 "ntp_parser.c" break; case 29: /* ip_address: T_String */ -#line 465 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 467 "../../ntpd/ntp_parser.y" { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); } -#line 2461 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2445 "ntp_parser.c" break; case 30: /* address_fam: T_Ipv4_flag */ -#line 470 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 472 "../../ntpd/ntp_parser.y" { (yyval.Integer) = AF_INET; } -#line 2467 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2451 "ntp_parser.c" break; case 31: /* address_fam: T_Ipv6_flag */ -#line 472 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 474 "../../ntpd/ntp_parser.y" { (yyval.Integer) = AF_INET6; } -#line 2473 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2457 "ntp_parser.c" break; case 32: /* option_list: %empty */ -#line 477 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 479 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; } -#line 2479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2463 "ntp_parser.c" break; case 33: /* option_list: option_list option */ -#line 479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 481 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2488 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2472 "ntp_parser.c" break; case 37: /* option_flag: option_flag_keyword */ -#line 493 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 495 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } -#line 2494 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2478 "ntp_parser.c" break; case 47: /* option_int: option_int_keyword T_Integer */ -#line 510 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 512 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2500 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2484 "ntp_parser.c" break; case 48: /* option_int: option_int_keyword T_U_int */ -#line 512 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 514 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2506 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2490 "ntp_parser.c" break; case 55: /* option_str: option_str_keyword T_String */ -#line 526 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 528 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 2512 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2496 "ntp_parser.c" break; case 57: /* unpeer_command: unpeer_keyword address */ -#line 540 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 542 "../../ntpd/ntp_parser.y" { unpeer_node *my_node; @@ -2520,85 +2504,85 @@ yyreduce: if (my_node) APPEND_G_FIFO(cfgt.unpeers, my_node); } -#line 2524 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2508 "ntp_parser.c" break; case 60: /* other_mode_command: T_Broadcastclient */ -#line 561 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 563 "../../ntpd/ntp_parser.y" { cfgt.broadcastclient = 1; } -#line 2530 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2514 "ntp_parser.c" break; case 61: /* other_mode_command: T_Manycastserver address_list */ -#line 563 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 565 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); } -#line 2536 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2520 "ntp_parser.c" break; case 62: /* other_mode_command: T_Multicastclient address_list */ -#line 565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 567 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); } -#line 2542 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2526 "ntp_parser.c" break; case 63: /* other_mode_command: T_Mdnstries T_Integer */ -#line 567 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 569 "../../ntpd/ntp_parser.y" { cfgt.mdnstries = (yyvsp[0].Integer); } -#line 2548 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2532 "ntp_parser.c" break; case 64: /* authentication_command: T_Automax T_Integer */ -#line 578 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 580 "../../ntpd/ntp_parser.y" { attr_val *atrv; atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); APPEND_G_FIFO(cfgt.vars, atrv); } -#line 2559 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2543 "ntp_parser.c" break; case 65: /* authentication_command: T_ControlKey T_Integer */ -#line 585 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 587 "../../ntpd/ntp_parser.y" { cfgt.auth.control_key = (yyvsp[0].Integer); } -#line 2565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2549 "ntp_parser.c" break; case 66: /* authentication_command: T_Crypto crypto_command_list */ -#line 587 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 589 "../../ntpd/ntp_parser.y" { cfgt.auth.cryptosw++; CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo)); } -#line 2574 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2558 "ntp_parser.c" break; case 67: /* authentication_command: T_Keys T_String */ -#line 592 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 594 "../../ntpd/ntp_parser.y" { cfgt.auth.keys = (yyvsp[0].String); } -#line 2580 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2564 "ntp_parser.c" break; case 68: /* authentication_command: T_Keysdir T_String */ -#line 594 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 596 "../../ntpd/ntp_parser.y" { cfgt.auth.keysdir = (yyvsp[0].String); } -#line 2586 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2570 "ntp_parser.c" break; case 69: /* authentication_command: T_Requestkey T_Integer */ -#line 596 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 598 "../../ntpd/ntp_parser.y" { cfgt.auth.request_key = (yyvsp[0].Integer); } -#line 2592 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2576 "ntp_parser.c" break; case 70: /* authentication_command: T_Revoke T_Integer */ -#line 598 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 600 "../../ntpd/ntp_parser.y" { cfgt.auth.revoke = (yyvsp[0].Integer); } -#line 2598 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2582 "ntp_parser.c" break; case 71: /* authentication_command: T_Trustedkey integer_list_range */ -#line 600 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 602 "../../ntpd/ntp_parser.y" { /* [Bug 948] leaves it open if appending or * replacing the trusted key list is the right @@ -2608,38 +2592,38 @@ yyreduce: DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */ CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo)); } -#line 2612 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2596 "ntp_parser.c" break; case 72: /* authentication_command: T_NtpSignDsocket T_String */ -#line 610 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 612 "../../ntpd/ntp_parser.y" { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); } -#line 2618 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2602 "ntp_parser.c" break; case 73: /* crypto_command_list: %empty */ -#line 615 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 617 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; } -#line 2624 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2608 "ntp_parser.c" break; case 74: /* crypto_command_list: crypto_command_list crypto_command */ -#line 617 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 619 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2633 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2617 "ntp_parser.c" break; case 75: /* crypto_command: crypto_str_keyword T_String */ -#line 625 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 627 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 2639 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2623 "ntp_parser.c" break; case 76: /* crypto_command: T_Revoke T_Integer */ -#line 627 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 629 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = NULL; cfgt.auth.revoke = (yyvsp[0].Integer); @@ -2648,65 +2632,65 @@ yyreduce: "please use 'revoke %d' instead.", cfgt.auth.revoke, cfgt.auth.revoke); } -#line 2652 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2636 "ntp_parser.c" break; case 82: /* orphan_mode_command: T_Tos tos_option_list */ -#line 652 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 654 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); } -#line 2658 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2642 "ntp_parser.c" break; case 83: /* tos_option_list: tos_option_list tos_option */ -#line 657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 659 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2667 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2651 "ntp_parser.c" break; case 84: /* tos_option_list: tos_option */ -#line 662 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 664 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2660 "ntp_parser.c" break; case 85: /* tos_option: tos_option_int_keyword T_Integer */ -#line 670 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 672 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); } -#line 2682 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2666 "ntp_parser.c" break; case 86: /* tos_option: tos_option_dbl_keyword number */ -#line 672 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 674 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } -#line 2688 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2672 "ntp_parser.c" break; case 87: /* tos_option: T_Cohort boolean */ -#line 674 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 676 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); } -#line 2694 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2678 "ntp_parser.c" break; case 88: /* tos_option: basedate */ -#line 676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 678 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); } -#line 2700 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2684 "ntp_parser.c" break; case 100: /* monitoring_command: T_Statistics stats_list */ -#line 703 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 705 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); } -#line 2706 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2690 "ntp_parser.c" break; case 101: /* monitoring_command: T_Statsdir T_String */ -#line 705 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 707 "../../ntpd/ntp_parser.y" { if (lex_from_file()) { cfgt.stats_dir = (yyvsp[0].String); @@ -2715,55 +2699,55 @@ yyreduce: yyerror("statsdir remote configuration ignored"); } } -#line 2719 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2703 "ntp_parser.c" break; case 102: /* monitoring_command: T_Filegen stat filegen_option_list */ -#line 714 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 716 "../../ntpd/ntp_parser.y" { filegen_node *fgn; fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo)); APPEND_G_FIFO(cfgt.filegen_opts, fgn); } -#line 2730 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2714 "ntp_parser.c" break; case 103: /* stats_list: stats_list stat */ -#line 724 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 726 "../../ntpd/ntp_parser.y" { (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 2739 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2723 "ntp_parser.c" break; case 104: /* stats_list: stat */ -#line 729 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 731 "../../ntpd/ntp_parser.y" { (yyval.Int_fifo) = NULL; APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 2748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2732 "ntp_parser.c" break; case 113: /* filegen_option_list: %empty */ -#line 748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 750 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; } -#line 2754 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2738 "ntp_parser.c" break; case 114: /* filegen_option_list: filegen_option_list filegen_option */ -#line 750 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 752 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2763 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2747 "ntp_parser.c" break; case 115: /* filegen_option: T_File T_String */ -#line 758 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 760 "../../ntpd/ntp_parser.y" { if (lex_from_file()) { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); @@ -2773,11 +2757,11 @@ yyreduce: yyerror("filegen file remote config ignored"); } } -#line 2777 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2761 "ntp_parser.c" break; case 116: /* filegen_option: T_Type filegen_type */ -#line 768 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 770 "../../ntpd/ntp_parser.y" { if (lex_from_file()) { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); @@ -2786,11 +2770,11 @@ yyreduce: yyerror("filegen type remote config ignored"); } } -#line 2790 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2774 "ntp_parser.c" break; case 117: /* filegen_option: link_nolink */ -#line 777 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 779 "../../ntpd/ntp_parser.y" { const char *err; @@ -2805,69 +2789,59 @@ yyreduce: yyerror(err); } } -#line 2809 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2793 "ntp_parser.c" break; case 118: /* filegen_option: enable_disable */ -#line 792 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 794 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } -#line 2815 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2799 "ntp_parser.c" break; case 130: /* access_control_command: T_Discard discard_option_list */ -#line 822 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 824 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo)); } -#line 2823 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2807 "ntp_parser.c" break; case 131: /* access_control_command: T_Mru mru_option_list */ -#line 826 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 828 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo)); } -#line 2831 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" - break; - - case 132: /* access_control_command: T_Restrict address res_ippeerlimit ac_flag_list */ -#line 830 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" - { - restrict_node *rn; - - rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), - lex_current()->curpos.nline); - APPEND_G_FIFO(cfgt.restrict_opts, rn); - } -#line 2843 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2815 "ntp_parser.c" break; - case 133: /* access_control_command: T_Restrict address T_Mask ip_address res_ippeerlimit ac_flag_list */ -#line 838 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 132: /* access_control_command: T_Restrict address restrict_mask res_ippeerlimit ac_flag_list */ +#line 832 "../../ntpd/ntp_parser.y" { restrict_node *rn; - rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), - lex_current()->curpos.nline); + rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2855 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2828 "ntp_parser.c" break; - case 134: /* access_control_command: T_Restrict T_Default res_ippeerlimit ac_flag_list */ -#line 846 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 133: /* access_control_command: T_Restrict T_Default res_ippeerlimit ac_flag_list */ +#line 841 "../../ntpd/ntp_parser.y" { restrict_node *rn; - rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), - lex_current()->curpos.nline); + rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2867 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2841 "ntp_parser.c" break; - case 135: /* access_control_command: T_Restrict T_Ipv4_flag T_Default res_ippeerlimit ac_flag_list */ -#line 854 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 134: /* access_control_command: T_Restrict T_Ipv4_flag T_Default res_ippeerlimit ac_flag_list */ +#line 850 "../../ntpd/ntp_parser.y" { restrict_node *rn; @@ -2878,15 +2852,16 @@ yyreduce: create_address_node( estrdup("0.0.0.0"), AF_INET), - (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), - lex_current()->curpos.nline); + (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2886 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2861 "ntp_parser.c" break; - case 136: /* access_control_command: T_Restrict T_Ipv6_flag T_Default res_ippeerlimit ac_flag_list */ -#line 869 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 135: /* access_control_command: T_Restrict T_Ipv6_flag T_Default res_ippeerlimit ac_flag_list */ +#line 866 "../../ntpd/ntp_parser.y" { restrict_node *rn; @@ -2897,34 +2872,79 @@ yyreduce: create_address_node( estrdup("::"), AF_INET6), - (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), - lex_current()->curpos.nline); + (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2905 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2881 "ntp_parser.c" break; - case 137: /* access_control_command: T_Restrict T_Source res_ippeerlimit ac_flag_list */ -#line 884 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 136: /* access_control_command: T_Restrict T_Source res_ippeerlimit ac_flag_list */ +#line 882 "../../ntpd/ntp_parser.y" { restrict_node * rn; APPEND_G_FIFO((yyvsp[0].Attr_val_fifo), create_attr_ival((yyvsp[-2].Integer), 1)); - rn = create_restrict_node( - NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), lex_current()->curpos.nline); + rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2918 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2895 "ntp_parser.c" break; - case 138: /* res_ippeerlimit: %empty */ -#line 896 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 137: /* access_control_command: T_Delrestrict ip_address restrict_mask */ +#line 892 "../../ntpd/ntp_parser.y" + { + restrict_node * rn; + + rn = create_restrict_node((yyvsp[-1].Address_node), (yyvsp[0].Address_node), -1, NULL, TRUE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); + APPEND_G_FIFO(cfgt.restrict_opts, rn); + } +#line 2908 "ntp_parser.c" + break; + + case 138: /* access_control_command: T_Delrestrict T_Source ip_address */ +#line 901 "../../ntpd/ntp_parser.y" + { + restrict_node * rn; + attr_val_fifo * avf; + + avf = NULL; + APPEND_G_FIFO(avf, create_attr_ival((yyvsp[-1].Integer), 1)); + rn = create_restrict_node((yyvsp[0].Address_node), NULL, -1, avf, TRUE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); + APPEND_G_FIFO(cfgt.restrict_opts, rn); + } +#line 2924 "ntp_parser.c" + break; + + case 139: /* restrict_mask: %empty */ +#line 916 "../../ntpd/ntp_parser.y" + { (yyval.Address_node) = NULL; } +#line 2930 "ntp_parser.c" + break; + + case 140: /* restrict_mask: T_Mask ip_address */ +#line 918 "../../ntpd/ntp_parser.y" + { + (yyval.Address_node) = (yyvsp[0].Address_node); + } +#line 2938 "ntp_parser.c" + break; + + case 141: /* res_ippeerlimit: %empty */ +#line 925 "../../ntpd/ntp_parser.y" { (yyval.Integer) = -1; } -#line 2924 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2944 "ntp_parser.c" break; - case 139: /* res_ippeerlimit: T_Ippeerlimit T_Integer */ -#line 898 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 142: /* res_ippeerlimit: T_Ippeerlimit T_Integer */ +#line 927 "../../ntpd/ntp_parser.y" { if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) { struct FILE_INFO * ip_ctx; @@ -2934,23 +2954,23 @@ yyreduce: "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); + ip_ctx->curpos.nline, + ip_ctx->curpos.ncol); (yyvsp[0].Integer) = 0; } (yyval.Integer) = (yyvsp[0].Integer); } -#line 2944 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2964 "ntp_parser.c" break; - case 140: /* ac_flag_list: %empty */ -#line 917 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 143: /* ac_flag_list: %empty */ +#line 946 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; } -#line 2950 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2970 "ntp_parser.c" break; - case 141: /* ac_flag_list: ac_flag_list access_control_flag */ -#line 919 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 144: /* ac_flag_list: ac_flag_list access_control_flag */ +#line 948 "../../ntpd/ntp_parser.y" { attr_val *av; @@ -2958,11 +2978,11 @@ yyreduce: av = create_attr_ival((yyvsp[0].Integer), 1); APPEND_G_FIFO((yyval.Attr_val_fifo), av); } -#line 2962 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2982 "ntp_parser.c" break; - case 142: /* ac_flag_list: ac_flag_list T_Serverresponse T_Fuzz */ -#line 927 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 145: /* ac_flag_list: ac_flag_list T_Serverresponse T_Fuzz */ +#line 956 "../../ntpd/ntp_parser.y" { attr_val *av; @@ -2970,100 +2990,100 @@ yyreduce: av = create_attr_ival(T_ServerresponseFuzz, 1); APPEND_G_FIFO((yyval.Attr_val_fifo), av); } -#line 2974 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 2994 "ntp_parser.c" break; - case 160: /* discard_option_list: discard_option_list discard_option */ -#line 958 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 163: /* discard_option_list: discard_option_list discard_option */ +#line 987 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2983 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3003 "ntp_parser.c" break; - case 161: /* discard_option_list: discard_option */ -#line 963 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 164: /* discard_option_list: discard_option */ +#line 992 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2992 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3012 "ntp_parser.c" break; - case 162: /* discard_option: discard_option_keyword T_Integer */ -#line 971 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 165: /* discard_option: discard_option_keyword T_Integer */ +#line 1000 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2998 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3018 "ntp_parser.c" break; - case 166: /* mru_option_list: mru_option_list mru_option */ -#line 982 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 169: /* mru_option_list: mru_option_list mru_option */ +#line 1011 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3007 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3027 "ntp_parser.c" break; - case 167: /* mru_option_list: mru_option */ -#line 987 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 170: /* mru_option_list: mru_option */ +#line 1016 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3016 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3036 "ntp_parser.c" break; - case 168: /* mru_option: mru_option_keyword T_Integer */ -#line 995 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 171: /* mru_option: mru_option_keyword T_Integer */ +#line 1024 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 3022 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3042 "ntp_parser.c" break; - case 177: /* fudge_command: T_Fudge address fudge_factor_list */ -#line 1015 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 180: /* fudge_command: T_Fudge address fudge_factor_list */ +#line 1044 "../../ntpd/ntp_parser.y" { 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 3033 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3053 "ntp_parser.c" break; - case 178: /* fudge_factor_list: fudge_factor_list fudge_factor */ -#line 1025 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 181: /* fudge_factor_list: fudge_factor_list fudge_factor */ +#line 1054 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3042 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3062 "ntp_parser.c" break; - case 179: /* fudge_factor_list: fudge_factor */ -#line 1030 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 182: /* fudge_factor_list: fudge_factor */ +#line 1059 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3051 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3071 "ntp_parser.c" break; - case 180: /* fudge_factor: fudge_factor_dbl_keyword number */ -#line 1038 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 183: /* fudge_factor: fudge_factor_dbl_keyword number */ +#line 1067 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } -#line 3057 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3077 "ntp_parser.c" break; - case 181: /* fudge_factor: fudge_factor_bool_keyword boolean */ -#line 1040 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 184: /* fudge_factor: fudge_factor_bool_keyword boolean */ +#line 1069 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 3063 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3083 "ntp_parser.c" break; - case 182: /* fudge_factor: T_Stratum T_Integer */ -#line 1042 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 185: /* fudge_factor: T_Stratum T_Integer */ +#line 1071 "../../ntpd/ntp_parser.y" { if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); @@ -3072,124 +3092,124 @@ yyreduce: yyerror("fudge factor: stratum value not in [0..16], ignored"); } } -#line 3076 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3096 "ntp_parser.c" break; - case 183: /* fudge_factor: T_Abbrev T_String */ -#line 1051 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 186: /* fudge_factor: T_Abbrev T_String */ +#line 1080 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 3082 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3102 "ntp_parser.c" break; - case 184: /* fudge_factor: T_Refid T_String */ -#line 1053 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 187: /* fudge_factor: T_Refid T_String */ +#line 1082 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 3088 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3108 "ntp_parser.c" break; - case 192: /* device_command: T_Device address device_item_list */ -#line 1075 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 195: /* device_command: T_Device address device_item_list */ +#line 1104 "../../ntpd/ntp_parser.y" { addr_opts_node *aon; aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo)); APPEND_G_FIFO(cfgt.device, aon); } -#line 3099 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3119 "ntp_parser.c" break; - case 193: /* device_item_list: device_item_list device_item */ -#line 1085 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 196: /* device_item_list: device_item_list device_item */ +#line 1114 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3108 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3128 "ntp_parser.c" break; - case 194: /* device_item_list: device_item */ -#line 1090 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 197: /* device_item_list: device_item */ +#line 1119 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3117 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3137 "ntp_parser.c" break; - case 195: /* device_item: device_item_path_keyword T_String */ -#line 1098 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 198: /* device_item: device_item_path_keyword T_String */ +#line 1127 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 3123 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3143 "ntp_parser.c" break; - case 198: /* rlimit_command: T_Rlimit rlimit_option_list */ -#line 1112 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 201: /* rlimit_command: T_Rlimit rlimit_option_list */ +#line 1141 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); } -#line 3129 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3149 "ntp_parser.c" break; - case 199: /* rlimit_option_list: rlimit_option_list rlimit_option */ -#line 1117 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 202: /* rlimit_option_list: rlimit_option_list rlimit_option */ +#line 1146 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3138 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3158 "ntp_parser.c" break; - case 200: /* rlimit_option_list: rlimit_option */ -#line 1122 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 203: /* rlimit_option_list: rlimit_option */ +#line 1151 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3147 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3167 "ntp_parser.c" break; - case 201: /* rlimit_option: rlimit_option_keyword T_Integer */ -#line 1130 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 204: /* rlimit_option: rlimit_option_keyword T_Integer */ +#line 1159 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 3153 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3173 "ntp_parser.c" break; - case 205: /* system_option_command: T_Enable system_option_list */ -#line 1146 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 208: /* system_option_command: T_Enable system_option_list */ +#line 1175 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); } -#line 3159 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3179 "ntp_parser.c" break; - case 206: /* system_option_command: T_Disable system_option_list */ -#line 1148 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 209: /* system_option_command: T_Disable system_option_list */ +#line 1177 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); } -#line 3165 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3185 "ntp_parser.c" break; - case 207: /* system_option_list: system_option_list system_option */ -#line 1153 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 210: /* system_option_list: system_option_list system_option */ +#line 1182 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3174 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3194 "ntp_parser.c" break; - case 208: /* system_option_list: system_option */ -#line 1158 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 211: /* system_option_list: system_option */ +#line 1187 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3183 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3203 "ntp_parser.c" break; - case 209: /* system_option: system_option_flag_keyword */ -#line 1166 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 212: /* system_option: system_option_flag_keyword */ +#line 1195 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } -#line 3189 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3209 "ntp_parser.c" break; - case 210: /* system_option: system_option_local_flag_keyword */ -#line 1168 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 213: /* system_option: system_option_local_flag_keyword */ +#line 1197 "../../ntpd/ntp_parser.y" { if (lex_from_file()) { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); @@ -3203,74 +3223,74 @@ yyreduce: yyerror(err_str); } } -#line 3207 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3227 "ntp_parser.c" break; - case 223: /* tinker_command: T_Tinker tinker_option_list */ -#line 1207 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 226: /* tinker_command: T_Tinker tinker_option_list */ +#line 1236 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); } -#line 3213 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3233 "ntp_parser.c" break; - case 224: /* tinker_option_list: tinker_option_list tinker_option */ -#line 1212 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 227: /* tinker_option_list: tinker_option_list tinker_option */ +#line 1241 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3222 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3242 "ntp_parser.c" break; - case 225: /* tinker_option_list: tinker_option */ -#line 1217 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 228: /* tinker_option_list: tinker_option */ +#line 1246 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3231 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3251 "ntp_parser.c" break; - case 226: /* tinker_option: tinker_option_keyword number */ -#line 1225 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 229: /* tinker_option: tinker_option_keyword number */ +#line 1254 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } -#line 3237 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3257 "ntp_parser.c" break; - case 239: /* miscellaneous_command: misc_cmd_dbl_keyword number */ -#line 1250 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 242: /* miscellaneous_command: misc_cmd_dbl_keyword number */ +#line 1279 "../../ntpd/ntp_parser.y" { attr_val *av; av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); APPEND_G_FIFO(cfgt.vars, av); } -#line 3248 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3268 "ntp_parser.c" break; - case 240: /* miscellaneous_command: misc_cmd_int_keyword T_Integer */ -#line 1257 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 243: /* miscellaneous_command: misc_cmd_int_keyword T_Integer */ +#line 1286 "../../ntpd/ntp_parser.y" { attr_val *av; av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); APPEND_G_FIFO(cfgt.vars, av); } -#line 3259 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3279 "ntp_parser.c" break; - case 241: /* miscellaneous_command: misc_cmd_str_keyword T_String */ -#line 1264 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 244: /* miscellaneous_command: misc_cmd_str_keyword T_String */ +#line 1293 "../../ntpd/ntp_parser.y" { attr_val *av; av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); APPEND_G_FIFO(cfgt.vars, av); } -#line 3270 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3290 "ntp_parser.c" break; - case 242: /* miscellaneous_command: misc_cmd_str_lcl_keyword T_String */ -#line 1271 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 245: /* miscellaneous_command: misc_cmd_str_lcl_keyword T_String */ +#line 1300 "../../ntpd/ntp_parser.y" { char error_text[64]; attr_val *av; @@ -3286,11 +3306,11 @@ yyreduce: yyerror(error_text); } } -#line 3290 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3310 "ntp_parser.c" break; - case 243: /* miscellaneous_command: T_Includefile T_String command */ -#line 1287 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 246: /* miscellaneous_command: T_Includefile T_String command */ +#line 1316 "../../ntpd/ntp_parser.y" { if (!lex_from_file()) { YYFREE((yyvsp[-1].String)); /* avoid leak */ @@ -3309,11 +3329,11 @@ yyreduce: } YYFREE((yyvsp[-1].String)); /* avoid leak */ } -#line 3313 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3333 "ntp_parser.c" break; - case 244: /* miscellaneous_command: T_Leapfile T_String opt_hash_check */ -#line 1306 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 247: /* miscellaneous_command: T_Leapfile T_String opt_hash_check */ +#line 1335 "../../ntpd/ntp_parser.y" { attr_val *av; @@ -3321,92 +3341,92 @@ yyreduce: av->flag = (yyvsp[0].Integer); APPEND_G_FIFO(cfgt.vars, av); } -#line 3325 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3345 "ntp_parser.c" break; - case 245: /* miscellaneous_command: T_End */ -#line 1314 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 248: /* miscellaneous_command: T_End */ +#line 1343 "../../ntpd/ntp_parser.y" { lex_flush_stack(); } -#line 3331 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3351 "ntp_parser.c" break; - case 246: /* miscellaneous_command: T_Driftfile drift_parm */ -#line 1316 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 249: /* miscellaneous_command: T_Driftfile drift_parm */ +#line 1345 "../../ntpd/ntp_parser.y" { /* see drift_parm below for actions */ } -#line 3337 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3357 "ntp_parser.c" break; - case 247: /* miscellaneous_command: T_Logconfig log_config_list */ -#line 1318 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 250: /* miscellaneous_command: T_Logconfig log_config_list */ +#line 1347 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); } -#line 3343 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3363 "ntp_parser.c" break; - case 248: /* miscellaneous_command: T_Phone string_list */ -#line 1320 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 251: /* miscellaneous_command: T_Phone string_list */ +#line 1349 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); } -#line 3349 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3369 "ntp_parser.c" break; - case 249: /* miscellaneous_command: T_PollSkewList pollskew_list */ -#line 1322 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 252: /* miscellaneous_command: T_PollSkewList pollskew_list */ +#line 1351 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.pollskewlist, (yyvsp[0].Attr_val_fifo)); } -#line 3355 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3375 "ntp_parser.c" break; - case 250: /* miscellaneous_command: T_Setvar variable_assign */ -#line 1324 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 253: /* miscellaneous_command: T_Setvar variable_assign */ +#line 1353 "../../ntpd/ntp_parser.y" { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); } -#line 3361 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3381 "ntp_parser.c" break; - case 251: /* miscellaneous_command: T_Trap ip_address trap_option_list */ -#line 1326 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 254: /* miscellaneous_command: T_Trap ip_address trap_option_list */ +#line 1355 "../../ntpd/ntp_parser.y" { 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 3372 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3392 "ntp_parser.c" break; - case 252: /* miscellaneous_command: T_Ttl integer_list */ -#line 1333 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 255: /* miscellaneous_command: T_Ttl integer_list */ +#line 1362 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); } -#line 3378 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3398 "ntp_parser.c" break; - case 257: /* misc_cmd_int_keyword: T_Leapsmearinterval */ -#line 1348 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 260: /* misc_cmd_int_keyword: T_Leapsmearinterval */ +#line 1377 "../../ntpd/ntp_parser.y" { #ifndef LEAP_SMEAR yyerror("Built without LEAP_SMEAR support."); #endif } -#line 3388 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3408 "ntp_parser.c" break; - case 258: /* opt_hash_check: T_Ignorehash */ -#line 1357 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 261: /* opt_hash_check: T_Ignorehash */ +#line 1386 "../../ntpd/ntp_parser.y" { (yyval.Integer) = FALSE; } -#line 3394 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3414 "ntp_parser.c" break; - case 259: /* opt_hash_check: T_Checkhash */ -#line 1359 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 262: /* opt_hash_check: T_Checkhash */ +#line 1388 "../../ntpd/ntp_parser.y" { (yyval.Integer) = TRUE; } -#line 3400 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3420 "ntp_parser.c" break; - case 260: /* opt_hash_check: %empty */ -#line 1361 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 263: /* opt_hash_check: %empty */ +#line 1390 "../../ntpd/ntp_parser.y" { (yyval.Integer) = TRUE; } -#line 3406 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3426 "ntp_parser.c" break; - case 265: /* drift_parm: T_String */ -#line 1376 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 268: /* drift_parm: T_String */ +#line 1405 "../../ntpd/ntp_parser.y" { if (lex_from_file()) { attr_val *av; @@ -3417,11 +3437,11 @@ yyreduce: yyerror("driftfile remote configuration ignored"); } } -#line 3421 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3441 "ntp_parser.c" break; - case 266: /* drift_parm: T_String T_Double */ -#line 1387 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 269: /* drift_parm: T_String T_Double */ +#line 1416 "../../ntpd/ntp_parser.y" { if (lex_from_file()) { attr_val *av; @@ -3438,11 +3458,11 @@ yyreduce: yyerror("driftfile remote configuration ignored"); } } -#line 3442 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3462 "ntp_parser.c" break; - case 267: /* drift_parm: %empty */ -#line 1404 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 270: /* drift_parm: %empty */ +#line 1433 "../../ntpd/ntp_parser.y" { if (lex_from_file()) { attr_val *av; @@ -3452,23 +3472,23 @@ yyreduce: yyerror("driftfile remote configuration ignored"); } } -#line 3456 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3476 "ntp_parser.c" break; - case 268: /* pollskew_list: %empty */ -#line 1417 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 271: /* pollskew_list: %empty */ +#line 1446 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; } -#line 3462 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3482 "ntp_parser.c" break; - case 269: /* pollskew_list: pollskew_list pollskew_spec */ -#line 1419 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 272: /* pollskew_list: pollskew_list pollskew_spec */ +#line 1448 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = append_gen_fifo((yyvsp[-1].Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3468 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3488 "ntp_parser.c" break; - case 270: /* pollskew_spec: pollskew_cycle T_Integer '|' T_Integer */ -#line 1424 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 273: /* pollskew_spec: pollskew_cycle T_Integer '|' T_Integer */ +#line 1453 "../../ntpd/ntp_parser.y" { if ((yyvsp[-2].Integer) < 0 || (yyvsp[0].Integer) < 0) { /* bad numbers */ @@ -3491,83 +3511,87 @@ yyreduce: } (yyval.Attr_val) = (yyvsp[-3].Attr_val); } -#line 3495 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3515 "ntp_parser.c" break; - case 271: /* pollskew_cycle: T_Integer */ -#line 1449 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" - { (yyval.Attr_val) = ((yyvsp[0].Integer) >= 3 && (yyvsp[0].Integer) <= 17) ? create_attr_rval((yyvsp[0].Integer), 0, 0) : NULL; } -#line 3501 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" + case 274: /* pollskew_cycle: T_Integer */ +#line 1479 "../../ntpd/ntp_parser.y" + { + (yyval.Attr_val) = ((yyvsp[0].Integer) >= NTP_MINPOLL && (yyvsp[0].Integer) <= NTP_MAXPOLL) + ? create_attr_rval((yyvsp[0].Integer), 0, 0) + : NULL; + } +#line 3525 "ntp_parser.c" break; - case 272: /* pollskew_cycle: T_Default */ -#line 1450 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 275: /* pollskew_cycle: T_Default */ +#line 1484 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_rval(-1, 0, 0); } -#line 3507 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3531 "ntp_parser.c" break; - case 273: /* variable_assign: T_String '=' T_String t_default_or_zero */ -#line 1456 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 276: /* variable_assign: T_String '=' T_String t_default_or_zero */ +#line 1490 "../../ntpd/ntp_parser.y" { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); } -#line 3513 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3537 "ntp_parser.c" break; - case 275: /* t_default_or_zero: %empty */ -#line 1462 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 278: /* t_default_or_zero: %empty */ +#line 1496 "../../ntpd/ntp_parser.y" { (yyval.Integer) = 0; } -#line 3519 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3543 "ntp_parser.c" break; - case 276: /* trap_option_list: %empty */ -#line 1467 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 279: /* trap_option_list: %empty */ +#line 1501 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; } -#line 3525 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3549 "ntp_parser.c" break; - case 277: /* trap_option_list: trap_option_list trap_option */ -#line 1469 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 280: /* trap_option_list: trap_option_list trap_option */ +#line 1503 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3534 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3558 "ntp_parser.c" break; - case 278: /* trap_option: T_Port T_Integer */ -#line 1477 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 281: /* trap_option: T_Port T_Integer */ +#line 1511 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 3540 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3564 "ntp_parser.c" break; - case 279: /* trap_option: T_Interface ip_address */ -#line 1479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 282: /* trap_option: T_Interface ip_address */ +#line 1513 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address)); destroy_address_node((yyvsp[0].Address_node)); } -#line 3549 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3573 "ntp_parser.c" break; - case 280: /* log_config_list: log_config_list log_config_command */ -#line 1487 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 283: /* log_config_list: log_config_list log_config_command */ +#line 1521 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3558 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3582 "ntp_parser.c" break; - case 281: /* log_config_list: log_config_command */ -#line 1492 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 284: /* log_config_list: log_config_command */ +#line 1526 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3567 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3591 "ntp_parser.c" break; - case 282: /* log_config_command: T_String */ -#line 1500 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 285: /* log_config_command: T_String */ +#line 1534 "../../ntpd/ntp_parser.y" { char prefix; char * type; @@ -3589,141 +3613,141 @@ yyreduce: (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type)); YYFREE((yyvsp[0].String)); } -#line 3593 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3617 "ntp_parser.c" break; - case 283: /* interface_command: interface_nic nic_rule_action nic_rule_class */ -#line 1525 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 286: /* interface_command: interface_nic nic_rule_action nic_rule_class */ +#line 1559 "../../ntpd/ntp_parser.y" { nic_rule_node *nrn; nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer)); APPEND_G_FIFO(cfgt.nic_rules, nrn); } -#line 3604 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3628 "ntp_parser.c" break; - case 284: /* interface_command: interface_nic nic_rule_action T_String */ -#line 1532 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 287: /* interface_command: interface_nic nic_rule_action T_String */ +#line 1566 "../../ntpd/ntp_parser.y" { nic_rule_node *nrn; nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer)); APPEND_G_FIFO(cfgt.nic_rules, nrn); } -#line 3615 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3639 "ntp_parser.c" break; - case 294: /* reset_command: T_Reset counter_set_list */ -#line 1560 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 297: /* reset_command: T_Reset counter_set_list */ +#line 1594 "../../ntpd/ntp_parser.y" { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); } -#line 3621 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3645 "ntp_parser.c" break; - case 295: /* counter_set_list: counter_set_list counter_set_keyword */ -#line 1565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 298: /* counter_set_list: counter_set_list counter_set_keyword */ +#line 1599 "../../ntpd/ntp_parser.y" { (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3630 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3654 "ntp_parser.c" break; - case 296: /* counter_set_list: counter_set_keyword */ -#line 1570 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 299: /* counter_set_list: counter_set_keyword */ +#line 1604 "../../ntpd/ntp_parser.y" { (yyval.Int_fifo) = NULL; APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3639 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3663 "ntp_parser.c" break; - case 304: /* integer_list: integer_list T_Integer */ -#line 1594 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 307: /* integer_list: integer_list T_Integer */ +#line 1628 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3648 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3672 "ntp_parser.c" break; - case 305: /* integer_list: T_Integer */ -#line 1599 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 308: /* integer_list: T_Integer */ +#line 1633 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3681 "ntp_parser.c" break; - case 306: /* integer_list_range: integer_list_range integer_list_range_elt */ -#line 1607 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 309: /* integer_list_range: integer_list_range integer_list_range_elt */ +#line 1641 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3666 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3690 "ntp_parser.c" break; - case 307: /* integer_list_range: integer_list_range_elt */ -#line 1612 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 310: /* integer_list_range: integer_list_range_elt */ +#line 1646 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3675 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3699 "ntp_parser.c" break; - case 308: /* integer_list_range_elt: T_Integer */ -#line 1620 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 311: /* integer_list_range_elt: T_Integer */ +#line 1654 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); } -#line 3681 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3705 "ntp_parser.c" break; - case 310: /* integer_range: '(' T_Integer T_Ellipsis T_Integer ')' */ -#line 1626 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 313: /* integer_range: '(' T_Integer T_Ellipsis T_Integer ')' */ +#line 1660 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_rval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); } -#line 3687 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3711 "ntp_parser.c" break; - case 311: /* string_list: string_list T_String */ -#line 1631 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 314: /* string_list: string_list T_String */ +#line 1665 "../../ntpd/ntp_parser.y" { (yyval.String_fifo) = (yyvsp[-1].String_fifo); APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String))); } -#line 3696 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3720 "ntp_parser.c" break; - case 312: /* string_list: T_String */ -#line 1636 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 315: /* string_list: T_String */ +#line 1670 "../../ntpd/ntp_parser.y" { (yyval.String_fifo) = NULL; APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String))); } -#line 3705 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3729 "ntp_parser.c" break; - case 313: /* address_list: address_list address */ -#line 1644 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 316: /* address_list: address_list address */ +#line 1678 "../../ntpd/ntp_parser.y" { (yyval.Address_fifo) = (yyvsp[-1].Address_fifo); APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node)); } -#line 3714 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3738 "ntp_parser.c" break; - case 314: /* address_list: address */ -#line 1649 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 317: /* address_list: address */ +#line 1683 "../../ntpd/ntp_parser.y" { (yyval.Address_fifo) = NULL; APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node)); } -#line 3723 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3747 "ntp_parser.c" break; - case 315: /* boolean: T_Integer */ -#line 1657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 318: /* boolean: T_Integer */ +#line 1691 "../../ntpd/ntp_parser.y" { if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) { yyerror("Integer value is not boolean (0 or 1). Assuming 1"); @@ -3732,35 +3756,35 @@ yyreduce: (yyval.Integer) = (yyvsp[0].Integer); } } -#line 3736 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3760 "ntp_parser.c" break; - case 316: /* boolean: T_True */ -#line 1665 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 319: /* boolean: T_True */ +#line 1699 "../../ntpd/ntp_parser.y" { (yyval.Integer) = 1; } -#line 3742 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3766 "ntp_parser.c" break; - case 317: /* boolean: T_False */ -#line 1666 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 320: /* boolean: T_False */ +#line 1700 "../../ntpd/ntp_parser.y" { (yyval.Integer) = 0; } -#line 3748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3772 "ntp_parser.c" break; - case 318: /* number: T_Integer */ -#line 1670 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 321: /* number: T_Integer */ +#line 1704 "../../ntpd/ntp_parser.y" { (yyval.Double) = (double)(yyvsp[0].Integer); } -#line 3754 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3778 "ntp_parser.c" break; - case 320: /* basedate: T_Basedate T_String */ -#line 1676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 323: /* basedate: T_Basedate T_String */ +#line 1710 "../../ntpd/ntp_parser.y" { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); } -#line 3760 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3784 "ntp_parser.c" break; - case 321: /* simulate_command: sim_conf_start '{' sim_init_statement_list sim_server_list '}' */ -#line 1684 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 324: /* simulate_command: sim_conf_start '{' sim_init_statement_list sim_server_list '}' */ +#line 1718 "../../ntpd/ntp_parser.y" { sim_node *sn; @@ -3770,125 +3794,125 @@ yyreduce: /* Revert from ; to \n for end-of-command */ old_config_style = 1; } -#line 3774 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3798 "ntp_parser.c" break; - case 322: /* sim_conf_start: T_Simulate */ -#line 1701 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 325: /* sim_conf_start: T_Simulate */ +#line 1735 "../../ntpd/ntp_parser.y" { old_config_style = 0; } -#line 3780 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3804 "ntp_parser.c" break; - case 323: /* sim_init_statement_list: sim_init_statement_list sim_init_statement T_EOC */ -#line 1706 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 326: /* sim_init_statement_list: sim_init_statement_list sim_init_statement T_EOC */ +#line 1740 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3789 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3813 "ntp_parser.c" break; - case 324: /* sim_init_statement_list: sim_init_statement T_EOC */ -#line 1711 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 327: /* sim_init_statement_list: sim_init_statement T_EOC */ +#line 1745 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3798 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3822 "ntp_parser.c" break; - case 325: /* sim_init_statement: sim_init_keyword '=' number */ -#line 1719 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 328: /* sim_init_statement: sim_init_keyword '=' number */ +#line 1753 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); } -#line 3804 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3828 "ntp_parser.c" break; - case 328: /* sim_server_list: sim_server_list sim_server */ -#line 1729 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 331: /* sim_server_list: sim_server_list sim_server */ +#line 1763 "../../ntpd/ntp_parser.y" { (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo); APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server)); } -#line 3813 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3837 "ntp_parser.c" break; - case 329: /* sim_server_list: sim_server */ -#line 1734 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 332: /* sim_server_list: sim_server */ +#line 1768 "../../ntpd/ntp_parser.y" { (yyval.Sim_server_fifo) = NULL; APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server)); } -#line 3822 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3846 "ntp_parser.c" break; - case 330: /* sim_server: sim_server_name '{' sim_server_offset sim_act_list '}' */ -#line 1742 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 333: /* sim_server: sim_server_name '{' sim_server_offset sim_act_list '}' */ +#line 1776 "../../ntpd/ntp_parser.y" { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); } -#line 3828 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3852 "ntp_parser.c" break; - case 331: /* sim_server_offset: T_Server_Offset '=' number T_EOC */ -#line 1747 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 334: /* sim_server_offset: T_Server_Offset '=' number T_EOC */ +#line 1781 "../../ntpd/ntp_parser.y" { (yyval.Double) = (yyvsp[-1].Double); } -#line 3834 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3858 "ntp_parser.c" break; - case 332: /* sim_server_name: T_Server '=' address */ -#line 1752 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 335: /* sim_server_name: T_Server '=' address */ +#line 1786 "../../ntpd/ntp_parser.y" { (yyval.Address_node) = (yyvsp[0].Address_node); } -#line 3840 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3864 "ntp_parser.c" break; - case 333: /* sim_act_list: sim_act_list sim_act */ -#line 1757 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 336: /* sim_act_list: sim_act_list sim_act */ +#line 1791 "../../ntpd/ntp_parser.y" { (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo); APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script)); } -#line 3849 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3873 "ntp_parser.c" break; - case 334: /* sim_act_list: sim_act */ -#line 1762 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 337: /* sim_act_list: sim_act */ +#line 1796 "../../ntpd/ntp_parser.y" { (yyval.Sim_script_fifo) = NULL; APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script)); } -#line 3858 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3882 "ntp_parser.c" break; - case 335: /* sim_act: T_Duration '=' number '{' sim_act_stmt_list '}' */ -#line 1770 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 338: /* sim_act: T_Duration '=' number '{' sim_act_stmt_list '}' */ +#line 1804 "../../ntpd/ntp_parser.y" { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); } -#line 3864 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3888 "ntp_parser.c" break; - case 336: /* sim_act_stmt_list: sim_act_stmt_list sim_act_stmt T_EOC */ -#line 1775 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 339: /* sim_act_stmt_list: sim_act_stmt_list sim_act_stmt T_EOC */ +#line 1809 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3873 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3897 "ntp_parser.c" break; - case 337: /* sim_act_stmt_list: sim_act_stmt T_EOC */ -#line 1780 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 340: /* sim_act_stmt_list: sim_act_stmt T_EOC */ +#line 1814 "../../ntpd/ntp_parser.y" { (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3882 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3906 "ntp_parser.c" break; - case 338: /* sim_act_stmt: sim_act_keyword '=' number */ -#line 1788 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" + case 341: /* sim_act_stmt: sim_act_keyword '=' number */ +#line 1822 "../../ntpd/ntp_parser.y" { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); } -#line 3888 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3912 "ntp_parser.c" break; -#line 3892 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c" +#line 3916 "ntp_parser.c" default: break; } @@ -3970,6 +3994,7 @@ yyerrorlab: label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -4030,7 +4055,7 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -4038,24 +4063,22 @@ yyacceptlab: `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if !defined yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -4082,7 +4105,7 @@ yyreturn: return yyresult; } -#line 1799 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 1833 "../../ntpd/ntp_parser.y" void diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h index 426b4b9666ba..2f8501a4b1dc 100644 --- a/ntpd/ntp_parser.h +++ b/ntpd/ntp_parser.h @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C @@ -35,8 +35,8 @@ especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ -#ifndef YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED -# define YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED +#ifndef YY_YY_NTP_PARSER_H_INCLUDED +# define YY_YY_NTP_PARSER_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -82,190 +82,191 @@ extern int yydebug; T_Ctl = 283, /* T_Ctl */ T_Day = 284, /* T_Day */ T_Default = 285, /* T_Default */ - T_Device = 286, /* T_Device */ - T_Digest = 287, /* T_Digest */ - T_Disable = 288, /* T_Disable */ - T_Discard = 289, /* T_Discard */ - T_Dispersion = 290, /* T_Dispersion */ - T_Double = 291, /* T_Double */ - T_Driftfile = 292, /* T_Driftfile */ - T_Drop = 293, /* T_Drop */ - T_Dscp = 294, /* T_Dscp */ - T_Ellipsis = 295, /* T_Ellipsis */ - T_Enable = 296, /* T_Enable */ - T_End = 297, /* T_End */ - T_Epeer = 298, /* T_Epeer */ - T_False = 299, /* T_False */ - T_File = 300, /* T_File */ - T_Filegen = 301, /* T_Filegen */ - T_Filenum = 302, /* T_Filenum */ - T_Flag1 = 303, /* T_Flag1 */ - T_Flag2 = 304, /* T_Flag2 */ - T_Flag3 = 305, /* T_Flag3 */ - T_Flag4 = 306, /* T_Flag4 */ - T_Flake = 307, /* T_Flake */ - T_Floor = 308, /* T_Floor */ - T_Freq = 309, /* T_Freq */ - T_Fudge = 310, /* T_Fudge */ - T_Fuzz = 311, /* T_Fuzz */ - T_Host = 312, /* T_Host */ - T_Huffpuff = 313, /* T_Huffpuff */ - T_Iburst = 314, /* T_Iburst */ - T_Ident = 315, /* T_Ident */ - T_Ignore = 316, /* T_Ignore */ - T_Ignorehash = 317, /* T_Ignorehash */ - T_Incalloc = 318, /* T_Incalloc */ - T_Incmem = 319, /* T_Incmem */ - T_Initalloc = 320, /* T_Initalloc */ - T_Initmem = 321, /* T_Initmem */ - T_Includefile = 322, /* T_Includefile */ - T_Integer = 323, /* T_Integer */ - T_Interface = 324, /* T_Interface */ - T_Intrange = 325, /* T_Intrange */ - T_Io = 326, /* T_Io */ - T_Ippeerlimit = 327, /* T_Ippeerlimit */ - T_Ipv4 = 328, /* T_Ipv4 */ - T_Ipv4_flag = 329, /* T_Ipv4_flag */ - T_Ipv6 = 330, /* T_Ipv6 */ - T_Ipv6_flag = 331, /* T_Ipv6_flag */ - T_Kernel = 332, /* T_Kernel */ - T_Key = 333, /* T_Key */ - T_Keys = 334, /* T_Keys */ - T_Keysdir = 335, /* T_Keysdir */ - T_Kod = 336, /* T_Kod */ - T_Leapfile = 337, /* T_Leapfile */ - T_Leapsmearinterval = 338, /* T_Leapsmearinterval */ - T_Limited = 339, /* T_Limited */ - T_Link = 340, /* T_Link */ - T_Listen = 341, /* T_Listen */ - T_Logconfig = 342, /* T_Logconfig */ - T_Logfile = 343, /* T_Logfile */ - T_Loopstats = 344, /* T_Loopstats */ - T_Lowpriotrap = 345, /* T_Lowpriotrap */ - T_Manycastclient = 346, /* T_Manycastclient */ - T_Manycastserver = 347, /* T_Manycastserver */ - T_Mask = 348, /* T_Mask */ - T_Maxage = 349, /* T_Maxage */ - T_Maxclock = 350, /* T_Maxclock */ - T_Maxdepth = 351, /* T_Maxdepth */ - T_Maxdist = 352, /* T_Maxdist */ - T_Maxmem = 353, /* T_Maxmem */ - T_Maxpoll = 354, /* T_Maxpoll */ - T_Mdnstries = 355, /* T_Mdnstries */ - T_Mem = 356, /* T_Mem */ - T_Memlock = 357, /* T_Memlock */ - T_Minclock = 358, /* T_Minclock */ - T_Mindepth = 359, /* T_Mindepth */ - T_Mindist = 360, /* T_Mindist */ - T_Minimum = 361, /* T_Minimum */ - T_Minjitter = 362, /* T_Minjitter */ - T_Minpoll = 363, /* T_Minpoll */ - T_Minsane = 364, /* T_Minsane */ - T_Mode = 365, /* T_Mode */ - T_Mode7 = 366, /* T_Mode7 */ - T_Monitor = 367, /* T_Monitor */ - T_Month = 368, /* T_Month */ - T_Mru = 369, /* T_Mru */ - T_Mssntp = 370, /* T_Mssntp */ - T_Multicastclient = 371, /* T_Multicastclient */ - T_Nic = 372, /* T_Nic */ - T_Nolink = 373, /* T_Nolink */ - T_Nomodify = 374, /* T_Nomodify */ - T_Nomrulist = 375, /* T_Nomrulist */ - T_None = 376, /* T_None */ - T_Nonvolatile = 377, /* T_Nonvolatile */ - T_Noepeer = 378, /* T_Noepeer */ - T_Nopeer = 379, /* T_Nopeer */ - T_Noquery = 380, /* T_Noquery */ - T_Noselect = 381, /* T_Noselect */ - T_Noserve = 382, /* T_Noserve */ - T_Notrap = 383, /* T_Notrap */ - T_Notrust = 384, /* T_Notrust */ - T_Ntp = 385, /* T_Ntp */ - T_Ntpport = 386, /* T_Ntpport */ - T_NtpSignDsocket = 387, /* T_NtpSignDsocket */ - T_Orphan = 388, /* T_Orphan */ - T_Orphanwait = 389, /* T_Orphanwait */ - T_PCEdigest = 390, /* T_PCEdigest */ - T_Panic = 391, /* T_Panic */ - T_Peer = 392, /* T_Peer */ - T_Peerstats = 393, /* T_Peerstats */ - T_Phone = 394, /* T_Phone */ - T_Pid = 395, /* T_Pid */ - T_Pidfile = 396, /* T_Pidfile */ - T_Poll = 397, /* T_Poll */ - T_PollSkewList = 398, /* T_PollSkewList */ - T_Pool = 399, /* T_Pool */ - T_Port = 400, /* T_Port */ - T_PpsData = 401, /* T_PpsData */ - T_Preempt = 402, /* T_Preempt */ - T_Prefer = 403, /* T_Prefer */ - T_Protostats = 404, /* T_Protostats */ - T_Pw = 405, /* T_Pw */ - T_Randfile = 406, /* T_Randfile */ - T_Rawstats = 407, /* T_Rawstats */ - T_Refid = 408, /* T_Refid */ - T_Requestkey = 409, /* T_Requestkey */ - T_Reset = 410, /* T_Reset */ - T_Restrict = 411, /* T_Restrict */ - T_Revoke = 412, /* T_Revoke */ - T_Rlimit = 413, /* T_Rlimit */ - T_Saveconfigdir = 414, /* T_Saveconfigdir */ - T_Server = 415, /* T_Server */ - T_Serverresponse = 416, /* T_Serverresponse */ - T_ServerresponseFuzz = 417, /* T_ServerresponseFuzz */ - T_Setvar = 418, /* T_Setvar */ - T_Source = 419, /* T_Source */ - T_Stacksize = 420, /* T_Stacksize */ - T_Statistics = 421, /* T_Statistics */ - T_Stats = 422, /* T_Stats */ - T_Statsdir = 423, /* T_Statsdir */ - T_Step = 424, /* T_Step */ - T_Stepback = 425, /* T_Stepback */ - T_Stepfwd = 426, /* T_Stepfwd */ - T_Stepout = 427, /* T_Stepout */ - T_Stratum = 428, /* T_Stratum */ - T_String = 429, /* T_String */ - T_Sys = 430, /* T_Sys */ - T_Sysstats = 431, /* T_Sysstats */ - T_Tick = 432, /* T_Tick */ - T_Time1 = 433, /* T_Time1 */ - T_Time2 = 434, /* T_Time2 */ - T_TimeData = 435, /* T_TimeData */ - T_Timer = 436, /* T_Timer */ - T_Timingstats = 437, /* T_Timingstats */ - T_Tinker = 438, /* T_Tinker */ - T_Tos = 439, /* T_Tos */ - T_Trap = 440, /* T_Trap */ - T_True = 441, /* T_True */ - T_Trustedkey = 442, /* T_Trustedkey */ - T_Ttl = 443, /* T_Ttl */ - T_Type = 444, /* T_Type */ - T_U_int = 445, /* T_U_int */ - T_UEcrypto = 446, /* T_UEcrypto */ - T_UEcryptonak = 447, /* T_UEcryptonak */ - T_UEdigest = 448, /* T_UEdigest */ - T_Unconfig = 449, /* T_Unconfig */ - T_Unpeer = 450, /* T_Unpeer */ - T_Version = 451, /* T_Version */ - T_WanderThreshold = 452, /* T_WanderThreshold */ - T_Week = 453, /* T_Week */ - T_Wildcard = 454, /* T_Wildcard */ - T_Xleave = 455, /* T_Xleave */ - T_Xmtnonce = 456, /* T_Xmtnonce */ - T_Year = 457, /* T_Year */ - T_Flag = 458, /* T_Flag */ - T_EOC = 459, /* T_EOC */ - T_Simulate = 460, /* T_Simulate */ - T_Beep_Delay = 461, /* T_Beep_Delay */ - T_Sim_Duration = 462, /* T_Sim_Duration */ - T_Server_Offset = 463, /* T_Server_Offset */ - T_Duration = 464, /* T_Duration */ - T_Freq_Offset = 465, /* T_Freq_Offset */ - T_Wander = 466, /* T_Wander */ - T_Jitter = 467, /* T_Jitter */ - T_Prop_Delay = 468, /* T_Prop_Delay */ - T_Proc_Delay = 469 /* T_Proc_Delay */ + T_Delrestrict = 286, /* T_Delrestrict */ + T_Device = 287, /* T_Device */ + T_Digest = 288, /* T_Digest */ + T_Disable = 289, /* T_Disable */ + T_Discard = 290, /* T_Discard */ + T_Dispersion = 291, /* T_Dispersion */ + T_Double = 292, /* T_Double */ + T_Driftfile = 293, /* T_Driftfile */ + T_Drop = 294, /* T_Drop */ + T_Dscp = 295, /* T_Dscp */ + T_Ellipsis = 296, /* T_Ellipsis */ + T_Enable = 297, /* T_Enable */ + T_End = 298, /* T_End */ + T_Epeer = 299, /* T_Epeer */ + T_False = 300, /* T_False */ + T_File = 301, /* T_File */ + T_Filegen = 302, /* T_Filegen */ + T_Filenum = 303, /* T_Filenum */ + T_Flag1 = 304, /* T_Flag1 */ + T_Flag2 = 305, /* T_Flag2 */ + T_Flag3 = 306, /* T_Flag3 */ + T_Flag4 = 307, /* T_Flag4 */ + T_Flake = 308, /* T_Flake */ + T_Floor = 309, /* T_Floor */ + T_Freq = 310, /* T_Freq */ + T_Fudge = 311, /* T_Fudge */ + T_Fuzz = 312, /* T_Fuzz */ + T_Host = 313, /* T_Host */ + T_Huffpuff = 314, /* T_Huffpuff */ + T_Iburst = 315, /* T_Iburst */ + T_Ident = 316, /* T_Ident */ + T_Ignore = 317, /* T_Ignore */ + T_Ignorehash = 318, /* T_Ignorehash */ + T_Incalloc = 319, /* T_Incalloc */ + T_Incmem = 320, /* T_Incmem */ + T_Initalloc = 321, /* T_Initalloc */ + T_Initmem = 322, /* T_Initmem */ + T_Includefile = 323, /* T_Includefile */ + T_Integer = 324, /* T_Integer */ + T_Interface = 325, /* T_Interface */ + T_Intrange = 326, /* T_Intrange */ + T_Io = 327, /* T_Io */ + T_Ippeerlimit = 328, /* T_Ippeerlimit */ + T_Ipv4 = 329, /* T_Ipv4 */ + T_Ipv4_flag = 330, /* T_Ipv4_flag */ + T_Ipv6 = 331, /* T_Ipv6 */ + T_Ipv6_flag = 332, /* T_Ipv6_flag */ + T_Kernel = 333, /* T_Kernel */ + T_Key = 334, /* T_Key */ + T_Keys = 335, /* T_Keys */ + T_Keysdir = 336, /* T_Keysdir */ + T_Kod = 337, /* T_Kod */ + T_Leapfile = 338, /* T_Leapfile */ + T_Leapsmearinterval = 339, /* T_Leapsmearinterval */ + T_Limited = 340, /* T_Limited */ + T_Link = 341, /* T_Link */ + T_Listen = 342, /* T_Listen */ + T_Logconfig = 343, /* T_Logconfig */ + T_Logfile = 344, /* T_Logfile */ + T_Loopstats = 345, /* T_Loopstats */ + T_Lowpriotrap = 346, /* T_Lowpriotrap */ + T_Manycastclient = 347, /* T_Manycastclient */ + T_Manycastserver = 348, /* T_Manycastserver */ + T_Mask = 349, /* T_Mask */ + T_Maxage = 350, /* T_Maxage */ + T_Maxclock = 351, /* T_Maxclock */ + T_Maxdepth = 352, /* T_Maxdepth */ + T_Maxdist = 353, /* T_Maxdist */ + T_Maxmem = 354, /* T_Maxmem */ + T_Maxpoll = 355, /* T_Maxpoll */ + T_Mdnstries = 356, /* T_Mdnstries */ + T_Mem = 357, /* T_Mem */ + T_Memlock = 358, /* T_Memlock */ + T_Minclock = 359, /* T_Minclock */ + T_Mindepth = 360, /* T_Mindepth */ + T_Mindist = 361, /* T_Mindist */ + T_Minimum = 362, /* T_Minimum */ + T_Minjitter = 363, /* T_Minjitter */ + T_Minpoll = 364, /* T_Minpoll */ + T_Minsane = 365, /* T_Minsane */ + T_Mode = 366, /* T_Mode */ + T_Mode7 = 367, /* T_Mode7 */ + T_Monitor = 368, /* T_Monitor */ + T_Month = 369, /* T_Month */ + T_Mru = 370, /* T_Mru */ + T_Mssntp = 371, /* T_Mssntp */ + T_Multicastclient = 372, /* T_Multicastclient */ + T_Nic = 373, /* T_Nic */ + T_Nolink = 374, /* T_Nolink */ + T_Nomodify = 375, /* T_Nomodify */ + T_Nomrulist = 376, /* T_Nomrulist */ + T_None = 377, /* T_None */ + T_Nonvolatile = 378, /* T_Nonvolatile */ + T_Noepeer = 379, /* T_Noepeer */ + T_Nopeer = 380, /* T_Nopeer */ + T_Noquery = 381, /* T_Noquery */ + T_Noselect = 382, /* T_Noselect */ + T_Noserve = 383, /* T_Noserve */ + T_Notrap = 384, /* T_Notrap */ + T_Notrust = 385, /* T_Notrust */ + T_Ntp = 386, /* T_Ntp */ + T_Ntpport = 387, /* T_Ntpport */ + T_NtpSignDsocket = 388, /* T_NtpSignDsocket */ + T_Orphan = 389, /* T_Orphan */ + T_Orphanwait = 390, /* T_Orphanwait */ + T_PCEdigest = 391, /* T_PCEdigest */ + T_Panic = 392, /* T_Panic */ + T_Peer = 393, /* T_Peer */ + T_Peerstats = 394, /* T_Peerstats */ + T_Phone = 395, /* T_Phone */ + T_Pid = 396, /* T_Pid */ + T_Pidfile = 397, /* T_Pidfile */ + T_Poll = 398, /* T_Poll */ + T_PollSkewList = 399, /* T_PollSkewList */ + T_Pool = 400, /* T_Pool */ + T_Port = 401, /* T_Port */ + T_PpsData = 402, /* T_PpsData */ + T_Preempt = 403, /* T_Preempt */ + T_Prefer = 404, /* T_Prefer */ + T_Protostats = 405, /* T_Protostats */ + T_Pw = 406, /* T_Pw */ + T_Randfile = 407, /* T_Randfile */ + T_Rawstats = 408, /* T_Rawstats */ + T_Refid = 409, /* T_Refid */ + T_Requestkey = 410, /* T_Requestkey */ + T_Reset = 411, /* T_Reset */ + T_Restrict = 412, /* T_Restrict */ + T_Revoke = 413, /* T_Revoke */ + T_Rlimit = 414, /* T_Rlimit */ + T_Saveconfigdir = 415, /* T_Saveconfigdir */ + T_Server = 416, /* T_Server */ + T_Serverresponse = 417, /* T_Serverresponse */ + T_ServerresponseFuzz = 418, /* T_ServerresponseFuzz */ + T_Setvar = 419, /* T_Setvar */ + T_Source = 420, /* T_Source */ + T_Stacksize = 421, /* T_Stacksize */ + T_Statistics = 422, /* T_Statistics */ + T_Stats = 423, /* T_Stats */ + T_Statsdir = 424, /* T_Statsdir */ + T_Step = 425, /* T_Step */ + T_Stepback = 426, /* T_Stepback */ + T_Stepfwd = 427, /* T_Stepfwd */ + T_Stepout = 428, /* T_Stepout */ + T_Stratum = 429, /* T_Stratum */ + T_String = 430, /* T_String */ + T_Sys = 431, /* T_Sys */ + T_Sysstats = 432, /* T_Sysstats */ + T_Tick = 433, /* T_Tick */ + T_Time1 = 434, /* T_Time1 */ + T_Time2 = 435, /* T_Time2 */ + T_TimeData = 436, /* T_TimeData */ + T_Timer = 437, /* T_Timer */ + T_Timingstats = 438, /* T_Timingstats */ + T_Tinker = 439, /* T_Tinker */ + T_Tos = 440, /* T_Tos */ + T_Trap = 441, /* T_Trap */ + T_True = 442, /* T_True */ + T_Trustedkey = 443, /* T_Trustedkey */ + T_Ttl = 444, /* T_Ttl */ + T_Type = 445, /* T_Type */ + T_U_int = 446, /* T_U_int */ + T_UEcrypto = 447, /* T_UEcrypto */ + T_UEcryptonak = 448, /* T_UEcryptonak */ + T_UEdigest = 449, /* T_UEdigest */ + T_Unconfig = 450, /* T_Unconfig */ + T_Unpeer = 451, /* T_Unpeer */ + T_Version = 452, /* T_Version */ + T_WanderThreshold = 453, /* T_WanderThreshold */ + T_Week = 454, /* T_Week */ + T_Wildcard = 455, /* T_Wildcard */ + T_Xleave = 456, /* T_Xleave */ + T_Xmtnonce = 457, /* T_Xmtnonce */ + T_Year = 458, /* T_Year */ + T_Flag = 459, /* T_Flag */ + T_EOC = 460, /* T_EOC */ + T_Simulate = 461, /* T_Simulate */ + T_Beep_Delay = 462, /* T_Beep_Delay */ + T_Sim_Duration = 463, /* T_Sim_Duration */ + T_Server_Offset = 464, /* T_Server_Offset */ + T_Duration = 465, /* T_Duration */ + T_Freq_Offset = 466, /* T_Freq_Offset */ + T_Wander = 467, /* T_Wander */ + T_Jitter = 468, /* T_Jitter */ + T_Prop_Delay = 469, /* T_Prop_Delay */ + T_Proc_Delay = 470 /* T_Proc_Delay */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -302,196 +303,197 @@ extern int yydebug; #define T_Ctl 283 #define T_Day 284 #define T_Default 285 -#define T_Device 286 -#define T_Digest 287 -#define T_Disable 288 -#define T_Discard 289 -#define T_Dispersion 290 -#define T_Double 291 -#define T_Driftfile 292 -#define T_Drop 293 -#define T_Dscp 294 -#define T_Ellipsis 295 -#define T_Enable 296 -#define T_End 297 -#define T_Epeer 298 -#define T_False 299 -#define T_File 300 -#define T_Filegen 301 -#define T_Filenum 302 -#define T_Flag1 303 -#define T_Flag2 304 -#define T_Flag3 305 -#define T_Flag4 306 -#define T_Flake 307 -#define T_Floor 308 -#define T_Freq 309 -#define T_Fudge 310 -#define T_Fuzz 311 -#define T_Host 312 -#define T_Huffpuff 313 -#define T_Iburst 314 -#define T_Ident 315 -#define T_Ignore 316 -#define T_Ignorehash 317 -#define T_Incalloc 318 -#define T_Incmem 319 -#define T_Initalloc 320 -#define T_Initmem 321 -#define T_Includefile 322 -#define T_Integer 323 -#define T_Interface 324 -#define T_Intrange 325 -#define T_Io 326 -#define T_Ippeerlimit 327 -#define T_Ipv4 328 -#define T_Ipv4_flag 329 -#define T_Ipv6 330 -#define T_Ipv6_flag 331 -#define T_Kernel 332 -#define T_Key 333 -#define T_Keys 334 -#define T_Keysdir 335 -#define T_Kod 336 -#define T_Leapfile 337 -#define T_Leapsmearinterval 338 -#define T_Limited 339 -#define T_Link 340 -#define T_Listen 341 -#define T_Logconfig 342 -#define T_Logfile 343 -#define T_Loopstats 344 -#define T_Lowpriotrap 345 -#define T_Manycastclient 346 -#define T_Manycastserver 347 -#define T_Mask 348 -#define T_Maxage 349 -#define T_Maxclock 350 -#define T_Maxdepth 351 -#define T_Maxdist 352 -#define T_Maxmem 353 -#define T_Maxpoll 354 -#define T_Mdnstries 355 -#define T_Mem 356 -#define T_Memlock 357 -#define T_Minclock 358 -#define T_Mindepth 359 -#define T_Mindist 360 -#define T_Minimum 361 -#define T_Minjitter 362 -#define T_Minpoll 363 -#define T_Minsane 364 -#define T_Mode 365 -#define T_Mode7 366 -#define T_Monitor 367 -#define T_Month 368 -#define T_Mru 369 -#define T_Mssntp 370 -#define T_Multicastclient 371 -#define T_Nic 372 -#define T_Nolink 373 -#define T_Nomodify 374 -#define T_Nomrulist 375 -#define T_None 376 -#define T_Nonvolatile 377 -#define T_Noepeer 378 -#define T_Nopeer 379 -#define T_Noquery 380 -#define T_Noselect 381 -#define T_Noserve 382 -#define T_Notrap 383 -#define T_Notrust 384 -#define T_Ntp 385 -#define T_Ntpport 386 -#define T_NtpSignDsocket 387 -#define T_Orphan 388 -#define T_Orphanwait 389 -#define T_PCEdigest 390 -#define T_Panic 391 -#define T_Peer 392 -#define T_Peerstats 393 -#define T_Phone 394 -#define T_Pid 395 -#define T_Pidfile 396 -#define T_Poll 397 -#define T_PollSkewList 398 -#define T_Pool 399 -#define T_Port 400 -#define T_PpsData 401 -#define T_Preempt 402 -#define T_Prefer 403 -#define T_Protostats 404 -#define T_Pw 405 -#define T_Randfile 406 -#define T_Rawstats 407 -#define T_Refid 408 -#define T_Requestkey 409 -#define T_Reset 410 -#define T_Restrict 411 -#define T_Revoke 412 -#define T_Rlimit 413 -#define T_Saveconfigdir 414 -#define T_Server 415 -#define T_Serverresponse 416 -#define T_ServerresponseFuzz 417 -#define T_Setvar 418 -#define T_Source 419 -#define T_Stacksize 420 -#define T_Statistics 421 -#define T_Stats 422 -#define T_Statsdir 423 -#define T_Step 424 -#define T_Stepback 425 -#define T_Stepfwd 426 -#define T_Stepout 427 -#define T_Stratum 428 -#define T_String 429 -#define T_Sys 430 -#define T_Sysstats 431 -#define T_Tick 432 -#define T_Time1 433 -#define T_Time2 434 -#define T_TimeData 435 -#define T_Timer 436 -#define T_Timingstats 437 -#define T_Tinker 438 -#define T_Tos 439 -#define T_Trap 440 -#define T_True 441 -#define T_Trustedkey 442 -#define T_Ttl 443 -#define T_Type 444 -#define T_U_int 445 -#define T_UEcrypto 446 -#define T_UEcryptonak 447 -#define T_UEdigest 448 -#define T_Unconfig 449 -#define T_Unpeer 450 -#define T_Version 451 -#define T_WanderThreshold 452 -#define T_Week 453 -#define T_Wildcard 454 -#define T_Xleave 455 -#define T_Xmtnonce 456 -#define T_Year 457 -#define T_Flag 458 -#define T_EOC 459 -#define T_Simulate 460 -#define T_Beep_Delay 461 -#define T_Sim_Duration 462 -#define T_Server_Offset 463 -#define T_Duration 464 -#define T_Freq_Offset 465 -#define T_Wander 466 -#define T_Jitter 467 -#define T_Prop_Delay 468 -#define T_Proc_Delay 469 +#define T_Delrestrict 286 +#define T_Device 287 +#define T_Digest 288 +#define T_Disable 289 +#define T_Discard 290 +#define T_Dispersion 291 +#define T_Double 292 +#define T_Driftfile 293 +#define T_Drop 294 +#define T_Dscp 295 +#define T_Ellipsis 296 +#define T_Enable 297 +#define T_End 298 +#define T_Epeer 299 +#define T_False 300 +#define T_File 301 +#define T_Filegen 302 +#define T_Filenum 303 +#define T_Flag1 304 +#define T_Flag2 305 +#define T_Flag3 306 +#define T_Flag4 307 +#define T_Flake 308 +#define T_Floor 309 +#define T_Freq 310 +#define T_Fudge 311 +#define T_Fuzz 312 +#define T_Host 313 +#define T_Huffpuff 314 +#define T_Iburst 315 +#define T_Ident 316 +#define T_Ignore 317 +#define T_Ignorehash 318 +#define T_Incalloc 319 +#define T_Incmem 320 +#define T_Initalloc 321 +#define T_Initmem 322 +#define T_Includefile 323 +#define T_Integer 324 +#define T_Interface 325 +#define T_Intrange 326 +#define T_Io 327 +#define T_Ippeerlimit 328 +#define T_Ipv4 329 +#define T_Ipv4_flag 330 +#define T_Ipv6 331 +#define T_Ipv6_flag 332 +#define T_Kernel 333 +#define T_Key 334 +#define T_Keys 335 +#define T_Keysdir 336 +#define T_Kod 337 +#define T_Leapfile 338 +#define T_Leapsmearinterval 339 +#define T_Limited 340 +#define T_Link 341 +#define T_Listen 342 +#define T_Logconfig 343 +#define T_Logfile 344 +#define T_Loopstats 345 +#define T_Lowpriotrap 346 +#define T_Manycastclient 347 +#define T_Manycastserver 348 +#define T_Mask 349 +#define T_Maxage 350 +#define T_Maxclock 351 +#define T_Maxdepth 352 +#define T_Maxdist 353 +#define T_Maxmem 354 +#define T_Maxpoll 355 +#define T_Mdnstries 356 +#define T_Mem 357 +#define T_Memlock 358 +#define T_Minclock 359 +#define T_Mindepth 360 +#define T_Mindist 361 +#define T_Minimum 362 +#define T_Minjitter 363 +#define T_Minpoll 364 +#define T_Minsane 365 +#define T_Mode 366 +#define T_Mode7 367 +#define T_Monitor 368 +#define T_Month 369 +#define T_Mru 370 +#define T_Mssntp 371 +#define T_Multicastclient 372 +#define T_Nic 373 +#define T_Nolink 374 +#define T_Nomodify 375 +#define T_Nomrulist 376 +#define T_None 377 +#define T_Nonvolatile 378 +#define T_Noepeer 379 +#define T_Nopeer 380 +#define T_Noquery 381 +#define T_Noselect 382 +#define T_Noserve 383 +#define T_Notrap 384 +#define T_Notrust 385 +#define T_Ntp 386 +#define T_Ntpport 387 +#define T_NtpSignDsocket 388 +#define T_Orphan 389 +#define T_Orphanwait 390 +#define T_PCEdigest 391 +#define T_Panic 392 +#define T_Peer 393 +#define T_Peerstats 394 +#define T_Phone 395 +#define T_Pid 396 +#define T_Pidfile 397 +#define T_Poll 398 +#define T_PollSkewList 399 +#define T_Pool 400 +#define T_Port 401 +#define T_PpsData 402 +#define T_Preempt 403 +#define T_Prefer 404 +#define T_Protostats 405 +#define T_Pw 406 +#define T_Randfile 407 +#define T_Rawstats 408 +#define T_Refid 409 +#define T_Requestkey 410 +#define T_Reset 411 +#define T_Restrict 412 +#define T_Revoke 413 +#define T_Rlimit 414 +#define T_Saveconfigdir 415 +#define T_Server 416 +#define T_Serverresponse 417 +#define T_ServerresponseFuzz 418 +#define T_Setvar 419 +#define T_Source 420 +#define T_Stacksize 421 +#define T_Statistics 422 +#define T_Stats 423 +#define T_Statsdir 424 +#define T_Step 425 +#define T_Stepback 426 +#define T_Stepfwd 427 +#define T_Stepout 428 +#define T_Stratum 429 +#define T_String 430 +#define T_Sys 431 +#define T_Sysstats 432 +#define T_Tick 433 +#define T_Time1 434 +#define T_Time2 435 +#define T_TimeData 436 +#define T_Timer 437 +#define T_Timingstats 438 +#define T_Tinker 439 +#define T_Tos 440 +#define T_Trap 441 +#define T_True 442 +#define T_Trustedkey 443 +#define T_Ttl 444 +#define T_Type 445 +#define T_U_int 446 +#define T_UEcrypto 447 +#define T_UEcryptonak 448 +#define T_UEdigest 449 +#define T_Unconfig 450 +#define T_Unpeer 451 +#define T_Version 452 +#define T_WanderThreshold 453 +#define T_Week 454 +#define T_Wildcard 455 +#define T_Xleave 456 +#define T_Xmtnonce 457 +#define T_Year 458 +#define T_Flag 459 +#define T_EOC 460 +#define T_Simulate 461 +#define T_Beep_Delay 462 +#define T_Sim_Duration 463 +#define T_Server_Offset 464 +#define T_Duration 465 +#define T_Freq_Offset 466 +#define T_Wander 467 +#define T_Jitter 468 +#define T_Prop_Delay 469 +#define T_Proc_Delay 470 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 52 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y" +#line 52 "../../ntpd/ntp_parser.y" char * String; double Double; @@ -510,7 +512,7 @@ union YYSTYPE script_info * Sim_script; script_info_fifo * Sim_script_fifo; -#line 514 "../../../src/ntp-stable-3758/ntpd/ntp_parser.h" +#line 516 "ntp_parser.h" }; typedef union YYSTYPE YYSTYPE; @@ -521,6 +523,8 @@ typedef union YYSTYPE YYSTYPE; extern YYSTYPE yylval; + int yyparse (void); -#endif /* !YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED */ + +#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */ diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y index 9516d674a5fb..49b55588d54d 100644 --- a/ntpd/ntp_parser.y +++ b/ntpd/ntp_parser.y @@ -97,6 +97,7 @@ %token <Integer> T_Ctl %token <Integer> T_Day %token <Integer> T_Default +%token <Integer> T_Delrestrict %token <Integer> T_Device %token <Integer> T_Digest %token <Integer> T_Disable @@ -349,6 +350,7 @@ %type <Attr_val> pollskew_cycle %type <Attr_val> pollskew_spec %type <Integer> reset_command +%type <Address_node> restrict_mask %type <Integer> rlimit_option_keyword %type <Attr_val> rlimit_option %type <Attr_val_fifo> rlimit_option_list @@ -826,28 +828,22 @@ access_control_command { CONCAT_G_FIFOS(cfgt.mru_opts, $2); } - | T_Restrict address res_ippeerlimit ac_flag_list + | T_Restrict address restrict_mask res_ippeerlimit ac_flag_list { restrict_node *rn; - 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 res_ippeerlimit ac_flag_list - { - restrict_node *rn; - - rn = create_restrict_node($2, $4, $5, $6, - lex_current()->curpos.nline); + rn = create_restrict_node($2, $3, $4, $5, FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } | T_Restrict T_Default res_ippeerlimit ac_flag_list { restrict_node *rn; - rn = create_restrict_node(NULL, NULL, $3, $4, - lex_current()->curpos.nline); + rn = create_restrict_node(NULL, NULL, $3, $4, FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } | T_Restrict T_Ipv4_flag T_Default res_ippeerlimit ac_flag_list @@ -861,8 +857,9 @@ access_control_command create_address_node( estrdup("0.0.0.0"), AF_INET), - $4, $5, - lex_current()->curpos.nline); + $4, $5, FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } | T_Restrict T_Ipv6_flag T_Default res_ippeerlimit ac_flag_list @@ -876,8 +873,9 @@ access_control_command create_address_node( estrdup("::"), AF_INET6), - $4, $5, - lex_current()->curpos.nline); + $4, $5, FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } | T_Restrict T_Source res_ippeerlimit ac_flag_list @@ -885,12 +883,43 @@ access_control_command restrict_node * rn; APPEND_G_FIFO($4, create_attr_ival($2, 1)); - rn = create_restrict_node( - NULL, NULL, $3, $4, lex_current()->curpos.nline); + rn = create_restrict_node(NULL, NULL, $3, $4, FALSE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); + APPEND_G_FIFO(cfgt.restrict_opts, rn); + } + | T_Delrestrict ip_address restrict_mask + { + restrict_node * rn; + + rn = create_restrict_node($2, $3, -1, NULL, TRUE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); + APPEND_G_FIFO(cfgt.restrict_opts, rn); + } + | T_Delrestrict T_Source ip_address + { + restrict_node * rn; + attr_val_fifo * avf; + + avf = NULL; + APPEND_G_FIFO(avf, create_attr_ival($2, 1)); + rn = create_restrict_node($3, NULL, -1, avf, TRUE, + lex_current()->curpos.nline, + lex_current()->curpos.ncol); APPEND_G_FIFO(cfgt.restrict_opts, rn); } ; +restrict_mask + : /* no mask is allowed */ + { $$ = NULL; } + | T_Mask ip_address + { + $$ = $2; + } + ; + res_ippeerlimit : /* empty ippeerlimit defaults to -1 (unlimited) */ { $$ = -1; } @@ -904,8 +933,8 @@ res_ippeerlimit "Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.", $2, ip_ctx->fname, - ip_ctx->errpos.nline, - ip_ctx->errpos.ncol); + ip_ctx->curpos.nline, + ip_ctx->curpos.ncol); $2 = 0; } $$ = $2; @@ -1446,7 +1475,12 @@ pollskew_spec ; pollskew_cycle - : T_Integer { $$ = ($1 >= 3 && $1 <= 17) ? create_attr_rval($1, 0, 0) : NULL; } + : T_Integer + { + $$ = ($1 >= NTP_MINPOLL && $1 <= NTP_MAXPOLL) + ? create_attr_rval($1, 0, 0) + : NULL; + } | T_Default { $$ = create_attr_rval(-1, 0, 0); } ; diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c index c1716ffe0d83..69c1eff45822 100644 --- a/ntpd/ntp_peer.c +++ b/ntpd/ntp_peer.c @@ -39,7 +39,7 @@ #define AM_MODES 7 /* number of rows and columns */ #define NO_PEER 0 /* action when no peer is found */ -int AM[AM_MODES][AM_MODES] = { +const s_char AM[AM_MODES][AM_MODES] = { /* packet->mode */ /* peer { UNSPEC, ACTIVE, PASSIVE, CLIENT, SERVER, BCAST } */ /* mode */ @@ -58,7 +58,7 @@ int AM[AM_MODES][AM_MODES] = { /*BCL*/ { AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_PROCPKT}, }; -#define MATCH_ASSOC(x, y) AM[(x)][(y)] +#define MATCH_ASSOC(x, y) (AM[CLAMP((x), 0, AM_MODES)][CLAMP((y), 0, AM_MODES)]) /* * These routines manage the allocation of memory to peer structures @@ -91,8 +91,8 @@ int peer_free_count; /* count of free structures */ * Association ID. We initialize this value randomly, then assign a new * value every time an association is mobilized. */ -static associd_t current_association_ID; /* association ID */ -static associd_t initial_association_ID; /* association ID */ +static associd_t current_association_ID; /* actually next poss. ID */ +static associd_t initial_association_ID; /* * Memory allocation watermarks. @@ -256,7 +256,7 @@ findexistingpeer_addr( /* - * findexistingpeer - search by address and return a pointer to a peer. + * findexistingpeer - search by name+family or address. */ struct peer * findexistingpeer( @@ -294,7 +294,7 @@ findexistingpeer( * enough. Authentication alone does not help here, since it does not * protect the UDP layer and leaves us open for a replay attack. * - * So we do not update the adresses and wait until the next interface + * So we do not update the addresses and wait until the next interface * list update does the right thing for us. */ struct peer * @@ -347,18 +347,20 @@ findpeer( } /* if an error was returned, exit back right here. */ - if (*action == AM_ERR) + if (*action == AM_ERR) { return NULL; + } /* if a match is found, we stop our search. */ - if (*action != AM_NOMATCH) + if (*action != AM_NOMATCH) { break; + } } /* If no matching association is found... */ - if (NULL == p) + if (NULL == p) { *action = MATCH_ASSOC(NO_PEER, pkt_mode); - + } return p; } @@ -542,7 +544,8 @@ unpeer( ) { mprintf_event(PEVNT_DEMOBIL, peer, "assoc %u", peer->associd); - restrict_source(&peer->srcadr, 1, 0); + restrict_source(&peer->srcadr, TRUE, 0); + peer->flags |= FLAG_DISABLED; set_peerdstadr(peer, NULL); peer_demobilizations++; peer_associations--; @@ -645,6 +648,24 @@ set_peerdstadr( return; /* + * Do not change the local address of a link-local + * peer address. + */ + if ( p->dstadr != NULL && is_linklocal(&p->dstadr->sin) + && dstadr != NULL) { + return; + } + + /* + * Do not set the local address for a link-local IPv6 peer + * to one with a different scope ID. + */ + if ( dstadr != NULL && IS_IPV6(&p->srcadr) + && SCOPE(&dstadr->sin) != SCOPE(&p->srcadr)) { + return; + } + + /* * Don't accept updates to a separate multicast receive-only * endpt while a BCLNT peer is running its unicast protocol. */ @@ -658,11 +679,14 @@ set_peerdstadr( p->dstadr->peercnt--; UNLINK_SLIST(unlinked, p->dstadr->peers, p, ilink, struct peer); + } + if ( !IS_MCAST(&p->srcadr) && !(FLAG_DISABLED & p->flags) + && !initializing) { msyslog(LOG_INFO, "%s local addr %s -> %s", - stoa(&p->srcadr), latoa(p->dstadr), - latoa(dstadr)); + stoa(&p->srcadr), eptoa(p->dstadr), + eptoa(dstadr)); } - + p->dstadr = dstadr; /* link to list if we have an address after assignment */ @@ -741,14 +765,20 @@ refresh_all_peerinterfaces(void) struct peer *p; /* - * this is called when the interface list has changed - * give all peers a chance to find a better interface - * but only if either they don't have an address already - * or if the one they have hasn't worked for a while. + * This is called when the interface list has changed. + * Give peers a chance to find a better interface. */ for (p = peer_list; p != NULL; p = p->p_link) { - if (!(p->dstadr && (p->reach & 0x3))) // Bug 2849 XOR 2043 - peer_refresh_interface(p); + /* + * Bug 2849 XOR 2043 + * Change local address only if the peer doesn't + * have a local address already or if the one + * they have hasn't worked for a while. + */ + if (p->dstadr != NULL && (p->reach & 0x3)) { + continue; + } + peer_refresh_interface(p); } } @@ -777,7 +807,6 @@ newpeer( u_int hash; int ip_count = 0; - DEBUG_REQUIRE(srcadr); #ifdef AUTOKEY @@ -789,7 +818,9 @@ newpeer( return (NULL); } else if (flags & FLAG_SKEY) { - msyslog(LOG_ERR, "Autokey not configured"); + msyslog(LOG_ERR, "Rejecting Autokey with %s," + " built without support.", + stoa(srcadr)); return (NULL); } } @@ -831,13 +862,34 @@ newpeer( } /* + * In any case, do not create an association with a duplicate + * remote address (srcadr) except for undefined (zero) address. + * Arguably this should be part of the logic above but + * [Bug 3888] exposed a situation with manycastclient where + * duplicate associations happened. + */ + if (NULL == peer) { + for (peer = peer_list; + peer != NULL; + peer = peer->p_link) { + if ( SOCK_EQ(srcadr, &peer->srcadr) + && !SOCK_UNSPEC(srcadr) + && !SOCK_UNSPEC(&peer->srcadr)) { + /* leave peer non-NULL */ + break; + } + } + } + + /* * If a peer is found, this would be a duplicate and we don't * allow that. This avoids duplicate ephemeral (broadcast/ * multicast) and preemptible (manycast and pool) client * associations. */ if (peer != NULL) { - DPRINTF(2, ("newpeer(%s) found existing association\n", + DPRINTF(2, ("%s(%s) found existing association\n", + __func__, (hostname) ? hostname : stoa(srcadr))); @@ -845,7 +897,7 @@ newpeer( } #if 0 -DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n", + DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n", (hostname) ? hostname : stoa(srcadr), @@ -884,15 +936,19 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n", peer_preempt++; /* - * Assign an association ID and increment the system variable. + * Assign an available association ID. Zero is reserved. */ + do { + while (0 == ++current_association_ID) { + /* EMPTY */ + } + } while (NULL != findpeerbyassoc(current_association_ID)); peer->associd = current_association_ID; - if (++current_association_ID == 0) - ++current_association_ID; peer->srcadr = *srcadr; - if (hostname != NULL) + if (hostname != NULL) { peer->hostname = estrdup(hostname); + } peer->hmode = hmode; peer->version = version; peer->flags = flags; @@ -901,66 +957,67 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n", select_peerinterface(peer, srcadr, dstadr)); /* - * It is an error to set minpoll less than NTP_MINPOLL or to - * set maxpoll greater than NTP_MAXPOLL. However, minpoll is - * clamped not greater than NTP_MAXPOLL and maxpoll is clamped - * not less than NTP_MINPOLL without complaint. Finally, - * minpoll is clamped not greater than maxpoll. + * Zero for minpoll or maxpoll means use defaults. */ - if (minpoll == 0) - peer->minpoll = NTP_MINDPOLL; - else - peer->minpoll = min(minpoll, NTP_MAXPOLL); - if (maxpoll == 0) - peer->maxpoll = NTP_MAXDPOLL; - else - peer->maxpoll = max(maxpoll, NTP_MINPOLL); - if (peer->minpoll > peer->maxpoll) - peer->minpoll = peer->maxpoll; + peer->maxpoll = (0 == maxpoll) + ? NTP_MAXDPOLL + : maxpoll; + peer->minpoll = (0 == minpoll) + ? NTP_MINDPOLL + : minpoll; + + /* + * Clamp maxpoll and minpoll within NTP_MINPOLL and NTP_MAXPOLL, + * and further clamp minpoll less than or equal maxpoll. + */ + peer->maxpoll = CLAMP(peer->maxpoll, NTP_MINPOLL, NTP_MAXPOLL); + peer->minpoll = CLAMP(peer->minpoll, NTP_MINPOLL, peer->maxpoll); - if (peer->dstadr != NULL) + if (peer->dstadr != NULL) { DPRINTF(3, ("newpeer(%s): using fd %d and our addr %s\n", stoa(srcadr), peer->dstadr->fd, stoa(&peer->dstadr->sin))); - else - DPRINTF(3, ("newpeer(%s): local interface currently not bound\n", + } else { + DPRINTF(3, ("newpeer(%s): local addr unavailable\n", stoa(srcadr))); - + } /* * Broadcast needs the socket enabled for broadcast */ - if ((MDF_BCAST & cast_flags) && peer->dstadr != NULL) + if ((MDF_BCAST & cast_flags) && peer->dstadr != NULL) { enable_broadcast(peer->dstadr, srcadr); - + } /* * Multicast needs the socket interface enabled for multicast */ - if ((MDF_MCAST & cast_flags) && peer->dstadr != NULL) + if ((MDF_MCAST & cast_flags) && peer->dstadr != NULL) { enable_multicast_if(peer->dstadr, srcadr); - + } #ifdef AUTOKEY if (key > NTP_MAXKEY) peer->flags |= FLAG_SKEY; #endif /* AUTOKEY */ peer->ttl = ttl; peer->keyid = key; - if (ident != NULL) + if (ident != NULL) { peer->ident = estrdup(ident); + } peer->precision = sys_precision; peer->hpoll = peer->minpoll; - if (cast_flags & MDF_ACAST) + if (cast_flags & MDF_ACAST) { peer_clear(peer, "ACST"); - else if (cast_flags & MDF_POOL) + } else if (cast_flags & MDF_POOL) { peer_clear(peer, "POOL"); - else if (cast_flags & MDF_MCAST) + } else if (cast_flags & MDF_MCAST) { peer_clear(peer, "MCST"); - else if (cast_flags & MDF_BCAST) + } else if (cast_flags & MDF_BCAST) { peer_clear(peer, "BCST"); - else + } else { peer_clear(peer, "INIT"); - if (mode_ntpdate) + } + if (mode_ntpdate) { peer_ntpdate++; - + } /* * Note time on statistics timers. */ @@ -976,8 +1033,6 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n", * the peer timer, since the clock may have requirements * for this. */ - if (maxpoll == 0) - peer->maxpoll = peer->minpoll; if (!refclock_newpeer(peer)) { /* * Dump it, something screwed up @@ -1006,7 +1061,7 @@ DPRINTF(1, ("newpeer(%s) found no existing and %d other associations\n", assoc_hash_count[hash]++; LINK_SLIST(peer_list, peer, p_link); - restrict_source(&peer->srcadr, 0, 0); + restrict_source(&peer->srcadr, FALSE, 0); mprintf_event(PEVNT_MOBIL, peer, "assoc %d", peer->associd); DPRINTF(1, ("newpeer: %s->%s mode %u vers %u poll %u %u flags 0x%x 0x%x ttl %u key %08x\n", latoa(peer->dstadr), stoa(&peer->srcadr), peer->hmode, @@ -1093,8 +1148,9 @@ findmanycastpeer( for (peer = peer_list; peer != NULL; peer = peer->p_link) if (MDF_SOLICIT_MASK & peer->cast_flags) { NTOHL_FP(&pkt->org, &p_org); - if (L_ISEQU(&p_org, &peer->aorg)) + if (L_ISEQU(&p_org, &peer->aorg)) { break; + } } return peer; @@ -1103,17 +1159,11 @@ findmanycastpeer( /* peer_cleanup - clean peer list prior to shutdown */ void peer_cleanup(void) { - struct peer *peer; - associd_t assoc; - - for (assoc = initial_association_ID; assoc != current_association_ID; assoc++) { - if (assoc != 0U) { - peer = findpeerbyassoc(assoc); - if (peer != NULL) - unpeer(peer); - } - } - peer = findpeerbyassoc(current_association_ID); - if (peer != NULL) - unpeer(peer); + struct peer *peer; + struct peer *nextpeer; + + for (peer = peer_list; peer != NULL; peer = nextpeer) { + nextpeer = peer->p_link; + unpeer(peer); + } } diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index f2c59238432a..170294c68bb6 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -17,7 +17,6 @@ #include "ntp_leapsec.h" #include "ntp_psl.h" #include "refidsmear.h" -#include "lib_strbuf.h" #include <stdio.h> #ifdef HAVE_LIBSCF_H @@ -35,9 +34,9 @@ #define SRVFUZ_SHIFT 6 /* 64 seconds */ #define SRVRSP_FUZZ(x) \ do { \ - x.l_uf &= 0; \ + x.l_uf = 0; \ x.l_ui &= ~((1 << SRVFUZ_SHIFT) - 1U); \ - } while(0) + } while (FALSE) /* * This macro defines the authentication state. If x is 1 authentication @@ -472,7 +471,16 @@ transmit( return; } - /* + /* [Bug 3851] drop pool servers which can no longer be reached. */ + if (MDF_PCLNT & peer->cast_flags) { + if ( (IS_IPV6(&peer->srcadr) && !nonlocal_v6_addr_up) + || !nonlocal_v4_addr_up) { + unpeer(peer); + return; + } + } + + /* * In unicast modes the dance is much more intricate. It is * designed to back off whenever possible to minimize network * traffic. @@ -584,6 +592,7 @@ transmit( } +#ifdef DEBUG const char * amtoa( int am @@ -607,6 +616,7 @@ amtoa( return bp; } } +#endif /* DEBUG */ /* @@ -626,7 +636,6 @@ receive( 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 */ @@ -636,11 +645,15 @@ receive( keyid_t skeyid = 0; /* key IDs */ u_int32 opcode = 0; /* extension field opcode */ sockaddr_u *dstadr_sin; /* active runway */ + u_char cast_flags; /* MDF_* flags for newpeer() */ struct peer *peer2; /* aux peer structure pointer */ endpt *match_ep; /* newpeer() local address */ l_fp p_org; /* origin timestamp */ l_fp p_rec; /* receive timestamp */ l_fp p_xmt; /* transmit timestamp */ +#ifdef DEBUG + const char *am_str; /* association match string */ +#endif #ifdef AUTOKEY char hostname[NTP_MAXSTRLEN + 1]; char *groupname = NULL; @@ -689,12 +702,11 @@ receive( } if (hismode == MODE_PRIVATE) { if (!ntp_mode7 || (restrict_mask & RES_NOQUERY)) { - DPRINTF(2, ("receive: drop: RES_NOQUERY\n")); + DPRINTF(2, ("receive: drop: !mode7 or RES_NOQUERY\n")); sys_restricted++; return; /* no query private */ } - process_private(rbufp, ((restrict_mask & - RES_NOMODIFY) == 0)); + process_private(rbufp, !(RES_NOMODIFY & restrict_mask)); return; } if (hismode == MODE_CONTROL) { @@ -725,14 +737,14 @@ receive( hisleap = PKT_LEAP(pkt->li_vn_mode); hisstratum = PKT_TO_STRATUM(pkt->stratum); - INSIST(0 != hisstratum); /* paranoia check PKT_TO_STRATUM result */ - + DEBUG_INSIST(0 != hisstratum); /* paranoia check PKT_TO_STRATUM result */ + /* TODO: this should be in a unit test */ DPRINTF(1, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s " - "restrict %s org %#010x.%08x xmt %#010x.%08x\n", + "restrict %s org 0x%x.%08x xmt 0x%x.%08x\n", current_time, stoa(&rbufp->dstadr->sin), stoa(&rbufp->recv_srcadr), r4a.ippeerlimit, hismode, - build_iflags(rbufp->dstadr->flags), - build_rflags(restrict_mask), + iflags_str(rbufp->dstadr->flags), + rflags_str(restrict_mask), ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf), ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf))); @@ -807,10 +819,15 @@ receive( || (NTP_MAXPOLL < pkt->ppoll) ) ) { +#ifdef BUG3870 DPRINTF(2, ("receive: drop: Invalid ppoll (%d) from %s\n", pkt->ppoll, stoa(&rbufp->recv_srcadr))); sys_badlength++; return; /* invalid packet poll */ +#else + DPRINTF(2, ("receive: info: Invalid ppoll (%d) from %s\n", + pkt->ppoll, stoa(&rbufp->recv_srcadr))); +#endif } /* @@ -987,7 +1004,9 @@ receive( NTOHL_FP(&pkt->rec, &p_rec); NTOHL_FP(&pkt->xmt, &p_xmt); hm_str = modetoa(hismode); +#ifdef DEBUG am_str = amtoa(retcode); +#endif /* * Authentication is conditioned by three switches: @@ -1030,7 +1049,7 @@ receive( if (has_mac == 0) { restrict_mask &= ~RES_MSSNTP; is_authentic = AUTH_NONE; /* not required */ - DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x NOMAC\n", + DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org 0x%x.%08x xmt 0x%x.%08x NOMAC\n", current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str, authlen, @@ -1039,7 +1058,7 @@ receive( } else if (crypto_nak_test == VALIDNAK) { restrict_mask &= ~RES_MSSNTP; is_authentic = AUTH_CRYPTO; /* crypto-NAK */ - DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x CRYPTONAK\n", + DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org 0x%x.%08x xmt 0x%x.%08x CRYPTONAK\n", current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str, skeyid, authlen + has_mac, is_authentic, @@ -1062,7 +1081,7 @@ receive( && (memcmp(zero_key, (char *)pkt + authlen + 4, MAX_MD5_LEN - 4) == 0)) { is_authentic = AUTH_NONE; - DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x SIGND\n", + DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %x.%08x xmt %x.%08x SIGND\n", current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str, authlen, @@ -1185,7 +1204,7 @@ receive( if (crypto_flags && skeyid > NTP_MAXKEY) authtrust(skeyid, 0); #endif /* AUTOKEY */ - DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x MAC\n", + DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org 0x%x.%08x xmt 0x%x.%08x MAC\n", current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str, skeyid, authlen + has_mac, is_authentic, @@ -1358,7 +1377,12 @@ receive( if ( sys_leap == LEAP_NOTINSYNC || sys_stratum >= hisstratum || (!sys_cohort && sys_stratum == hisstratum + 1) - || rbufp->dstadr->addr_refid == pkt->refid) { + || rbufp->dstadr->addr_refid == pkt->refid +# ifdef WORDS_BIGENDIAN /* see local_refid() comment */ + || ( IS_IPV6(&rbufp->dstadr->sin) + &&rbufp->dstadr->old_refid == pkt->refid) +# endif + ) { DPRINTF(2, ("receive: sys leap: %0x, sys_stratum %d > hisstratum+1 %d, !sys_cohort %d && sys_stratum == hisstratum+1, loop refid %#x == pkt refid %#x\n", sys_leap, sys_stratum, hisstratum + 1, !sys_cohort, rbufp->dstadr->addr_refid, pkt->refid)); DPRINTF(2, ("receive: AM_FXMIT drop: LEAP_NOTINSYNC || stratum || loop\n")); sys_declined++; @@ -1366,6 +1390,17 @@ receive( } /* + * Do not respond if the packet came into an IPv6 link-local + * address on an interface where we also have a usable + * global address, to avoid duplicate associations. + */ + if (INT_LL_OF_GLOB & rbufp->dstadr->flags) { + DPRINTF(2, ("receive: declining manycast solicitation on link-local IPv6\n")); + sys_declined++; + return; + } + + /* * Respond only if authentication succeeds. Don't do a * crypto-NAK, as that would not be useful. */ @@ -1423,6 +1458,12 @@ receive( return; } #endif /* AUTOKEY */ + /* Do not spin up duplicate manycast associations */ + if (INT_LL_OF_GLOB & rbufp->dstadr->flags) { + DPRINTF(2, ("receive: AM_MANYCAST drop: link-local server\n")); + sys_declined++; + return; + } if ((peer2 = findmanycastpeer(rbufp)) == NULL) { DPRINTF(2, ("receive: AM_MANYCAST drop: No manycast peer\n")); sys_restricted++; @@ -1450,11 +1491,15 @@ receive( sys_declined++; return; /* no help */ } + cast_flags = MDF_UCAST; + if (MDF_POOL & peer2->cast_flags) { + cast_flags |= MDF_PCLNT; + } peer = newpeer(&rbufp->recv_srcadr, NULL, rbufp->dstadr, r4a.ippeerlimit, MODE_CLIENT, hisversion, peer2->minpoll, peer2->maxpoll, (FLAG_PREEMPT | (POOL_FLAG_PMASK & peer2->flags)), - (MDF_UCAST | MDF_UCLNT), 0, skeyid, sys_ident); + cast_flags, 0, skeyid, sys_ident); if (NULL == peer) { DPRINTF(2, ("receive: AM_MANYCAST drop: duplicate\n")); sys_declined++; @@ -1840,7 +1885,7 @@ receive( if ( tdiff.l_i < 0 && (current_time - peer->timereceived) < deadband) { - msyslog(LOG_INFO, "receive: broadcast packet from %s contains non-monotonic timestamp: %#010x.%08x -> %#010x.%08x", + msyslog(LOG_INFO, "receive: broadcast packet from %s contains non-monotonic timestamp: 0x%x.%08x -> 0x%x.%08x", stoa(&rbufp->recv_srcadr), peer->bxmt.l_ui, peer->bxmt.l_uf, p_xmt.l_ui, p_xmt.l_uf @@ -1991,7 +2036,7 @@ receive( if (peer->flip == 0 && !L_ISEQU(&p_org, &peer->aorg)) { peer->bogusorg++; msyslog(LOG_INFO, - "receive: flip 0 KoD origin timestamp %#010x.%08x from %s does not match %#010x.%08x - ignoring.", + "receive: flip 0 KoD origin timestamp 0x%x.%08x from %s does not match 0x%x.%08x - ignoring.", p_org.l_ui, p_org.l_uf, ntoa(&peer->srcadr), peer->aorg.l_ui, peer->aorg.l_uf); @@ -1999,7 +2044,7 @@ receive( } else if (peer->flip == 1 && !L_ISEQU(&p_org, &peer->borg)) { peer->bogusorg++; msyslog(LOG_INFO, - "receive: flip 1 KoD origin timestamp %#010x.%08x from %s does not match interleave %#010x.%08x - ignoring.", + "receive: flip 1 KoD origin timestamp 0x%x.%08x from %s does not match interleave 0x%x.%08x - ignoring.", p_org.l_ui, p_org.l_uf, ntoa(&peer->srcadr), peer->borg.l_ui, peer->borg.l_uf); @@ -2033,9 +2078,14 @@ receive( /* XXX: FLAG_LOOPNONCE */ DEBUG_INSIST(0 == (FLAG_LOOPNONCE & peer->flags)); - msyslog(LOG_INFO, - "receive: Got KoD %s from %s", - refid_str(pkt->refid, hisstratum), ntoa(&peer->srcadr)); + if (RATEKISS == kissCode) { + msyslog(LOG_INFO, "RATE KoD from %s poll %u", + ntoa(&peer->srcadr), 1u << pkt->ppoll); + } else { + msyslog(LOG_INFO, "KoD %s from %s", + refid_str(pkt->refid, -1), + ntoa(&peer->srcadr)); + } } else if (peer->flip == 0) { if (0) { } else if (L_ISZERO(&p_org)) { @@ -2049,11 +2099,11 @@ receive( #endif /**/ switch (hismode) { - /* We allow 0org for: */ + /* We allow 0org for: */ case UCHAR_MAX: action = "Allow"; break; - /* We disallow 0org for: */ + /* We disallow 0org for: */ case MODE_UNSPEC: case MODE_ACTIVE: case MODE_PASSIVE: @@ -2071,20 +2121,22 @@ receive( } /**/ msyslog(LOG_INFO, - "receive: %s 0 origin timestamp from %s@%s xmt %#010x.%08x", + "receive: %s 0 origin timestamp from %s@%s xmt 0x%x.%08x", action, hm_str, ntoa(&peer->srcadr), ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)); + } else if ( L_ISZERO(&peer->aorg) && MODE_CLIENT != hismode + && !memcmp("STEP", &peer->refid, 4)) { + /* response came in just after we stepped clock, normal */ } else if (!L_ISEQU(&p_org, &peer->aorg)) { /* are there cases here where we should bail? */ /* Should we set TEST2 if we decide to try xleave? */ peer->bogusorg++; peer->flash |= TEST2; /* bogus */ - msyslog(LOG_INFO, - "receive: Unexpected origin timestamp %#010x.%08x does not match aorg %#010x.%08x from %s@%s xmt %#010x.%08x", + msyslog(LOG_INFO, + "duplicate or replay: org 0x%x.%08x does not match 0x%x.%08x from %s@%s", ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf), peer->aorg.l_ui, peer->aorg.l_uf, - hm_str, ntoa(&peer->srcadr), - ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)); + hm_str, ntoa(&peer->srcadr)); if ( !L_ISZERO(&peer->dst) && L_ISEQU(&p_org, &peer->dst)) { /* Might be the start of an interleave */ @@ -2474,8 +2526,10 @@ receive( * more flashers. Leave if the packet is not good. */ process_packet(peer, pkt, rbufp->recv_length); - if (peer->flash & PKT_TEST_MASK) + /* Bug 2734: TEST3 prevents initial interleave sync */ + if ((~TEST3 & peer->flash) & PKT_TEST_MASK) { return; + } /* [bug 3592] Update poll. Ideally this should not happen in a * receive branch, but too much is going on here... at least we @@ -2516,7 +2570,6 @@ process_packet( double p_offset, p_del, p_disp; l_fp p_rec, p_xmt, p_org, p_reftime, ci; u_char pmode, pleap, pversion, pstratum; - char statstr[NTP_MAXSTRLEN]; #ifdef ASSYM int itemp; double etemp, ftemp, td; @@ -2652,9 +2705,8 @@ process_packet( p_del = t21 - t34; p_offset = (t21 + t34) / 2.; if (p_del < 0 || p_del > 1.) { - snprintf(statstr, sizeof(statstr), - "t21 %.6f t34 %.6f", t21, t34); - report_event(PEVNT_XERR, peer, statstr); + mprintf_event(PEVNT_XERR, peer, + "t21 %.9f t34 %.9f", t21, t34); return; } @@ -2680,9 +2732,9 @@ process_packet( /* drop all if in the initial volley */ if (FLAG_BC_VOL & peer->flags) goto bcc_init_volley_fail; - snprintf(statstr, sizeof(statstr), - "offset %.6f delay %.6f", t21, t34); - report_event(PEVNT_XERR, peer, statstr); + mprintf_event(PEVNT_XERR, peer, + "offset %.9f delay %.9f", + t21, t34); return; } p_offset = t21; @@ -2981,20 +3033,6 @@ clock_update( if (crypto_flags) crypto_update(); #endif /* AUTOKEY */ - /* - * If our parent process is waiting for the - * first clock sync, send them home satisfied. - */ -#ifdef HAVE_WORKING_FORK - if (daemon_pipe[1] != -1) { - if (2 != write(daemon_pipe[1], "S\n", 2)) { - msyslog(LOG_ERR, "daemon failed to notify parent ntpd (--wait-sync)"); - } - close(daemon_pipe[1]); - daemon_pipe[1] = -1; - DPRINTF(1, ("notified parent --wait-sync is done\n")); - } -#endif /* HAVE_WORKING_FORK */ } @@ -3150,7 +3188,7 @@ poll_update( if ( 0 != sub || 0 != qty) { - do { + do { val = ntp_random() & msk; } while (val > qty); @@ -3193,8 +3231,9 @@ peer_clear( const char *ident /* tally lights */ ) { - u_char u; - l_fp bxmt = peer->bxmt; /* bcast clients retain this! */ + static u_long earliest; + u_char u; + l_fp bxmt = peer->bxmt; /* bcast clients retain this! */ #ifdef AUTOKEY /* @@ -3271,6 +3310,11 @@ peer_clear( peer->nextdate += peer_associations; } else if (!(FLAG_CONFIG & peer->flags)) { peer->nextdate += ntp_minpkt + 1; + /* space out manycastclient first polls */ + if (peer->nextdate < earliest) { + peer->nextdate = earliest; + } + earliest = peer->nextdate + 1; } else { peer->nextdate += ntp_random() % (1 << peer->minpoll); } @@ -3296,10 +3340,10 @@ clock_filter( ) { double dst[NTP_SHIFT]; /* distance vector */ - int ord[NTP_SHIFT]; /* index vector */ - int i, j, k, m; + u_char ord[NTP_SHIFT]; /* index vector */ + short i, j; + u_char k, m; double dtemp, etemp; - char tbuf[80]; /* * A sample consists of the offset, delay, dispersion and epoch @@ -3316,7 +3360,7 @@ clock_filter( peer->filter_disp[j] = sample_disp; peer->filter_epoch[j] = current_time; j = (j + 1) % NTP_SHIFT; - peer->filter_nextpt = j; + peer->filter_nextpt = (u_char)j; /* * Update dispersions since the last update and at the same @@ -3344,7 +3388,7 @@ clock_filter( } else { dst[i] = peer->filter_delay[j]; } - ord[i] = j; + ord[i] = (u_char)j; j = (j + 1) % NTP_SHIFT; } @@ -3377,7 +3421,7 @@ clock_filter( */ m = 0; for (i = 0; i < NTP_SHIFT; i++) { - peer->filter_order[i] = (u_char) ord[i]; + peer->filter_order[i] = ord[i]; if ( dst[i] >= MAXDISPERSE || (m >= 2 && dst[i] >= sys_maxdist)) continue; @@ -3394,11 +3438,12 @@ clock_filter( k = ord[0]; for (i = NTP_SHIFT - 1; i >= 0; i--) { j = ord[i]; - peer->disp = NTP_FWEIGHT * (peer->disp + - peer->filter_disp[j]); - if (i < m) + peer->disp = NTP_FWEIGHT * ( peer->disp + + peer->filter_disp[j]); + if (i < m) { peer->jitter += DIFF(peer->filter_offset[j], - peer->filter_offset[k]); + peer->filter_offset[k]); + } } /* @@ -3407,15 +3452,16 @@ clock_filter( * save the offset, delay and jitter. Note the jitter must not * be less than the precision. */ - if (m == 0) { + if (0 == m) { clock_select(); return; } etemp = fabs(peer->offset - peer->filter_offset[k]); peer->offset = peer->filter_offset[k]; peer->delay = peer->filter_delay[k]; - if (m > 1) + if (m > 1) { peer->jitter /= m - 1; + } peer->jitter = max(SQRT(peer->jitter), LOGTOD(sys_precision)); /* @@ -3428,23 +3474,22 @@ clock_filter( if ( peer->disp < sys_maxdist && peer->filter_disp[k] < sys_maxdist && etemp > CLOCK_SGATE * peer->jitter - && peer->filter_epoch[k] - peer->epoch + && peer->filter_epoch[k] - peer->epoch < 2. * ULOGTOD(peer->hpoll)) { - snprintf(tbuf, sizeof(tbuf), "%.6f s", etemp); - report_event(PEVNT_POPCORN, peer, tbuf); + mprintf_event(PEVNT_POPCORN, peer, "%.9f s", etemp); return; } /* * A new minimum sample is useful only if it is later than the * last one used. In this design the maximum lifetime of any - * sample is not greater than eight times the poll interval, so - * the maximum interval between minimum samples is eight - * packets. + * sample is not greater than NTP_SHIFT (8) times the poll + * interval, so the maximum interval between minimum samples is + * NTP_SHIFT packets. */ if (peer->filter_epoch[k] <= peer->epoch) { - DPRINTF(2, ("clock_filter: old sample %lu\n", current_time - - peer->filter_epoch[k])); + DPRINTF(2, ("clock_filter: old sample %lu s\n", + current_time - peer->filter_epoch[k])); return; } peer->epoch = peer->filter_epoch[k]; @@ -3454,13 +3499,14 @@ clock_filter( * processing. If not synchronized or not in a burst, tickle the * clock select algorithm. */ - record_peer_stats(&peer->srcadr, ctlpeerstatus(peer), - peer->offset, peer->delay, peer->disp, peer->jitter); - DPRINTF(1, ("clock_filter: n %d off %.6f del %.6f dsp %.6f jit %.6f\n", - m, peer->offset, peer->delay, peer->disp, + record_peer_stats(&peer->srcadr, ctlpeerstatus(peer), peer->offset, + peer->delay, peer->disp, peer->jitter); + DPRINTF(1, ("clock_filter: n %hu off %.9f del %.9f dsp %.9f jit %.9f\n", + (u_short)m, peer->offset, peer->delay, peer->disp, peer->jitter)); - if (peer->burst == 0 || sys_leap == LEAP_NOTINSYNC) + if (0 == peer->burst || LEAP_NOTINSYNC == sys_leap) { clock_select(); + } } @@ -3854,7 +3900,7 @@ clock_select(void) || ((FLAG_TRUE | FLAG_PREFER) & peers[k].peer->flags)) break; - DPRINTF(3, ("select: drop %s seljit %.6f jit %.6f\n", + DPRINTF(3, ("select: drop %s seljit %.9f jit %.9f\n", ntoa(&peers[k].peer->srcadr), g, d)); if (nlist > sys_maxclock) peers[k].peer->new_status = CTL_PST_SEL_EXCESS; @@ -3933,13 +3979,13 @@ clock_select(void) sys_clockhop = 0; } else if ((x = fabs(typesystem->offset - osys_peer->offset)) < sys_mindisp) { - if (sys_clockhop == 0) + if (0 == sys_clockhop) sys_clockhop = sys_mindisp; else sys_clockhop *= .5; - DPRINTF(1, ("select: clockhop %d %.6f %.6f\n", + DPRINTF(1, ("select: clockhop %d %.9f %.9f\n", j, x, sys_clockhop)); - if (fabs(x) < sys_clockhop) + if (x < sys_clockhop) typesystem = osys_peer; else sys_clockhop = 0; @@ -4108,9 +4154,9 @@ peer_xmit( keyid_t xkeyid = 0; /* transmit key ID */ l_fp xmt_tx, xmt_ty; - if (!peer->dstadr) /* drop peers without interface */ + if (!peer->dstadr) { /* can't send */ return; - + } xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, peer->version, peer->hmode); xpkt.stratum = STRATUM_TO_PKT(sys_stratum); @@ -4188,9 +4234,8 @@ peer_xmit( } L_SUB(&xmt_ty, &xmt_tx); LFPTOD(&xmt_ty, peer->xleave); - DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d len %zu xmt %#010x.%08x\n", - current_time, - peer->dstadr ? stoa(&peer->dstadr->sin) : "-", + DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d len %zu xmt 0x%x.%08x\n", + current_time, latoa(peer->dstadr), stoa(&peer->srcadr), peer->hmode, sendlen, xmt_tx.l_ui, xmt_tx.l_uf)); return; @@ -4477,8 +4522,8 @@ peer_xmit( authtrust(xkeyid, 0); #endif /* AUTOKEY */ if (sendlen > sizeof(xpkt)) { - msyslog(LOG_ERR, "peer_xmit: buffer overflow %zu", sendlen); - exit (-1); + msyslog(LOG_ERR, "peer_xmit: buffer overflow %u", (u_int)sendlen); + exit(EX_SOFTWARE); } peer->t21_bytes = sendlen; sendpkt(&peer->srcadr, peer->dstadr, @@ -4502,9 +4547,8 @@ peer_xmit( LFPTOD(&xmt_ty, peer->xleave); #ifdef AUTOKEY DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %zu index %d\n", - current_time, latoa(peer->dstadr), - ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen, - peer->keynumber)); + current_time, latoa(peer->dstadr), stoa(&peer->srcadr), + peer->hmode, xkeyid, sendlen, peer->keynumber)); #else /* !AUTOKEY follows */ DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %zu\n", current_time, peer->dstadr ? @@ -4543,14 +4587,14 @@ leap_smear_add_offs( */ static void fast_xmit( - struct recvbuf *rbufp, /* receive packet pointer */ + struct recvbuf* rbufp, /* receive packet pointer */ int xmode, /* receive mode */ /* XXX: HMS: really? */ keyid_t xkeyid, /* transmit key ID */ int flags /* restrict mask */ - ) +) { struct pkt xpkt; /* transmit packet structure */ - struct pkt *rpkt; /* receive packet structure */ + struct pkt* rpkt; /* receive packet structure */ l_fp xmt_tx, xmt_ty; size_t sendlen; #ifdef AUTOKEY @@ -4564,13 +4608,26 @@ fast_xmit( * the system minimum poll (ntp_minpoll). This is for KoD rate * control and not strictly specification compliant, but doesn't * break anything. - * - * If the gazinta was from a multicast address, the gazoutta - * must go out another way. */ rpkt = &rbufp->recv_pkt; - if (rbufp->dstadr->flags & INT_MCASTOPEN) + /* + * If the packet was received on an endpoint open only on + * a multicast address, the response needs to go out from + * a unicast endpoint. + */ +#ifndef MULTICAST_NONEWSOCKET + if (rbufp->dstadr->flags & INT_MCASTOPEN) { rbufp->dstadr = findinterface(&rbufp->recv_srcadr); + if (NULL == rbufp->dstadr || + ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr) /* wildcard */ + == rbufp->dstadr) { + DPRINTF(2, ("No unicast local address found for" + " reply to %s mcast.", + stoa(&rbufp->recv_srcadr))); + return; + } + } +#endif /* * If this is a kiss-o'-death (KoD) packet, show leap @@ -4802,15 +4859,14 @@ pool_xmit( ) { #ifdef WORKER - struct pkt xpkt; /* transmit packet structure */ - struct addrinfo hints; - int rc; - struct interface * lcladr; - sockaddr_u * rmtadr; - r4addr r4a; - u_short restrict_mask; - struct peer * p; - l_fp xmt_tx; + struct pkt xpkt; /* transmit packet structure */ + struct addrinfo hints; + int rc; + endpt * lcladr; + sockaddr_u * rmtadr; + u_short af; + struct peer * p; + l_fp xmt_tx; DEBUG_REQUIRE(pool); if (NULL == pool->ai) { @@ -4819,6 +4875,16 @@ pool_xmit( free(pool->addrs); pool->addrs = NULL; } + af = AF(&pool->srcadr); + if ( (AF_INET == af && !nonlocal_v4_addr_up) + || (AF_INET6 == af && !nonlocal_v6_addr_up) + || ( AF_UNSPEC == af + && !nonlocal_v4_addr_up + && !nonlocal_v6_addr_up)) { + + /* POOL DNS query would be useless [Bug 3845] */ + return; + } ZERO(hints); hints.ai_family = AF(&pool->srcadr); hints.ai_socktype = SOCK_DGRAM; @@ -4845,15 +4911,17 @@ 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; + /* do not solicit when hopeless [Bug 3845] */ + if ( (IS_IPV4(rmtadr) && !nonlocal_v4_addr_up) + || (IS_IPV6(rmtadr) && !nonlocal_v6_addr_up)) { + continue; + } p = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT, 0, NULL); } while (p != NULL && pool->ai != NULL); - if (p != NULL) + if (p != NULL) { return; /* out of addresses, re-query DNS next poll */ - restrictions(rmtadr, &r4a); - restrict_mask = r4a.rflags; - if (RES_FLAGS & restrict_mask) - restrict_source(rmtadr, 0, - current_time + POOL_SOLICIT_WINDOW + 1); + } + restrict_source(rmtadr, FALSE, 1 + POOL_SOLICIT_WINDOW); lcladr = findinterface(rmtadr); memset(&xpkt, 0, sizeof(xpkt)); xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, pool->version, @@ -4867,7 +4935,6 @@ pool_xmit( /* Bug 3596: What are the pros/cons of using sys_reftime here? */ HTONL_FP(&sys_reftime, &xpkt.reftime); - /* HMS: the following is better done after the ntp_random() calls */ get_systime(&xmt_tx); pool->aorg = xmt_tx; @@ -4886,14 +4953,14 @@ pool_xmit( L_CLR(&pool->nonce); HTONL_FP(&xmt_tx, &xpkt.xmt); } - sendpkt(rmtadr, lcladr, - sys_ttl[(pool->ttl >= sys_ttlmax) ? sys_ttlmax : pool->ttl], - &xpkt, LEN_PKT_NOMAC); pool->sent++; pool->throttle += (1 << pool->minpoll) - 2; DPRINTF(1, ("pool_xmit: at %ld %s->%s pool\n", current_time, latoa(lcladr), stoa(rmtadr))); msyslog(LOG_INFO, "Soliciting pool server %s", stoa(rmtadr)); + sendpkt(rmtadr, lcladr, + sys_ttl[(pool->ttl >= sys_ttlmax) ? sys_ttlmax : pool->ttl], + &xpkt, LEN_PKT_NOMAC); #endif /* WORKER */ } @@ -4999,8 +5066,18 @@ key_expire( /* - * local_refid(peer) - check peer refid to avoid selecting peers + * local_refid(peer) - Check peer refid to avoid selecting peers * currently synced to this ntpd. + * Note that until 4.2.8p18 and 4.3.1XX ntpd calculated the IPv6 + * refid differently on different-endian systems. It now calculates + * the refid the same on both, the same way it did on little-endian + * in the past. On big-endian systems, ntpd also calculates a + * byte-swapped version of each of its IPv6 local addresses' refids, + * as endpt.old_refid and also detects a loop when seeing it. This + * ensures new BE ntpd will detect loops interoperating with older + * BE ntpd, and keeps the more-common LE old ntpd code detecting + * loops with IPv6 refids correctly. Thanks to Hal Murray for + * the byte-swapping idea. */ static int local_refid( @@ -5014,10 +5091,17 @@ local_refid( else unicast_ep = findinterface(&p->srcadr); - if (unicast_ep != NULL && p->refid == unicast_ep->addr_refid) + if (unicast_ep != NULL + && ( p->refid == unicast_ep->addr_refid +#ifdef WORDS_BIGENDIAN + || ( IS_IPV6(&unicast_ep->sin) + && p->refid == unicast_ep->old_refid) +#endif + )) { return TRUE; - else + } else { return FALSE; + } } diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c index a16c980e5b09..d96a524c8841 100644 --- a/ntpd/ntp_refclock.c +++ b/ntpd/ntp_refclock.c @@ -72,8 +72,6 @@ static int refclock_cmpl_fp (const void *, const void *); static int refclock_sample (struct refclockproc *); static int refclock_ioctl(int, u_int); static void refclock_checkburst(struct peer *, struct refclockproc *); -static int symBaud2numBaud(int symBaud); -static int numBaud2symBaud(int numBaud); /* circular buffer functions * @@ -841,9 +839,9 @@ refclock_fdwrite( } else if (nret != len) { nerr = errno; msyslog(LOG_NOTICE, - "%s: %s shortened, fd=%d, wrote %zu of %zu bytes", + "%s: %s shortened, fd=%d, wrote %u of %u bytes", refnumtoa(&peer->srcadr), what, - fd, nret, len); + fd, (u_int)nret, (u_int)len); errno = nerr; } } @@ -1651,7 +1649,7 @@ refclock_pps( * ------------------------------------------------------------------- */ -int/*BOOL*/ +int refclock_ppsaugment( const struct refclock_atom * ap , /* for PPS io */ l_fp * rcvtime , @@ -1826,10 +1824,11 @@ refclock_vformat_lcode( long len; len = vsnprintf(pp->a_lastcode, sizeof(pp->a_lastcode), fmt, va); - if (len <= 0) + if (len <= 0) { len = 0; - else if (len >= sizeof(pp->a_lastcode)) + } else if (len >= sizeof(pp->a_lastcode)) { len = sizeof(pp->a_lastcode) - 1; + } pp->lencode = (u_short)len; pp->a_lastcode[len] = '\0'; @@ -1850,47 +1849,4 @@ refclock_format_lcode( va_end(va); } -static const int baudTable[][2] = { - {B0, 0}, - {B50, 50}, - {B75, 75}, - {B110, 110}, - {B134, 134}, - {B150, 150}, - {B200, 200}, - {B300, 300}, - {B600, 600}, - {B1200, 1200}, - {B1800, 1800}, - {B2400, 2400}, - {B4800, 4800}, - {B9600, 9600}, - {B19200, 19200}, - {B38400, 38400}, -# ifdef B57600 - {B57600, 57600 }, -# endif -# ifdef B115200 - {B115200, 115200}, -# endif - {-1, -1} -}; - - -static int symBaud2numBaud(int symBaud) -{ - int i; - for (i = 0; baudTable[i][1] >= 0; ++i) - if (baudTable[i][0] == symBaud) - break; - return baudTable[i][1]; -} -static int numBaud2symBaud(int numBaud) -{ - int i; - for (i = 0; baudTable[i][1] >= 0; ++i) - if (baudTable[i][1] == numBaud) - break; - return baudTable[i][0]; -} -#endif /* REFCLOCK */ +#endif /* REFCLOCK */ diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c index e61d014808de..89c051b64f0b 100644 --- a/ntpd/ntp_request.c +++ b/ntpd/ntp_request.c @@ -1790,6 +1790,7 @@ do_restrict( sockaddr_u matchaddr; sockaddr_u matchmask; int bad; + int/*BOOL*/ success; switch(op) { case RESTRICT_FLAGS: @@ -1838,7 +1839,7 @@ do_restrict( } if (bad) { - msyslog(LOG_ERR, "do_restrict: bad = %#x", bad); + msyslog(LOG_ERR, "%s: bad = 0x%x", __func__, bad); req_ack(srcadr, inter, inpkt, INFO_ERR_FMT); return; } @@ -1868,8 +1869,16 @@ do_restrict( NSRCADR(&matchaddr) = cr.addr; NSRCADR(&matchmask) = cr.mask; } - hack_restrict(op, &matchaddr, &matchmask, cr.mflags, - cr.ippeerlimit, cr.flags, 0); + success = hack_restrict(op, &matchaddr, &matchmask, + cr.ippeerlimit, cr.mflags, + cr.flags, 0); + if (!success) { + DPRINTF(1, ("%s: %s %s mask %s ippeerlimit %hd %s %s failed", + __func__, resop_str(op), + stoa(&matchaddr), stoa(&matchmask), + cr.ippeerlimit, mflags_str(cr.mflags), + rflags_str(cr.flags))); + } datap += item_sz; } diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c index fe2935d9e071..f1df8ccf3079 100644 --- a/ntpd/ntp_restrict.c +++ b/ntpd/ntp_restrict.c @@ -15,21 +15,11 @@ #include "ntp_assert.h" /* - * This code keeps a simple address-and-mask list of hosts we want - * to place restrictions on (or remove them from). The restrictions - * are implemented as a set of flags which tell you what the host - * can't do. There is a subroutine entry to return the flags. The - * list is kept sorted to reduce the average number of comparisons - * and make sure you get the set of restrictions most specific to - * the address. - * - * The algorithm is that, when looking up a host, it is first assumed - * that the default set of restrictions will apply. It then searches - * down through the list. Whenever it finds a match it adopts the - * match's flags instead. When you hit the point where the sorted - * address is greater than the target, you return with the last set of - * flags you found. Because of the ordering of the list, the most - * specific match will provide the final set of flags. + * This code keeps a simple address-and-mask list of addressses we want + * to place restrictions on (or remove them from). The restrictions are + * implemented as a set of flags which tell you what matching addresses + * can't do. The list is sorted retrieve the restrictions most specific +* to the address. * * This was originally intended to restrict you from sync'ing to your * own broadcasts when you are doing that, by restricting yourself from @@ -38,27 +28,23 @@ * has been expanded, however, to suit the needs of those with more * restrictive access policies. */ -/* - * We will use two lists, one for IPv4 addresses and one for IPv6 - * addresses. This is not protocol-independant but for now I can't - * find a way to respect this. We'll check this later... JFB 07/2001 - */ #define MASK_IPV6_ADDR(dst, src, msk) \ do { \ - int idx; \ - for (idx = 0; idx < (int)COUNTOF((dst)->s6_addr); idx++) { \ - (dst)->s6_addr[idx] = (src)->s6_addr[idx] \ - & (msk)->s6_addr[idx]; \ + int x; \ + \ + for (x = 0; x < (int)COUNTOF((dst)->s6_addr); x++) { \ + (dst)->s6_addr[x] = (src)->s6_addr[x] \ + & (msk)->s6_addr[x]; \ } \ - } while (0) + } while (FALSE) /* * We allocate INC_RESLIST{4|6} entries to the free list whenever empty. - * Auto-tune these to be just less than 1KB (leaving at least 16 bytes + * Auto-tune these to be just less than 1KB (leaving at least 32 bytes * for allocator overhead). */ -#define INC_RESLIST4 ((1024 - 16) / V4_SIZEOF_RESTRICT_U) -#define INC_RESLIST6 ((1024 - 16) / V6_SIZEOF_RESTRICT_U) +#define INC_RESLIST4 ((1024 - 32) / V4_SIZEOF_RESTRICT_U) +#define INC_RESLIST6 ((1024 - 32) / V6_SIZEOF_RESTRICT_U) /* * The restriction list @@ -103,30 +89,35 @@ static short restrict_source_ippeerlimit; /* * private functions */ -static restrict_u * alloc_res4(void); -static restrict_u * alloc_res6(void); -static void free_res(restrict_u *, int); -static void inc_res_limited(void); -static void dec_res_limited(void); -static restrict_u * match_restrict4_addr(u_int32, u_short); -static restrict_u * match_restrict6_addr(const struct in6_addr *, +static restrict_u * alloc_res4(void); +static restrict_u * alloc_res6(void); +static void free_res(restrict_u *, int); +static inline void inc_res_limited(void); +static inline void dec_res_limited(void); +static restrict_u * match_restrict4_addr(u_int32, u_short); +static restrict_u * match_restrict6_addr(const struct in6_addr *, u_short); -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); +static restrict_u * match_restrict_entry(const restrict_u *, int); +static inline int/*BOOL*/ mflags_sorts_before(u_short, u_short); +static int/*BOOL*/ res_sorts_before4(restrict_u *, restrict_u *); +static int/*BOOL*/ res_sorts_before6(restrict_u *, restrict_u *); +typedef int (*res_sort_fn)(restrict_u *, restrict_u *); + + +/* dump_restrict() & dump_restricts() are DEBUG-only */ +#ifdef DEBUG +static void dump_restrict(restrict_u *, int); -void dump_restricts(void); /* - * dump_restrict - spit out a restrict_u + * dump_restrict - spit out a single restriction entry */ static void dump_restrict( restrict_u * res, int is_ipv6 - ) +) { char as[INET6_ADDRSTRLEN]; char ms[INET6_ADDRSTRLEN]; @@ -135,57 +126,47 @@ dump_restrict( 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) }; + struct in_addr sia, sim; + sia.s_addr = htonl(res->u.v4.addr); + sim.s_addr = htonl(res->u.v4.addr); 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 %08x, mflags %04x, ippeerlimit %d, expire %lu, next %p\n", - res, as, ms, res->count, res->rflags, res->mflags, - res->ippeerlimit, res->expire, res->link); - return; + printf("%s/%s: hits %u ippeerlimit %hd mflags %s rflags %s", + as, ms, res->count, res->ippeerlimit, + mflags_str(res->mflags), + rflags_str(res->rflags)); + if (res->expire > 0) { + printf(" expire %u\n", res->expire); + } else { + printf("\n"); + } } /* - * dump_restricts - spit out the 'restrict' lines + * dump_restricts - spit out the 'restrict' entries */ void dump_restricts(void) { 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) { + printf("dump_restricts: restrictlist4: %p\n", restrictlist4); + for (res = restrictlist4; res != NULL; res = res->link) { 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) { + printf("dump_restricts: restrictlist6: %p\n", restrictlist6); + for (res = restrictlist6; res != NULL; res = res->link) { dump_restrict(res, 1); - next = res->link; } - - return; } +#endif /* DEBUG - dump_restrict() / dump_restricts() */ + /* * init_restrict - initialize the restriction data structures @@ -194,7 +175,7 @@ void init_restrict(void) { /* - * The restriction lists begin with a default entry with address + * The restriction lists end with a default entry with address * and mask 0, which will match any entry. The lists are kept * sorted by descending address followed by descending mask: * @@ -215,11 +196,20 @@ init_restrict(void) * * An additional wrinkle is we may have multiple entries with * the same address and mask but differing match flags (mflags). - * At present there is only one, RESM_NTPONLY. Entries with - * RESM_NTPONLY are sorted earlier so they take precedence over - * any otherwise similar entry without. Again, this is the same - * behavior as but reversed implementation compared to the docs. - * + * We want to never talk to ourself, so RES_IGNORE entries for + * each local address are added by ntp_io.c with a host mask and + * both RESM_INTERFACE and RESM_NTPONLY set. We sort those + * entries before entries without those flags to achieve this. + * The remaining match flag is RESM_SOURCE, used to dynamically + * set restrictions for each peer based on the prototype set by + * "restrict source" in the configuration. We want those entries + * to be considered only when there is not a static host + * restriction for the address in the configuration, to allow + * operators to blacklist pool and manycast servers at runtime as + * desired using ntpq runtime configuration. Such static entries + * have no RESM_ bits set, so the sort order for mflags is first + * RESM_INTERFACE, then entries without RESM_SOURCE, finally the + * remaining. */ restrict_def4.ippeerlimit = -1; /* Cleaner if we have C99 */ @@ -236,14 +226,14 @@ alloc_res4(void) { const size_t cb = V4_SIZEOF_RESTRICT_U; const size_t count = INC_RESLIST4; - restrict_u * rl; - restrict_u * res; + restrict_u* rl; + restrict_u* res; size_t i; UNLINK_HEAD_SLIST(res, resfree4, link); - if (res != NULL) + if (res != NULL) { return res; - + } rl = eallocarray(count, cb); /* link all but the first onto free list */ res = (void *)((char *)rl + (count - 1) * cb); @@ -251,7 +241,7 @@ alloc_res4(void) LINK_SLIST(resfree4, res, link); res = (void *)((char *)res - cb); } - INSIST(rl == res); + DEBUG_INSIST(rl == res); /* allocate the first */ return res; } @@ -267,9 +257,9 @@ alloc_res6(void) size_t i; UNLINK_HEAD_SLIST(res, resfree6, link); - if (res != NULL) + if (res != NULL) { return res; - + } rl = eallocarray(count, cb); /* link all but the first onto free list */ res = (void *)((char *)rl + (count - 1) * cb); @@ -277,7 +267,7 @@ alloc_res6(void) LINK_SLIST(resfree6, res, link); res = (void *)((char *)res - cb); } - INSIST(rl == res); + DEBUG_INSIST(rl == res); /* allocate the first */ return res; } @@ -289,46 +279,48 @@ free_res( int v6 ) { - restrict_u ** plisthead; + restrict_u ** rlisthead_ptr; + restrict_u ** flisthead_ptr; restrict_u * unlinked; + size_t sz; restrictcount--; - if (RES_LIMITED & res->rflags) + if (RES_LIMITED & res->rflags) { dec_res_limited(); - - if (v6) - plisthead = &restrictlist6; - else - plisthead = &restrictlist4; - UNLINK_SLIST(unlinked, *plisthead, res, link, restrict_u); - INSIST(unlinked == res); - + } if (v6) { - zero_mem(res, V6_SIZEOF_RESTRICT_U); - plisthead = &resfree6; + rlisthead_ptr = &restrictlist6; + flisthead_ptr = &resfree6; + sz = V6_SIZEOF_RESTRICT_U; } else { - zero_mem(res, V4_SIZEOF_RESTRICT_U); - plisthead = &resfree4; + rlisthead_ptr = &restrictlist4; + flisthead_ptr = &resfree4; + sz = V4_SIZEOF_RESTRICT_U; } - LINK_SLIST(*plisthead, res, link); + UNLINK_SLIST(unlinked, *rlisthead_ptr, res, link, restrict_u); + INSIST(unlinked == res); + zero_mem(res, sz); + LINK_SLIST(*flisthead_ptr, res, link); } -static void +static inline void inc_res_limited(void) { - if (!res_limited_refcnt) + if (0 == res_limited_refcnt) { mon_start(MON_RES); + } res_limited_refcnt++; } -static void +static inline void dec_res_limited(void) { res_limited_refcnt--; - if (!res_limited_refcnt) + if (0 == res_limited_refcnt) { mon_stop(MON_RES); + } } @@ -338,26 +330,21 @@ match_restrict4_addr( u_short port ) { - const int v6 = 0; + const int v6 = FALSE; restrict_u * res; restrict_u * next; for (res = restrictlist4; res != NULL; res = next) { - struct in_addr sia = { htonl(res->u.v4.addr) }; - next = res->link; - DPRINTF(2, ("match_restrict4_addr: Checking %s, port %d ... ", - inet_ntoa(sia), port)); - if ( res->expire - && res->expire <= current_time) + 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; } @@ -369,22 +356,23 @@ match_restrict6_addr( u_short port ) { - const int v6 = 1; + const int v6 = TRUE; restrict_u * res; restrict_u * next; struct in6_addr masked; for (res = restrictlist6; res != NULL; res = next) { next = res->link; - INSIST(next != res); - if (res->expire && - res->expire <= current_time) + if (res->expire && res->expire <= current_time) { free_res(res, v6); + } MASK_IPV6_ADDR(&masked, addr, &res->u.v6.mask); if (ADDR6_EQ(&masked, &res->u.v6.addr) - && (!(RESM_NTPONLY & res->mflags) - || NTP_PORT == (int)port)) + && ( !(RESM_NTPONLY & res->mflags) + || NTP_PORT == (int)port)) { + break; + } } return res; } @@ -417,22 +405,47 @@ match_restrict_entry( cb = sizeof(pmatch->u.v4); } - for (res = rlist; res != NULL; res = res->link) + for (res = rlist; res != NULL; res = res->link) { if (res->mflags == pmatch->mflags && - !memcmp(&res->u, &pmatch->u, cb)) + !memcmp(&res->u, &pmatch->u, cb)) { break; + } + } return res; } /* - * res_sorts_before4 - compare two restrict4 entries + * mflags_sorts_before - common mflags sorting code + * + * See block comment in init_restrict() above for rationale. + */ +static inline int/*BOOL*/ +mflags_sorts_before( + u_short m1, + u_short m2 + ) +{ + if ( (RESM_INTERFACE & m1) + && !(RESM_INTERFACE & m2)) { + return TRUE; + } else if ( !(RESM_SOURCE & m1) + && (RESM_SOURCE & m2)) { + return TRUE; + } else { + return FALSE; + } +} + + +/* + * res_sorts_before4 - compare IPv4 restriction entries * * Returns nonzero if r1 sorts before r2. We sort by descending - * address, then descending mask, then descending mflags, so sorting - * before means having a higher value. + * address, then descending mask, then an intricate mflags sort + * order explained in a block comment near the top of this file. */ -static int +static int/*BOOL*/ res_sorts_before4( restrict_u *r1, restrict_u *r2 @@ -440,54 +453,53 @@ res_sorts_before4( { int r1_before_r2; - if (r1->u.v4.addr > r2->u.v4.addr) - r1_before_r2 = 1; - else if (r1->u.v4.addr < r2->u.v4.addr) - r1_before_r2 = 0; - else if (r1->u.v4.mask > r2->u.v4.mask) - r1_before_r2 = 1; - else if (r1->u.v4.mask < r2->u.v4.mask) - r1_before_r2 = 0; - else if (r1->mflags > r2->mflags) - r1_before_r2 = 1; - else - r1_before_r2 = 0; + if (r1->u.v4.addr > r2->u.v4.addr) { + r1_before_r2 = TRUE; + } else if (r1->u.v4.addr < r2->u.v4.addr) { + r1_before_r2 = FALSE; + } else if (r1->u.v4.mask > r2->u.v4.mask) { + r1_before_r2 = TRUE; + } else if (r1->u.v4.mask < r2->u.v4.mask) { + r1_before_r2 = FALSE; + } else { + r1_before_r2 = mflags_sorts_before(r1->mflags, r2->mflags); + } return r1_before_r2; } /* - * res_sorts_before6 - compare two restrict6 entries + * res_sorts_before6 - compare IPv6 restriction entries * * Returns nonzero if r1 sorts before r2. We sort by descending - * address, then descending mask, then descending mflags, so sorting - * before means having a higher value. + * address, then descending mask, then an intricate mflags sort + * order explained in a block comment near the top of this file. */ -static int +static int/*BOOL*/ res_sorts_before6( - restrict_u *r1, - restrict_u *r2 - ) + restrict_u* r1, + restrict_u* r2 +) { int r1_before_r2; int cmp; cmp = ADDR6_CMP(&r1->u.v6.addr, &r2->u.v6.addr); - if (cmp > 0) /* r1->addr > r2->addr */ - r1_before_r2 = 1; - else if (cmp < 0) /* r2->addr > r1->addr */ - r1_before_r2 = 0; - else { + if (cmp > 0) { /* r1->addr > r2->addr */ + r1_before_r2 = TRUE; + } else if (cmp < 0) { /* r2->addr > r1->addr */ + r1_before_r2 = FALSE; + } else { cmp = ADDR6_CMP(&r1->u.v6.mask, &r2->u.v6.mask); - if (cmp > 0) /* r1->mask > r2->mask*/ - r1_before_r2 = 1; - else if (cmp < 0) /* r2->mask > r1->mask */ - r1_before_r2 = 0; - else if (r1->mflags > r2->mflags) - r1_before_r2 = 1; - else - r1_before_r2 = 0; + if (cmp > 0) { /* r1->mask > r2->mask*/ + r1_before_r2 = TRUE; + } else if (cmp < 0) { /* r2->mask > r1->mask */ + r1_before_r2 = FALSE; + } else { + r1_before_r2 = mflags_sorts_before(r1->mflags, + r2->mflags); + } } return r1_before_r2; @@ -506,15 +518,10 @@ restrictions( restrict_u *match; struct in6_addr *pin6; - REQUIRE(NULL != r4a); + DEBUG_REQUIRE(NULL != r4a); res_calls++; - r4a->rflags = RES_IGNORE; - r4a->ippeerlimit = 0; - DPRINTF(1, ("restrictions: looking up %s\n", stoa(srcadr))); - - /* IPv4 source address */ if (IS_IPV4(srcadr)) { /* * Ignore any packets with a multicast source address @@ -522,16 +529,12 @@ restrictions( * not later!) */ 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; + goto multicast; } match = match_restrict4_addr(SRCADR(srcadr), SRCPORT(srcadr)); - - INSIST(match != NULL); - + DEBUG_INSIST(match != NULL); match->count++; /* * res_not_found counts only use of the final default @@ -544,10 +547,9 @@ restrictions( res_found++; r4a->rflags = match->rflags; r4a->ippeerlimit = match->ippeerlimit; - } + } else { + DEBUG_REQUIRE(IS_IPV6(srcadr)); - /* IPv6 source address */ - if (IS_IPV6(srcadr)) { pin6 = PSOCK_ADDR6(srcadr); /* @@ -555,11 +557,11 @@ restrictions( * (this should be done early in the receive process, * not later!) */ - if (IN6_IS_ADDR_MULTICAST(pin6)) - return; - + if (IN6_IS_ADDR_MULTICAST(pin6)) { + goto multicast; + } match = match_restrict6_addr(pin6, SRCPORT(srcadr)); - INSIST(match != NULL); + DEBUG_INSIST(match != NULL); match->count++; if (&restrict_def6 == match) res_not_found++; @@ -570,32 +572,34 @@ restrictions( } return; -} + multicast: + r4a->rflags = RES_IGNORE; + r4a->ippeerlimit = 0; +} -/* - * roptoa - convert a restrict_op to a string - */ -char * -roptoa(restrict_op op) { - static char sb[30]; - switch(op) { +#ifdef DEBUG +/* display string for restrict_op */ +const char * +resop_str(restrict_op op) +{ + switch (op) { case RESTRICT_FLAGS: return "RESTRICT_FLAGS"; - case RESTRICT_UNFLAG: return "RESTRICT_UNFLAGS"; + case RESTRICT_UNFLAG: return "RESTRICT_UNFLAG"; case RESTRICT_REMOVE: return "RESTRICT_REMOVE"; case RESTRICT_REMOVEIF: return "RESTRICT_REMOVEIF"; - default: - snprintf(sb, sizeof sb, "**RESTRICT_#%d**", op); - return sb; } + DEBUG_INVARIANT(!"bad restrict_op in resop_str"); + return ""; /* silence not all paths return value warning */ } +#endif /* DEBUG */ /* * hack_restrict - add/subtract/manipulate entries on the restrict list */ -void +int/*BOOL*/ hack_restrict( restrict_op op, sockaddr_u * resaddr, @@ -603,38 +607,51 @@ hack_restrict( short ippeerlimit, u_short mflags, u_short rflags, - u_long expire + u_int32 expire ) { int v6; + int bump_res_limited = FALSE; restrict_u match; restrict_u * res; restrict_u ** plisthead; - - 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)); + res_sort_fn pfn_sort; + +#ifdef DEBUG + if (debug > 0) { + printf("hack_restrict: op %s addr %s mask %s", + resop_str(op), stoa(resaddr), stoa(resmask)); + if (ippeerlimit >= 0) { + printf(" ippeerlimit %d", ippeerlimit); + } + printf(" mflags %s rflags %s", mflags_str(mflags), + rflags_str(rflags)); + if (expire) { + printf("lifetime %u\n", + expire - (u_int32)current_time); + } else { + printf("\n"); + } + } +#endif if (NULL == resaddr) { - REQUIRE(NULL == resmask); - REQUIRE(RESTRICT_FLAGS == op); + DEBUG_REQUIRE(NULL == resmask); + DEBUG_REQUIRE(RESTRICT_FLAGS == op); + DEBUG_REQUIRE(RESM_SOURCE & mflags); restrict_source_rflags = rflags; restrict_source_mflags = mflags; restrict_source_ippeerlimit = ippeerlimit; - restrict_source_enabled = 1; - return; + restrict_source_enabled = TRUE; + DPRINTF(1, ("restrict source template saved\n")); + return TRUE; } ZERO(match); -#if 0 - /* silence VC9 potentially uninit warnings */ - // HMS: let's use a compiler-specific "enable" for this. - res = NULL; - v6 = 0; -#endif - if (IS_IPV4(resaddr)) { - v6 = 0; + DEBUG_INVARIANT(IS_IPV4(resmask)); + v6 = FALSE; /* * Get address and mask in host byte order for easy * comparison as u_int32 @@ -642,9 +659,10 @@ hack_restrict( match.u.v4.addr = SRCADR(resaddr); match.u.v4.mask = SRCADR(resmask); match.u.v4.addr &= match.u.v4.mask; - - } else if (IS_IPV6(resaddr)) { - v6 = 1; + } else { + DEBUG_INVARIANT(IS_IPV6(resaddr)); + DEBUG_INVARIANT(IS_IPV6(resmask)); + v6 = TRUE; /* * Get address and mask in network byte order for easy * comparison as byte sequences (e.g. memcmp()) @@ -652,88 +670,95 @@ hack_restrict( match.u.v6.mask = SOCK_ADDR6(resmask); MASK_IPV6_ADDR(&match.u.v6.addr, PSOCK_ADDR6(resaddr), &match.u.v6.mask); + } - } else /* not IPv4 nor IPv6 */ - REQUIRE(0); - - match.rflags = rflags; match.mflags = mflags; - match.ippeerlimit = ippeerlimit; - match.expire = expire; res = match_restrict_entry(&match, v6); switch (op) { case RESTRICT_FLAGS: /* - * Here we add bits to the rflags. If this is a - * new restriction add it. + * Here we add bits to the rflags. If we already have + * this restriction modify it. */ - if (NULL == res) { + if (NULL != res) { + if ( (RES_LIMITED & rflags) + && !(RES_LIMITED & res->rflags)) { + + bump_res_limited = TRUE; + } + res->rflags |= rflags; + res->expire = expire; + } else { + match.rflags = rflags; + match.expire = expire; + match.ippeerlimit = ippeerlimit; if (v6) { res = alloc_res6(); - memcpy(res, &match, - V6_SIZEOF_RESTRICT_U); + memcpy(res, &match, V6_SIZEOF_RESTRICT_U); plisthead = &restrictlist6; + pfn_sort = &res_sorts_before6; } else { res = alloc_res4(); - memcpy(res, &match, - V4_SIZEOF_RESTRICT_U); + memcpy(res, &match, V4_SIZEOF_RESTRICT_U); plisthead = &restrictlist4; + pfn_sort = &res_sorts_before4; } LINK_SORT_SLIST( *plisthead, res, - (v6) - ? res_sorts_before6(res, L_S_S_CUR()) - : res_sorts_before4(res, L_S_S_CUR()), + (*pfn_sort)(res, L_S_S_CUR()), link, restrict_u); restrictcount++; - if (RES_LIMITED & rflags) - inc_res_limited(); - } else { - if ( (RES_LIMITED & rflags) - && !(RES_LIMITED & res->rflags)) - inc_res_limited(); - res->rflags |= rflags; + if (RES_LIMITED & rflags) { + bump_res_limited = TRUE; + } } - - res->ippeerlimit = match.ippeerlimit; - - break; + if (bump_res_limited) { + inc_res_limited(); + } + return TRUE; case RESTRICT_UNFLAG: /* * Remove some bits from the rflags. If we didn't * find this one, just return. */ - if (res != NULL) { - if ( (RES_LIMITED & res->rflags) - && (RES_LIMITED & rflags)) - dec_res_limited(); - res->rflags &= ~rflags; + if (NULL == res) { + DPRINTF(1, ("No match for %s %s removing rflags %s\n", + stoa(resaddr), stoa(resmask), + rflags_str(rflags))); + return FALSE; } - break; + if ( (RES_LIMITED & res->rflags) + && (RES_LIMITED & rflags)) { + dec_res_limited(); + } + res->rflags &= ~rflags; + return TRUE; case RESTRICT_REMOVE: case RESTRICT_REMOVEIF: /* * Remove an entry from the table entirely if we * found one. Don't remove the default entry and - * don't remove an interface entry. + * don't remove an interface entry unless asked. */ - if (res != NULL - && (RESTRICT_REMOVEIF == op + if ( res != NULL + && ( RESTRICT_REMOVEIF == op || !(RESM_INTERFACE & res->mflags)) && res != &restrict_def4 - && res != &restrict_def6) - free_res(res, v6); - break; + && res != &restrict_def6) { - default: /* unknown op */ - INSIST(0); - break; + free_res(res, v6); + return TRUE; + } + DPRINTF(1, ("No match removing %s %s restriction\n", + stoa(resaddr), stoa(resmask))); + return FALSE; } - + /* notreached */ + return FALSE; } @@ -744,58 +769,182 @@ hack_restrict( void restrict_source( sockaddr_u * addr, - int farewell, /* 0 to add, 1 to remove */ - u_long expire /* 0 is infinite, valid until */ + int farewell, /* TRUE to remove */ + u_int32 lifetime /* seconds, 0 forever */ ) { sockaddr_u onesmask; - restrict_u * res; - int found_specific; + int/*BOOL*/ success; - if (!restrict_source_enabled || SOCK_UNSPEC(addr) || - IS_MCAST(addr) || ISREFCLOCKADR(addr)) + if ( !restrict_source_enabled || SOCK_UNSPEC(addr) + || IS_MCAST(addr) || ISREFCLOCKADR(addr)) { return; + } REQUIRE(AF_INET == AF(addr) || AF_INET6 == AF(addr)); SET_HOSTMASK(&onesmask, AF(addr)); if (farewell) { - hack_restrict(RESTRICT_REMOVE, addr, &onesmask, - -2, 0, 0, 0); - DPRINTF(1, ("restrict_source: %s removed", stoa(addr))); + success = hack_restrict(RESTRICT_REMOVE, addr, &onesmask, + 0, RESM_SOURCE, 0, 0); + if (success) { + DPRINTF(1, ("%s %s removed", __func__, + stoa(addr))); + } else { + msyslog(LOG_ERR, "%s remove %s failed", + __func__, stoa(addr)); + } return; } - /* - * If there is a specific entry for this address, hands - * off, as it is condidered more specific than "restrict - * server ...". - * However, if the specific entry found is a fleeting one - * added by pool_xmit() before soliciting, replace it - * immediately regardless of the expire value to make way - * for the more persistent entry. - */ - if (IS_IPV4(addr)) { - res = match_restrict4_addr(SRCADR(addr), SRCPORT(addr)); - INSIST(res != NULL); - found_specific = (SRCADR(&onesmask) == res->u.v4.mask); + success = hack_restrict(RESTRICT_FLAGS, addr, &onesmask, + restrict_source_ippeerlimit, + restrict_source_mflags, + restrict_source_rflags, + lifetime > 0 + ? lifetime + current_time + : 0); + if (success) { + DPRINTF(1, ("%s %s add/upd\n", __func__, + stoa(addr))); } else { - res = match_restrict6_addr(&SOCK_ADDR6(addr), - SRCPORT(addr)); - INSIST(res != NULL); - found_specific = ADDR6_EQ(&res->u.v6.mask, - &SOCK_ADDR6(&onesmask)); + msyslog(LOG_ERR, "%s %s failed", __func__, stoa(addr)); } - if (!expire && found_specific && res->expire) { - found_specific = 0; - free_res(res, IS_IPV6(addr)); +} + + +#ifdef DEBUG +/* Convert restriction RES_ flag bits into a display string */ +const char * +rflags_str( + u_short rflags + ) +{ + const size_t sz = LIB_BUFLENGTH; + char * rfs; + + LIB_GETBUF(rfs); + rfs[0] = '\0'; + + if (rflags & RES_FLAKE) { + CLEAR_BIT_IF_DEBUG(RES_FLAKE, rflags); + append_flagstr(rfs, sz, "flake"); } - if (found_specific) - return; - hack_restrict(RESTRICT_FLAGS, addr, &onesmask, - restrict_source_ippeerlimit, - restrict_source_mflags, restrict_source_rflags, expire); - DPRINTF(1, ("restrict_source: %s host restriction added\n", - stoa(addr))); + if (rflags & RES_IGNORE) { + CLEAR_BIT_IF_DEBUG(RES_IGNORE, rflags); + append_flagstr(rfs, sz, "ignore"); + } + + if (rflags & RES_KOD) { + CLEAR_BIT_IF_DEBUG(RES_KOD, rflags); + append_flagstr(rfs, sz, "kod"); + } + + if (rflags & RES_MSSNTP) { + CLEAR_BIT_IF_DEBUG(RES_MSSNTP, rflags); + append_flagstr(rfs, sz, "mssntp"); + } + + if (rflags & RES_LIMITED) { + CLEAR_BIT_IF_DEBUG(RES_LIMITED, rflags); + append_flagstr(rfs, sz, "limited"); + } + + if (rflags & RES_LPTRAP) { + CLEAR_BIT_IF_DEBUG(RES_LPTRAP, rflags); + append_flagstr(rfs, sz, "lptrap"); + } + + if (rflags & RES_NOMODIFY) { + CLEAR_BIT_IF_DEBUG(RES_NOMODIFY, rflags); + append_flagstr(rfs, sz, "nomodify"); + } + + if (rflags & RES_NOMRULIST) { + CLEAR_BIT_IF_DEBUG(RES_NOMRULIST, rflags); + append_flagstr(rfs, sz, "nomrulist"); + } + + if (rflags & RES_NOEPEER) { + CLEAR_BIT_IF_DEBUG(RES_NOEPEER, rflags); + append_flagstr(rfs, sz, "noepeer"); + } + + if (rflags & RES_NOPEER) { + CLEAR_BIT_IF_DEBUG(RES_NOPEER, rflags); + append_flagstr(rfs, sz, "nopeer"); + } + + if (rflags & RES_NOQUERY) { + CLEAR_BIT_IF_DEBUG(RES_NOQUERY, rflags); + append_flagstr(rfs, sz, "noquery"); + } + + if (rflags & RES_DONTSERVE) { + CLEAR_BIT_IF_DEBUG(RES_DONTSERVE, rflags); + append_flagstr(rfs, sz, "dontserve"); + } + + if (rflags & RES_NOTRAP) { + CLEAR_BIT_IF_DEBUG(RES_NOTRAP, rflags); + append_flagstr(rfs, sz, "notrap"); + } + + if (rflags & RES_DONTTRUST) { + CLEAR_BIT_IF_DEBUG(RES_DONTTRUST, rflags); + append_flagstr(rfs, sz, "notrust"); + } + + if (rflags & RES_SRVRSPFUZ) { + CLEAR_BIT_IF_DEBUG(RES_SRVRSPFUZ, rflags); + append_flagstr(rfs, sz, "srvrspfuz"); + } + + if (rflags & RES_VERSION) { + CLEAR_BIT_IF_DEBUG(RES_VERSION, rflags); + append_flagstr(rfs, sz, "version"); + } + + DEBUG_INVARIANT(!rflags); + + if ('\0' == rfs[0]) { + append_flagstr(rfs, sz, "(none)"); + } + + return rfs; +} + + +/* Convert restriction match RESM_ flag bits into a display string */ +const char * +mflags_str( + u_short mflags + ) +{ + const size_t sz = LIB_BUFLENGTH; + char * mfs; + + LIB_GETBUF(mfs); + mfs[0] = '\0'; + + if (mflags & RESM_NTPONLY) { + CLEAR_BIT_IF_DEBUG(RESM_NTPONLY, mflags); + append_flagstr(mfs, sz, "ntponly"); + } + + if (mflags & RESM_SOURCE) { + CLEAR_BIT_IF_DEBUG(RESM_SOURCE, mflags); + append_flagstr(mfs, sz, "source"); + } + + if (mflags & RESM_INTERFACE) { + CLEAR_BIT_IF_DEBUG(RESM_INTERFACE, mflags); + append_flagstr(mfs, sz, "interface"); + } + + DEBUG_INVARIANT(!mflags); + + return mfs; } +#endif /* DEBUG */ diff --git a/ntpd/ntp_scanner.c b/ntpd/ntp_scanner.c index 08c203c63e8a..531d66024982 100644 --- a/ntpd/ntp_scanner.c +++ b/ntpd/ntp_scanner.c @@ -34,7 +34,7 @@ * ------------------------ */ -#define MAX_LEXEME (1024 + 1) /* The maximum size of a lexeme */ +#define MAX_LEXEME 128 /* The maximum size of a lexeme */ char yytext[MAX_LEXEME]; /* Buffer for storing the input text/lexeme */ u_int32 conf_file_sum; /* Simple sum of characters read */ @@ -278,7 +278,7 @@ lex_close( */ static struct FILE_INFO * -_drop_stack_do( +drop_stack_do( struct FILE_INFO * head ) { @@ -320,9 +320,9 @@ lex_init_stack( * anything until the next 'lex_init_stack()' succeeded. */ void -lex_drop_stack() +lex_drop_stack(void) { - lex_stack = _drop_stack_do(lex_stack); + lex_stack = drop_stack_do(lex_stack); } /* Flush the lexer input stack: This will nip all input objects on the @@ -334,14 +334,14 @@ lex_drop_stack() * in the force-eof mode before this call. */ int/*BOOL*/ -lex_flush_stack() +lex_flush_stack(void) { int retv = FALSE; if (NULL != lex_stack) { retv = !lex_stack->force_eof; lex_stack->force_eof = TRUE; - lex_stack->st_next = _drop_stack_do( + lex_stack->st_next = drop_stack_do( lex_stack->st_next); } return retv; @@ -425,7 +425,7 @@ lex_from_file(void) } struct FILE_INFO * -lex_current() +lex_current(void) { /* this became so simple, it could be a macro. But then, * lex_stack needed to be global... @@ -910,9 +910,9 @@ yylex(void) normal_return: if (T_EOC == token) - DPRINTF(4,("\t<end of command>\n")); + DPRINTF(10, ("\t<end of command>\n")); else - DPRINTF(4, ("yylex: lexeme '%s' -> %s\n", yytext, + DPRINTF(10, ("yylex: lexeme '%s' -> %s\n", yytext, token_name(token))); if (!yylval_was_set) @@ -921,6 +921,10 @@ normal_return: return token; lex_too_long: + /* + * DLH: What is the purpose of the limit of 50? + * Is there any reason for yytext[] to be bigger? + */ yytext[min(sizeof(yytext) - 1, 50)] = 0; msyslog(LOG_ERR, "configuration item on line %d longer than limit of %lu, began with '%s'", diff --git a/ntpd/ntp_timer.c b/ntpd/ntp_timer.c index 4f669f0699fa..c8164d798b04 100644 --- a/ntpd/ntp_timer.c +++ b/ntpd/ntp_timer.c @@ -46,7 +46,7 @@ static void check_leapsec(u_int32, const time_t*, int/*BOOL*/); /* * These routines provide support for the event timer. The timer is - * implemented by an interrupt routine which sets a flag once every + * implemented by a signal routine which sets a flag once every * second, and a timer routine which is called when the mainline code * gets around to seeing the flag. The timer routine dispatches the * clock adjustment code if its time has come, then searches the timer @@ -54,7 +54,6 @@ static void check_leapsec(u_int32, const time_t*, int/*BOOL*/); * Finally, we call the hourly procedure to do cleanup and print a * message. */ -volatile int interface_interval; /* init_io() sets def. 300s */ /* * Initializing flag. All async routines watch this and only do their @@ -70,14 +69,15 @@ volatile int alarm_flag; /* * The counters and timeouts */ -static u_long interface_timer; /* interface update timer */ + u_long endpt_scan_timer; /* interface update timer */ static u_long adjust_timer; /* second timer */ static u_long stats_timer; /* stats timer */ static u_long leapf_timer; /* Report leapfile problems once/day */ static u_long huffpuff_timer; /* huff-n'-puff timer */ static u_long worker_idle_timer;/* next check for idle intres */ -u_long leapsec; /* seconds to next leap (proximity class) */ -int leapdif; /* TAI difference step at next leap second*/ +int endpt_scan_period; /* init_io() sets def. 301s */ +u_long leapsec; /* seconds to next leap (proximity class) */ +int leapdif; /* TAI difference step at next leap second*/ u_long orphwait; /* orphan wait time */ #ifdef AUTOKEY static u_long revoke_timer; /* keys revoke timer */ @@ -198,7 +198,7 @@ init_timer(void) stats_timer = SECSPERHR; leapf_timer = SECSPERDAY; huffpuff_timer = 0; - interface_timer = 0; + endpt_scan_timer = 0; current_time = 0; timer_overflows = 0; timer_xmtcalls = 0; @@ -249,7 +249,7 @@ init_timer(void) BOOL rc; Period = (1 << EVENT_TIMEOUT) * 1000; - DueTime.QuadPart = Period * 10000i64; + DueTime.QuadPart = Period * 10000ll; rc = SetWaitableTimer(WaitableTimerHandle, &DueTime, Period, NULL, NULL, FALSE); if (!rc) { @@ -296,10 +296,10 @@ intres_timeout_req( void timer(void) { - struct peer * p; - struct peer * next_peer; + struct peer* p; + struct peer* next_peer; l_fp now; - time_t tnow; + time_t tnow; /* * The basic timerevent is one second. This is used to adjust the @@ -333,15 +333,18 @@ timer(void) * usually tripped using iburst and minpoll of * 128 s or less. */ - if (p->throttle > 0) + if (p->throttle > 0) { p->throttle--; + } if (p->nextdate <= current_time) { #ifdef REFCLOCK - if (FLAG_REFCLOCK & p->flags) + if (FLAG_REFCLOCK & p->flags) { refclock_transmit(p); - else + } else #endif /* REFCLOCK */ + { transmit(p); + } } } @@ -370,7 +373,8 @@ timer(void) #endif /* AUTOKEY */ } sys_stratum = (u_char)sys_orphan; - } else { + } + else { if (sys_leap != LEAP_NOTINSYNC) { set_sys_leap(LEAP_NOTINSYNC); msyslog(LOG_WARNING, "%s", @@ -379,9 +383,9 @@ timer(void) sys_stratum = STRATUM_UNSPEC; } if (sys_stratum > 1) - sys_refid = htonl(LOOPBACKADR); + sys_refid = htonl(LOOPBACKADR); else - memcpy(&sys_refid, "LOOP", 4); + memcpy(&sys_refid, "ORPH", 4); sys_offset = 0; sys_rootdelay = 0; sys_rootdisp = 0; @@ -395,17 +399,19 @@ timer(void) * is imminent or every 8th second. */ if (leapsec > LSPROX_NOWARN || 0 == (current_time & 7)) - check_leapsec(now.l_ui, &tnow, - (sys_leap == LEAP_NOTINSYNC)); - if (sys_leap != LEAP_NOTINSYNC) { - if (leapsec >= LSPROX_ANNOUNCE && leapdif) { - if (leapdif > 0) - set_sys_leap(LEAP_ADDSECOND); - else - set_sys_leap(LEAP_DELSECOND); - } else { - set_sys_leap(LEAP_NOWARNING); - } + check_leapsec( now.l_ui + , &tnow + , (sys_leap == LEAP_NOTINSYNC)); + if (sys_leap != LEAP_NOTINSYNC) { + if (leapsec >= LSPROX_ANNOUNCE && leapdif) { + if (leapdif > 0) { + set_sys_leap(LEAP_ADDSECOND); + } else { + set_sys_leap(LEAP_DELSECOND); + } + } else { + set_sys_leap(LEAP_NOWARNING); + } } /* @@ -431,23 +437,28 @@ timer(void) */ if (revoke_timer && revoke_timer <= current_time) { revoke_timer += (1UL << sys_revoke); - RAND_bytes((u_char *)&sys_private, 4); + RAND_bytes((u_char *)&sys_private, sizeof(sys_private)); } #endif /* AUTOKEY */ /* - * Interface update timer + * Network interface rescan timer */ - if (interface_interval && interface_timer <= current_time) { - timer_interfacetimeout(current_time + - interface_interval); - DPRINTF(2, ("timer: interface update\n")); + if (endpt_scan_timer && endpt_scan_timer <= current_time) { + if (no_periodic_scan) { + endpt_scan_timer = 0; + DPRINTF(2, ("timer: network interface rescan disabled\n")); + } else { + endpt_scan_timer = current_time + + endpt_scan_period; + DPRINTF(2, ("timer: network interface rescan in %d seconds\n", endpt_scan_period)); + } interface_update(NULL, NULL); } - if (worker_idle_timer && worker_idle_timer <= current_time) + if (worker_idle_timer && worker_idle_timer <= current_time) { worker_idle_timer_fired(); - + } /* * Finally, write hourly stats and do the hourly * and daily leapfile checks. @@ -508,13 +519,6 @@ alarming( #endif /* SYS_WINNT */ -void -timer_interfacetimeout(u_long timeout) -{ - interface_timer = timeout; -} - - /* * timer_clr_stats - clear timer module stat counters */ @@ -528,21 +532,27 @@ timer_clr_stats(void) static void -check_leap_sec_in_progress( const leap_result_t *lsdata ) { +check_leap_sec_in_progress( + const leap_result_t *lsdata + ) +{ int prv_leap_sec_in_progress = leap_sec_in_progress; + leap_sec_in_progress = lsdata->tai_diff && (lsdata->ddist < 3); - /* if changed we may have to update the leap status sent to clients */ - if (leap_sec_in_progress != prv_leap_sec_in_progress) + /* if changed we have to update the leap bits sent to clients */ + if (leap_sec_in_progress != prv_leap_sec_in_progress) { set_sys_leap(sys_leap); + } } static void check_leapsec( - u_int32 now , - const time_t * tpiv , - int/*BOOL*/ reset) + u_int32 now, + const time_t * tpiv, + int/*BOOL*/ reset + ) { static const char leapmsg_p_step[] = "Positive leap second, stepped backward."; @@ -556,10 +566,10 @@ check_leapsec( "Negative leap second, no step correction. " "System clock will be inaccurate for a long time."; - leap_result_t lsdata; - u_int32 lsprox; + leap_result_t lsdata; + u_int32 lsprox; #ifdef AUTOKEY - int/*BOOL*/ update_autokey = FALSE; + int/*BOOL*/ update_autokey = FALSE; #endif #ifndef SYS_WINNT /* WinNT port has its own leap second handling */ @@ -568,122 +578,116 @@ check_leapsec( # else leapsec_electric(0); # endif -#endif +#endif /* !SYS_WINNT */ + #ifdef LEAP_SMEAR leap_smear.enabled = leap_smear_intv != 0; #endif if (reset) { lsprox = LSPROX_NOWARN; leapsec_reset_frame(); - memset(&lsdata, 0, sizeof(lsdata)); + ZERO(lsdata); } else { - int fired; + int fired; - fired = leapsec_query(&lsdata, now, tpiv); + fired = leapsec_query(&lsdata, now, tpiv); - DPRINTF(3, ("*** leapsec_query: fired %i, now %u (0x%08X), tai_diff %i, ddist %u\n", - fired, now, now, lsdata.tai_diff, lsdata.ddist)); + DPRINTF(3, ("*** leapsec_query: fired %i, now %u (0x%08X)," + " tai_diff %i, ddist %u\n", + fired, now, now, lsdata.tai_diff, lsdata.ddist)); #ifdef LEAP_SMEAR - leap_smear.in_progress = 0; - leap_smear.doffset = 0.0; - - if (leap_smear.enabled) { - if (lsdata.tai_diff) { - if (leap_smear.interval == 0) { - leap_smear.interval = leap_smear_intv; - leap_smear.intv_end = lsdata.ttime.Q_s; - leap_smear.intv_start = leap_smear.intv_end - leap_smear.interval; - DPRINTF(1, ("*** leapsec_query: setting leap_smear interval %li, begin %.0f, end %.0f\n", + leap_smear.in_progress = FALSE; + leap_smear.doffset = 0.0; + + if (leap_smear.enabled) { + if (lsdata.tai_diff) { + if (0 == leap_smear.interval) { + leap_smear.interval = leap_smear_intv; + leap_smear.intv_end = lsdata.ttime.Q_s; + leap_smear.intv_start = leap_smear.intv_end - leap_smear.interval; + DPRINTF(1, ("*** leapsec_query: setting leap_smear interval %li, begin %.0f, end %.0f\n", leap_smear.interval, leap_smear.intv_start, leap_smear.intv_end)); + } + } else { + if (leap_smear.interval) { + DPRINTF(1, ("*** leapsec_query: clearing leap_smear interval\n")); + leap_smear.interval = 0; + } } - } else { - if (leap_smear.interval) - DPRINTF(1, ("*** leapsec_query: clearing leap_smear interval\n")); - leap_smear.interval = 0; - } - if (leap_smear.interval) { - double dtemp = now; - if (dtemp >= leap_smear.intv_start && dtemp <= leap_smear.intv_end) { - double leap_smear_time = dtemp - leap_smear.intv_start; - /* - * For now we just do a linear interpolation over the smear interval - */ + if (leap_smear.interval) { + double dtemp = now; + + if (dtemp >= leap_smear.intv_start && dtemp <= leap_smear.intv_end) { + double leap_smear_time = dtemp - leap_smear.intv_start; #if 0 - // linear interpolation - leap_smear.doffset = -(leap_smear_time * lsdata.tai_diff / leap_smear.interval); + /* linear interpolation */ + leap_smear.doffset = -(leap_smear_time * lsdata.tai_diff / leap_smear.interval); #else - // Google approach: lie(t) = (1.0 - cos(pi * t / w)) / 2.0 - leap_smear.doffset = -((double) lsdata.tai_diff - cos( M_PI * leap_smear_time / leap_smear.interval)) / 2.0; + /* Google approach : lie(t) = (1.0 - cos(pi * t / w)) / 2.0 */ + leap_smear.doffset = -((double) lsdata.tai_diff - cos( M_PI * leap_smear_time / leap_smear.interval)) / 2.0; #endif - /* - * TODO see if we're inside an inserted leap second, so we need to compute - * leap_smear.doffset = 1.0 - leap_smear.doffset - */ - leap_smear.in_progress = 1; -#if 0 && defined( DEBUG ) - msyslog(LOG_NOTICE, "*** leapsec_query: [%.0f:%.0f] (%li), now %u (%.0f), smear offset %.6f ms\n", - leap_smear.intv_start, leap_smear.intv_end, leap_smear.interval, - now, leap_smear_time, leap_smear.doffset); -#else - DPRINTF(1, ("*** leapsec_query: [%.0f:%.0f] (%li), now %u (%.0f), smear offset %.6f ms\n", + /* + * TODO see if we're inside an inserted leap second, so we need to compute + * leap_smear.doffset = 1.0 - leap_smear.doffset + */ + leap_smear.in_progress = TRUE; + DPRINTF(1, ("*** leapsec_query: [%.0f:%.0f] (%li), now %u (%.0f), smear offset %.6f ms\n", leap_smear.intv_start, leap_smear.intv_end, leap_smear.interval, now, leap_smear_time, leap_smear.doffset)); -#endif + } } + } else { + leap_smear.interval = 0; } - } - else - leap_smear.interval = 0; - - /* - * Update the current leap smear offset, eventually 0.0 if outside smear interval. - */ - DTOLFP(leap_smear.doffset, &leap_smear.offset); - + /* + * Update the current leap smear offset, eventually 0.0 if outside smear interval. + */ + DTOLFP(leap_smear.doffset, &leap_smear.offset); #endif /* LEAP_SMEAR */ - if (fired) { - /* Full hit. Eventually step the clock, but always - * announce the leap event has happened. - */ - const char *leapmsg = NULL; - double lswarp = lsdata.warped; - if (lswarp < 0.0) { - if (clock_max_back > 0.0 && - clock_max_back < -lswarp) { - step_systime(lswarp); - leapmsg = leapmsg_p_step; - } else { - leapmsg = leapmsg_p_slew; + if (fired) { + /* Full hit. Eventually step the clock, but always + * announce the leap event has happened. + */ + const char *leapmsg = NULL; + double lswarp = lsdata.warped; + if (lswarp < 0.0) { + if (clock_max_back > 0.0 && + clock_max_back < -lswarp) { + step_systime(lswarp); + leapmsg = leapmsg_p_step; + } else { + leapmsg = leapmsg_p_slew; + } + } else if (lswarp > 0.0) { + if (clock_max_fwd > 0.0 && + clock_max_fwd < lswarp) { + step_systime(lswarp); + leapmsg = leapmsg_n_step; + } else { + leapmsg = leapmsg_n_slew; + } } - } else if (lswarp > 0.0) { - if (clock_max_fwd > 0.0 && - clock_max_fwd < lswarp) { - step_systime(lswarp); - leapmsg = leapmsg_n_step; - } else { - leapmsg = leapmsg_n_slew; + if (leapmsg) { + msyslog(LOG_NOTICE, "%s", leapmsg); } - } - if (leapmsg) - msyslog(LOG_NOTICE, "%s", leapmsg); - report_event(EVNT_LEAP, NULL, NULL); + report_event(EVNT_LEAP, NULL, NULL); #ifdef AUTOKEY - update_autokey = TRUE; + update_autokey = TRUE; #endif - lsprox = LSPROX_NOWARN; - leapsec = LSPROX_NOWARN; - sys_tai = lsdata.tai_offs; - } else { + lsprox = LSPROX_NOWARN; + leapsec = LSPROX_NOWARN; + sys_tai = lsdata.tai_offs; + } else { #ifdef AUTOKEY - update_autokey = (sys_tai != (u_int)lsdata.tai_offs); + update_autokey = (sys_tai != (u_int)lsdata.tai_offs); #endif - lsprox = lsdata.proximity; - sys_tai = lsdata.tai_offs; - } + lsprox = lsdata.proximity; + sys_tai = lsdata.tai_offs; + } } /* We guard against panic alarming during the red alert phase. @@ -691,13 +695,13 @@ check_leapsec( * to piping hot in one step. If things are already that wobbly, * we let the normal clock correction take over, even if a jump * is involved. - * Also make sure the alarming events are edge-triggered, that is, - * ceated only when the threshold is crossed. - */ - if ( (leapsec > 0 || lsprox < LSPROX_ALERT) - && leapsec < lsprox ) { + * Also make sure the alarming events are edge-triggered, that is, + * created only when the threshold is crossed. + */ + if ( (leapsec > 0 || lsprox < LSPROX_ALERT) + && leapsec < lsprox) { if ( leapsec < LSPROX_SCHEDULE - && lsprox >= LSPROX_SCHEDULE) { + && lsprox >= LSPROX_SCHEDULE) { if (lsdata.dynamic) report_event(PEVNT_ARMED, sys_peer, NULL); else @@ -706,22 +710,23 @@ check_leapsec( leapsec = lsprox; } if (leapsec > lsprox) { - if ( leapsec >= LSPROX_SCHEDULE - && lsprox < LSPROX_SCHEDULE) { + if ( leapsec >= LSPROX_SCHEDULE + && lsprox < LSPROX_SCHEDULE) { report_event(EVNT_DISARMED, NULL, NULL); } leapsec = lsprox; } - if (leapsec >= LSPROX_SCHEDULE) + if (leapsec >= LSPROX_SCHEDULE) { leapdif = lsdata.tai_diff; - else + } else { leapdif = 0; - + } check_leap_sec_in_progress(&lsdata); #ifdef AUTOKEY - if (update_autokey) + if (update_autokey) { crypto_update_taichange(); + } #endif } diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c index 62a997e43aad..e7b374fc346f 100644 --- a/ntpd/ntp_util.c +++ b/ntpd/ntp_util.c @@ -13,7 +13,6 @@ #include "ntp_assert.h" #include "ntp_calendar.h" #include "ntp_leapsec.h" -#include "lib_strbuf.h" #include <stdio.h> #include <ctype.h> @@ -63,7 +62,6 @@ char *stats_drift_file; /* frequency file name */ static char *stats_temp_file; /* temp frequency file name */ static double wander_resid; /* last frequency update */ double wander_threshold = 1e-7; /* initial frequency threshold */ -static unsigned int cmdargs_seen = 0; /* stat options seen from command line */ /* * Statistics file stuff @@ -183,7 +181,7 @@ init_util(void) void write_stats(void) { - FILE *fp; + FILE *fp = NULL; #ifdef DOSYNCTODR struct timeval tv; #if !defined(VMS) @@ -267,12 +265,10 @@ write_stats(void) * the frequncy file. This minimizes the file writes to * nonvolaile storage. */ -#ifdef DEBUG - if (debug) - printf("write_stats: frequency %.6lf thresh %.6lf, freq %.6lf\n", + DPRINTF(1, ("write_stats: frequency %.6f thresh %.6f, freq %.6f\n", (prev_drift_comp - drift_comp) * 1e6, wander_resid * - 1e6, drift_comp * 1e6); -#endif + 1e6, drift_comp * 1e6)); + if (fabs(prev_drift_comp - drift_comp) < wander_resid) { wander_resid *= 0.5; return; @@ -284,7 +280,7 @@ write_stats(void) stats_temp_file); return; } - fprintf(fp, "%.3f\n", drift_comp * 1e6); + fprintf(fp, "%.6f\n", drift_comp * 1e6); (void)fclose(fp); /* atomic */ #ifdef SYS_WINNT @@ -326,29 +322,38 @@ write_stats(void) /* - * stats_config - configure the stats operation + * If an option was given on the command line make sure it takes + * precedence over the configuration file, as command-line options + * are processed first. Similarly, if an option is given in the + * configuration file, do not allow it to be overridden with runtime + * configuration. Done by simply remembering an option was already + * seen. */ static int allow_config( - unsigned int option, - int/*BOOL*/ cmdopt) + u_int option, + int/*BOOL*/ cmdopt + ) { - /* If an option was given on the command line, make sure it - * persists and is not later changed by a corresponding option - * from the config file. Done by simply remembering an option was - * already seen from the command line. - * - * BTW, if we ever define stats options beyond 31, this needs a - * fix. Until then, simply assume the shift will not overflow. - */ - unsigned int mask = 1u << option; - int retv = cmdopt || !(cmdargs_seen & mask); - if (cmdopt) - cmdargs_seen |= mask; + static u_int seen = 0; /* stat options previously set */ + u_int mask; + int retv; + + if (cmdopt) { + DEBUG_REQUIRE(option < sizeof(mask) * 8); + mask = 1u << option; + retv = !(seen & mask); + seen |= mask; + } else { + retv = FALSE; + } return retv; } +/* + * stats_config - configure the stats operation + */ void stats_config( int item, @@ -356,12 +361,13 @@ stats_config( int optflag ) { - FILE *fp; + FILE *fp = NULL; const char *value; size_t len; double old_drift; l_fp now; time_t ttnow; + char dirsep_or_nul; #ifndef VMS static const char temp_ext[] = ".TEMP"; #else @@ -415,137 +421,131 @@ stats_config( switch (item) { - /* - * Open and read frequency file. - */ + /* + * Open and read frequency file. + */ case STATS_FREQ_FILE: - if (!allow_config(STATS_FREQ_FILE, optflag)) + if (!allow_config(STATS_FREQ_FILE, optflag)) { break; - - if (!value || (len = strlen(value)) == 0) - { + } + if (!value || 0 == (len = strlen(value))) { free(stats_drift_file); free(stats_temp_file); - stats_drift_file = stats_temp_file = NULL; - } - else - { - stats_drift_file = erealloc(stats_drift_file, len + 1); + stats_drift_file = stats_temp_file = NULL; + } else { + stats_drift_file = erealloc(stats_drift_file, + 1 + len); stats_temp_file = erealloc(stats_temp_file, - len + sizeof(".TEMP")); - memcpy(stats_drift_file, value, (size_t)(len+1)); - memcpy(stats_temp_file, value, (size_t)len); - memcpy(stats_temp_file + len, temp_ext, sizeof(temp_ext)); + len + sizeof(temp_ext)); + memcpy(stats_drift_file, value, 1 + len); + memcpy(stats_temp_file, value, len); + memcpy(stats_temp_file + len, temp_ext, + sizeof(temp_ext)); } - + /* * Open drift file and read frequency. If the file is * missing or contains errors, tell the loop to reset. */ if (NULL == stats_drift_file) { - loop_config(LOOP_NOFREQ, 0.0); - prev_drift_comp = 0.0; + goto nofreq; } else if ((fp = fopen(stats_drift_file, "r")) == NULL) { - if (errno != ENOENT) + if (errno != ENOENT) { msyslog(LOG_WARNING, - "cannot read frequency file %s: %s", - stats_drift_file, strerror(errno)); + "cannot read frequency file %s: %m", + stats_drift_file); + } + goto nofreq; } else if (fscanf(fp, "%lf", &old_drift) != 1) { msyslog(LOG_ERR, "format error frequency file %s", stats_drift_file); - fclose(fp); + nofreq: + prev_drift_comp = 0.0; + loop_config(LOOP_NOFREQ, prev_drift_comp); } else { loop_config(LOOP_FREQ, old_drift); prev_drift_comp = drift_comp; msyslog(LOG_INFO, - "initial drift restored to %f", + "initial drift restored to %.6f", old_drift); + } + if (NULL != fp) { fclose(fp); } break; - /* - * Specify statistics directory. - */ + /* + * Specify statistics directory. + */ case STATS_STATSDIR: - if (!allow_config(STATS_STATSDIR, optflag)) + if (!allow_config(STATS_STATSDIR, optflag)) { break; - - /* - 1 since value may be missing the DIR_SEP. */ - if (strlen(value) >= sizeof(statsdir) - 1) { + } + /* - 2 since value may be missing the DIR_SEP. */ + len = strlen(value); + if (len > sizeof(statsdir) - 2) { msyslog(LOG_ERR, - "statsdir too long (>%d, sigh)", - (int)sizeof(statsdir) - 2); + "statsdir %s too long (>%u)", value, + (u_int)sizeof(statsdir) - 2); + break; + } + /* Add a DIR_SEP unless we already have one. */ + if (0 == len || DIR_SEP == value[len - 1]) { + dirsep_or_nul = '\0'; } else { - int add_dir_sep; - size_t value_l; - - /* Add a DIR_SEP unless we already have one. */ - value_l = strlen(value); - if (0 == value_l) - add_dir_sep = FALSE; - else - add_dir_sep = (DIR_SEP != - value[value_l - 1]); - - if (add_dir_sep) - snprintf(statsdir, sizeof(statsdir), - "%s%c", value, DIR_SEP); - else - snprintf(statsdir, sizeof(statsdir), - "%s", value); - filegen_statsdir(); + dirsep_or_nul = DIR_SEP; } + snprintf(statsdir, sizeof(statsdir), "%s%c", + value, dirsep_or_nul); + filegen_statsdir(); break; - /* - * Open pid file. - */ + /* + * Write pid file. + */ case STATS_PID_FILE: - if (!allow_config(STATS_PID_FILE, optflag)) + if (!allow_config(STATS_PID_FILE, optflag)) { break; - + } if ((fp = fopen(value, "w")) == NULL) { - msyslog(LOG_ERR, "pid file %s: %m", - value); + msyslog(LOG_ERR, "pid file %s: %m", value); break; } - fprintf(fp, "%d", (int)getpid()); + fprintf(fp, "%ld", (long)getpid()); fclose(fp); break; /* * Read leapseconds file. * - * Note: Currently a leap file without SHA1 signature is - * accepted, but if there is a signature line, the signature - * must be valid or the file is rejected. + * By default a leap file without SHA1 signature is accepted, + * but if there is a signature line, the signature must be + * valid or the leapfile line in ntp.conf must have ignorehash. */ case STATS_LEAP_FILE: - if (!value || (len = strlen(value)) == 0) + if (NULL == value || 0 == (len = strlen(value))) { break; - + } leapfile_name = erealloc(leapfile_name, len + 1); memcpy(leapfile_name, value, len + 1); chck_leaphash = optflag; if (leapsec_load_file( leapfile_name, &leapfile_stat, - TRUE, TRUE, chck_leaphash)) - { + TRUE, TRUE, chck_leaphash)) { leap_signature_t lsig; get_systime(&now); time(&ttnow); leapsec_getsig(&lsig); mprintf_event(EVNT_TAI, NULL, - "%d leap %s %s %s", + "%d leap %s expire%s %s", lsig.taiof, fstostr(lsig.ttime), leapsec_expired(now.l_ui, NULL) - ? "expired" - : "expires", + ? "d" + : "s", fstostr(lsig.etime)); have_leapfile = TRUE; @@ -579,31 +579,32 @@ stats_config( */ void record_peer_stats( - sockaddr_u *addr, - int status, - double offset, /* offset */ - double delay, /* delay */ - double dispersion, /* dispersion */ - double jitter /* jitter */ + sockaddr_u * addr, + int status, + double offset, + double delay, + double dispersion, + double jitter ) { - l_fp now; - u_long day; + l_fp now; + u_long day; - if (!stats_control) + if (!stats_control) { return; - + } get_systime(&now); filegen_setup(&peerstats, now.l_ui); + if (NULL == peerstats.fp) { + return; + } day = now.l_ui / 86400 + MJD_1900; now.l_ui %= 86400; - if (peerstats.fp != NULL) { - fprintf(peerstats.fp, - "%lu %s %s %x %.9f %.9f %.9f %.9f\n", day, - ulfptoa(&now, 3), stoa(addr), status, offset, - delay, dispersion, jitter); - fflush(peerstats.fp); - } + fprintf(peerstats.fp, + "%lu %s %s %x %.9f %.9f %.9f %.9f\n", day, + ulfptoa(&now, 3), stoa(addr), status, offset, + delay, dispersion, jitter); + fflush(peerstats.fp); } @@ -934,13 +935,14 @@ record_timing_stats( * * Note: This loads a new leapfile on the fly. Currently a leap file * without SHA1 signature is accepted, but if there is a signature line, - * the signature must be valid or the file is rejected. + * the signature must be valid unless the ntp.conf leapfile line specified + * ignorehash. */ void check_leap_file( - int is_daily_check, - uint32_t ntptime , - const time_t *systime + int is_daily_check, + uint32_t ntptime, + const time_t * systime ) { /* just do nothing if there is no leap file */ @@ -1097,3 +1099,20 @@ ntpd_time_stepped(void) win_time_stepped(); #endif } + + +#ifdef DEBUG +void +append_flagstr( + char * flagstr, + size_t sz, + const char * text +) +{ + if ('\0' != flagstr[0]) { + strlcat(flagstr, ",", sz); + } + /* bail if we ran out of room */ + INSIST(strlcat(flagstr, text, sz) < sz); +} +#endif /* DEBUG */ diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c index 14774d684f2d..5d8b0bb33659 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 June 6, 2023 at 04:36:50 AM by AutoGen 5.18.16 + * It has been AutoGen-ed May 25, 2024 at 12:03:09 AM by AutoGen 5.18.16 * From the definitions ntpd-opts.def * and the template file options * @@ -18,7 +18,7 @@ * The ntpd program is copyrighted and licensed * under the following terms: * - * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved. + * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the NTP License, copies of which * can be seen at: @@ -80,8 +80,8 @@ extern FILE * option_usage_fp; * static const strings for ntpd options */ static char const ntpd_opt_strs[3133] = -/* 0 */ "ntpd 4.2.8p17\n" - "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n" +/* 0 */ "ntpd 4.2.8p18\n" + "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the NTP License, copies of which\n" "can be seen at:\n" @@ -210,12 +210,12 @@ static char const ntpd_opt_strs[3133] = /* 2901 */ "output version information and exit\0" /* 2937 */ "version\0" /* 2945 */ "NTPD\0" -/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p17\n" +/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p18\n" "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n" "\t\t[ <server1> ... <serverN> ]\n\0" /* 3082 */ "https://bugs.ntp.org, bugs@ntp.org\0" /* 3117 */ "\n\0" -/* 3119 */ "ntpd 4.2.8p17"; +/* 3119 */ "ntpd 4.2.8p18"; /** * ipv4 option description with @@ -1534,8 +1534,8 @@ static void bogus_function(void) { translate option names. */ /* referenced via ntpdOptions.pzCopyright */ - puts(_("ntpd 4.2.8p17\n\ -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\ + puts(_("ntpd 4.2.8p18\n\ +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\ This is free software. It is licensed for use, modification and\n\ redistribution under the terms of the NTP License, copies of which\n\ can be seen at:\n")); @@ -1675,7 +1675,7 @@ implied warranty.\n")); puts(_("output version information and exit")); /* referenced via ntpdOptions.pzUsageTitle */ - puts(_("ntpd - NTP daemon program - Ver. 4.2.8p17\n\ + puts(_("ntpd - NTP daemon program - Ver. 4.2.8p18\n\ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\ \t\t[ <server1> ... <serverN> ]\n")); @@ -1683,7 +1683,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\ puts(_("\n")); /* referenced via ntpdOptions.pzFullVersion */ - puts(_("ntpd 4.2.8p17")); + puts(_("ntpd 4.2.8p18")); /* referenced via ntpdOptions.pzFullUsage */ puts(_("<<<NOT-FOUND>>>")); diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h index 3541255bb6fb..99fb3dcd230f 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 June 6, 2023 at 04:36:50 AM by AutoGen 5.18.16 + * It has been AutoGen-ed May 25, 2024 at 12:03:08 AM by AutoGen 5.18.16 * From the definitions ntpd-opts.def * and the template file options * @@ -18,7 +18,7 @@ * The ntpd program is copyrighted and licensed * under the following terms: * - * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved. + * Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the NTP License, copies of which * can be seen at: @@ -114,9 +114,9 @@ typedef enum { /** count of all options for ntpd */ #define OPTION_CT 38 /** ntpd version */ -#define NTPD_VERSION "4.2.8p17" +#define NTPD_VERSION "4.2.8p18" /** Full ntpd version text */ -#define NTPD_FULL_VERSION "ntpd 4.2.8p17" +#define NTPD_FULL_VERSION "ntpd 4.2.8p18" /** * Interface defines for all options. Replace "n" with the UPPER_CASED diff --git a/ntpd/ntpd.1ntpdman b/ntpd/ntpd.1ntpdman index 237a9179f62e..6d91d5725284 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 "06 Jun 2023" "4.2.8p17" "User Commands" +.TH ntpd 1ntpdman "25 May 2024" "4.2.8p18" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:49 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:04:07 AM by AutoGen 5.18.16 .\" From the definitions ntpd-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -979,7 +979,7 @@ RFC5908 .SH "AUTHORS" The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH BUGS The diff --git a/ntpd/ntpd.1ntpdmdoc b/ntpd/ntpd.1ntpdmdoc index 536e7f672840..90e08b7aa825 100644 --- a/ntpd/ntpd.1ntpdmdoc +++ b/ntpd/ntpd.1ntpdmdoc @@ -1,9 +1,9 @@ -.Dd June 6 2023 +.Dd May 25 2024 .Dt NTPD 1ntpdmdoc User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:36 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:03:54 AM by AutoGen 5.18.16 .\" From the definitions ntpd-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in .Sh "AUTHORS" The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh BUGS The diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index 868f7a9c8068..f86b06cf16eb 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -101,16 +101,6 @@ #include "recvbuff.h" #include "ntp_cmdargs.h" -#if 0 /* HMS: I don't think we need this. 961223 */ -#ifdef LOCK_PROCESS -# ifdef SYS_SOLARIS -# include <sys/mman.h> -# else -# include <sys/lock.h> -# endif -#endif -#endif - #ifdef SYS_WINNT # include "ntservice.h" #endif @@ -145,15 +135,11 @@ # include <seccomp.h> #endif /* LIBSECCOMP and KERN_SECCOMP */ -#ifdef __FreeBSD__ -#include <sys/procctl.h> -#ifndef PROC_STACKGAP_CTL -/* - * Even if we compile on an older system we can still run on a newer one. - */ -#define PROC_STACKGAP_CTL 17 -#define PROC_STACKGAP_DISABLE 0x0002 -#endif +#if defined(__FreeBSD__) && __FreeBSD_version < 1400037 && defined(HAVE_SYS_PROCCTL_H) +# include <sys/procctl.h> +# ifdef PROC_STACKGAP_DISABLE +# define DISABLE_FREEBSD_STACKGAP +# endif #endif #ifdef HAVE_DNSREGISTRATION @@ -438,18 +424,24 @@ main( char *argv[] ) { -# ifdef __FreeBSD__ - { - /* - * We Must disable ASLR stack gap on FreeBSD to avoid a - * segfault. See PR/241421 and PR/241960. - */ - int aslr_var = PROC_STACKGAP_DISABLE; +# ifdef DISABLE_FREEBSD_STACKGAP + /* + * We must disable ASLR stack gap on FreeBSD that has + * PROC_STACKGAP_DISABLE up through early FreeBSD 14 + * versions to avoid a segfault. See: + * + * https://bugs.ntp.org/3627 + * https://cgit.freebsd.org/src/commit/?id=889b56c8cd84c9a9f2d9e3b019c154d6f14d9021 + * https://cgit.freebsd.org/src/commit/?id=fc393054398ea50fb0cee52704e9385afe888b48 + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253208 + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241421 + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241960 + */ + int aslr_var = PROC_STACKGAP_DISABLE; + + procctl(P_PID, getpid(), PROC_STACKGAP_CTL, &aslr_var); +# endif /* DISABLE_FREEBSD_STACKGAP */ - pid_t my_pid = getpid(); - procctl(P_PID, my_pid, PROC_STACKGAP_CTL, &aslr_var); - } -# endif return ntpdmain(argc, argv); } #endif /* !SYS_WINNT */ @@ -583,7 +575,7 @@ set_process_priority(void) # ifdef HAVE_WORKING_FORK static void detach_from_terminal( - int pipe[2], + int pipes[2], long wait_sync, const char *logfilename ) @@ -604,11 +596,10 @@ detach_from_terminal( msyslog(LOG_ERR, "fork: %m"); exit_code = EX_OSERR; } else { - close(pipe[1]); - pipe[1] = -1; + close(pipes[1]); + pipes[1] = -1; exit_code = wait_child_sync_if( - pipe[0], wait_sync); - DPRINTF(1, ("sync_if: rc=%d\n", exit_code)); + pipes[0], wait_sync); if (exit_code <= 0) { /* probe daemon exit code -- wait for * child process if we have an unexpected @@ -616,7 +607,6 @@ detach_from_terminal( */ exit_code = wait_child_exit_if( cpid, (exit_code < 0)); - DPRINTF(1, ("exit_if: rc=%d\n", exit_code)); } } exit(exit_code); @@ -633,8 +623,8 @@ detach_from_terminal( syslog_file = NULL; syslogit = TRUE; } - close_all_except(pipe[1]); - pipe[0] = -1; + close_all_except(pipes[1]); + pipes[0] = -1; INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \ && 2 == dup2(0, 2)); @@ -678,6 +668,7 @@ detach_from_terminal( return; } # endif /* HAVE_WORKING_FORK */ +#endif /* !SIM && !SYS_WINNT */ #ifdef HAVE_DROPROOT /* @@ -816,7 +807,6 @@ set_user_group_ids(void) return 1; } #endif /* HAVE_DROPROOT */ -#endif /* !SIM */ /* * Main program. Initialize us, disconnect us from the tty if necessary, @@ -915,10 +905,13 @@ ntpdmain( msyslog(LOG_NOTICE, "available at https://www.nwtime.org/support"); msyslog(LOG_NOTICE, "----------------------------------------------------"); #ifdef DEBUG - msyslog(LOG_NOTICE, "DEBUG behavior is enabled - a violation of any"); - msyslog(LOG_NOTICE, "diagnostic assertion will cause %s to abort", progname); + msyslog(LOG_NOTICE, "DEBUG behavior is enabled - a violation of any" + " diagnostic assertion will cause %s to abort", + progname); #endif + ssl_check_version(); + /* * Install trap handlers to log errors and assertion failures. * Default handlers print to stderr which doesn't work if detached. @@ -1290,11 +1283,10 @@ ntpdmain( * is associated with running with uid 0 - should be refined on * ports that allow binding to NTP_PORT with uid != 0 */ - disable_dynamic_updates |= (sw_uid != 0); /* also notifies routing message listener */ + scan_addrs_once |= (sw_uid != 0); /* used by routing socket code */ # endif /* !HAVE_LINUX_CAPABILITIES && !HAVE_SOLARIS_PRIVS */ - if (disable_dynamic_updates && interface_interval) { - interface_interval = 0; + if (scan_addrs_once) { msyslog(LOG_INFO, "running as non-root disables dynamic interface tracking"); } @@ -1308,9 +1300,9 @@ ntpdmain( cap_t caps; char *captext; - captext = (0 != interface_interval) - ? "cap_sys_time,cap_net_bind_service=pe" - : "cap_sys_time=pe"; + captext = (scan_addrs_once) + ? "cap_sys_time=pe" + : "cap_sys_time,cap_net_bind_service=pe"; caps = cap_from_text(captext); if (!caps) { msyslog(LOG_ERR, @@ -1447,10 +1439,9 @@ int scmp_sc[] = { } #endif /* LIBSECCOMP and KERN_SECCOMP */ -#if defined(SYS_WINNT) ntservice_isup(); -#elif defined(HAVE_WORKING_FORK) - if (daemon_pipe[1] != -1) { +#if defined(HAVE_WORKING_FORK) + if (daemon_pipe[1] != -1 && 0 == wait_sync) { if (2 != write(daemon_pipe[1], "R\n", 2)) { msyslog(LOG_ERR, "daemon failed to notify parent ntpd after init"); } @@ -1459,6 +1450,10 @@ int scmp_sc[] = { } #endif /* HAVE_WORKING_FORK */ + if (scan_addrs_once || no_periodic_scan) { + endpt_scan_timer = 0; + } + # ifndef HAVE_IO_COMPLETION_PORT BLOCK_IO_AND_ALARM(); was_alarmed = FALSE; @@ -1697,29 +1692,31 @@ wait_child_sync_if( } rc = read(pipe_read_fd, &ch, 1); if (rc == 0) { - DPRINTF(2, ("daemon control: got EOF\n")); + /* DPRINTF is useless here as -d/-D disable forking */ + fprintf(stderr, "daemon control: got EOF\n"); return -1; /* unexpected EOF, check daemon */ } else if (rc == 1) { - DPRINTF(2, ("daemon control: got '%c'\n", - (ch >= ' ' ? ch : '.'))); - if (ch == 'R' && !wait_sync) - return 0; - if (ch == 'S' && wait_sync) + if ( ('S' == ch && wait_sync > 0) + || ('R' == ch && 0 == wait_sync)) { return 0; + } } else { - DPRINTF(2, ("daemon control: read 1 char failed: %s\n", - strerror(errno))); + mfprintf(stderr, "%s: daemon control: read 1 char failed: %m\n", + progname); + msyslog(LOG_ERR, "daemon control: read 1 char failed: %m"); return EX_IOERR; } } while (wait_rem > 0); - if (wait_sync) { + if (wait_sync > 0) { fprintf(stderr, "%s: -w/--wait-sync %ld timed out.\n", progname, wait_sync); + msyslog(LOG_ERR, "-w/--wait-sync %ld timed out.", wait_sync); return EX_PROTOCOL; } else { fprintf(stderr, "%s: daemon startup monitoring timed out.\n", progname); + msyslog(LOG_ERR, "daemon startup monitoring timed out."); return 0; } } @@ -1735,7 +1732,6 @@ wait_child_exit_if( int rc = 0; int wstatus; if (cpid == waitpid(cpid, &wstatus, (blocking ? 0 : WNOHANG))) { - DPRINTF(1, ("child (pid=%d) dead now\n", cpid)); if (WIFEXITED(wstatus)) { rc = WEXITSTATUS(wstatus); msyslog(LOG_ERR, "daemon child exited with code %d", @@ -1748,8 +1744,6 @@ wait_child_exit_if( rc = EX_SOFTWARE; msyslog(LOG_ERR, "daemon child died with unknown cause"); } - } else { - DPRINTF(1, ("child (pid=%d) still alive\n", cpid)); } return rc; # else diff --git a/ntpd/ntpd.html b/ntpd/ntpd.html index 3947f57f1a9b..a95695ef88b9 100644 --- a/ntpd/ntpd.html +++ b/ntpd/ntpd.html @@ -56,7 +56,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> -<p>This document applies to version 4.2.8p17 of <code>ntpd</code>. +<p>This document applies to version 4.2.8p18 of <code>ntpd</code>. </p> <span id="SEC_Overview"></span> <h2 class="shortcontents-heading">Short Table of Contents</h2> @@ -292,7 +292,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit with a status code of 0. </p> <div class="example"> -<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p17 +<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p18 Usage: ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \ [ <server1> ... <serverN> ] Flg Arg Option-Name Description diff --git a/ntpd/ntpd.man.in b/ntpd/ntpd.man.in index addee5d56e77..2474c8d18d9b 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@ "06 Jun 2023" "4.2.8p17" "User Commands" +.TH ntpd @NTPD_MS@ "25 May 2024" "4.2.8p18" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:49 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:04:07 AM by AutoGen 5.18.16 .\" From the definitions ntpd-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -979,7 +979,7 @@ RFC5908 .SH "AUTHORS" The University of Delaware and Network Time Foundation .SH "COPYRIGHT" -Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .SH BUGS The diff --git a/ntpd/ntpd.mdoc.in b/ntpd/ntpd.mdoc.in index 6d99fbcf5e7a..874a6c778ed7 100644 --- a/ntpd/ntpd.mdoc.in +++ b/ntpd/ntpd.mdoc.in @@ -1,9 +1,9 @@ -.Dd June 6 2023 +.Dd May 25 2024 .Dt NTPD @NTPD_MS@ User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc) .\" -.\" It has been AutoGen-ed June 6, 2023 at 04:37:36 AM by AutoGen 5.18.16 +.\" It has been AutoGen-ed May 25, 2024 at 12:03:54 AM by AutoGen 5.18.16 .\" From the definitions ntpd-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in .Sh "AUTHORS" The University of Delaware and Network Time Foundation .Sh "COPYRIGHT" -Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved. +Copyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, <http://ntp.org/license>. .Sh BUGS The diff --git a/ntpd/refclock_acts.c b/ntpd/refclock_acts.c index 944ac764ccff..709427d34e9e 100644 --- a/ntpd/refclock_acts.c +++ b/ntpd/refclock_acts.c @@ -897,5 +897,5 @@ acts_timecode( pp->lastref = pp->lastrec; } #else -int refclock_acts_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_arbiter.c b/ntpd/refclock_arbiter.c index 7de613fa751e..b92e72361bb1 100644 --- a/ntpd/refclock_arbiter.c +++ b/ntpd/refclock_arbiter.c @@ -473,5 +473,5 @@ arb_poll( } #else -int refclock_arbiter_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_arc.c b/ntpd/refclock_arc.c index d2dba54cb462..73bb63bc408a 100644 --- a/ntpd/refclock_arc.c +++ b/ntpd/refclock_arc.c @@ -870,15 +870,18 @@ arc_receive( struct recvbuf *rbufp ) { + static int quality_average = 0; + static int quality_sum = 0; + static int quality_polls = 0; register struct arcunit *up; struct refclockproc *pp; struct peer *peer; char c; - int i, n, wday, month, flags, status; + int i, wday, month, flags, status; int arc_last_offset; - static int quality_average = 0; - static int quality_sum = 0; - static int quality_polls = 0; + #ifdef DEBUG + int n; + #endif /* * Initialize pointers and read the timecode and timestamp @@ -1182,8 +1185,8 @@ arc_receive( status = pp->a_lastcode[15]; #ifdef DEBUG if(debug) { printf("arc: status 0x%.2x flags 0x%.2x\n", flags, status); } -#endif n = 9; +#endif /* Validate received values at least enough to prevent internal diff --git a/ntpd/refclock_as2201.c b/ntpd/refclock_as2201.c index d71284173cbb..bb485551bb6c 100644 --- a/ntpd/refclock_as2201.c +++ b/ntpd/refclock_as2201.c @@ -385,5 +385,5 @@ as2201_poll( } #else -int refclock_as2201_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_atom.c b/ntpd/refclock_atom.c index b3c0d6b46ab0..6e01352db982 100644 --- a/ntpd/refclock_atom.c +++ b/ntpd/refclock_atom.c @@ -235,5 +235,5 @@ atom_poll( refclock_receive(peer); } #else -int refclock_atom_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_bancomm.c b/ntpd/refclock_bancomm.c index 577ad277213c..d0d855d57b22 100644 --- a/ntpd/refclock_bancomm.c +++ b/ntpd/refclock_bancomm.c @@ -617,5 +617,5 @@ stfp_time2tvme(struct vmedate *time_vme, struct stfp_time *stfp) return; } #else -int refclock_bancomm_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_chronolog.c b/ntpd/refclock_chronolog.c index 1499ee4c81ed..4a8a4aa86efb 100644 --- a/ntpd/refclock_chronolog.c +++ b/ntpd/refclock_chronolog.c @@ -339,5 +339,5 @@ chronolog_poll( } #else -int refclock_chronolog_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_conf.c b/ntpd/refclock_conf.c index 30cc632065c8..ddabf932ea98 100644 --- a/ntpd/refclock_conf.c +++ b/ntpd/refclock_conf.c @@ -322,5 +322,5 @@ struct refclock * const refclock_conf[] = { u_char num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock *); #else -int refclock_conf_bs; +NONEMPTY_TRANSLATION_UNIT #endif diff --git a/ntpd/refclock_dumbclock.c b/ntpd/refclock_dumbclock.c index 3563847dac05..37aaf28fa02a 100644 --- a/ntpd/refclock_dumbclock.c +++ b/ntpd/refclock_dumbclock.c @@ -373,5 +373,5 @@ dumbclock_poll( #endif #else -int refclock_dumbclock_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* defined(REFCLOCK) && defined(CLOCK_DUMBCLOCK) */ diff --git a/ntpd/refclock_fg.c b/ntpd/refclock_fg.c index abcf43f9cb9e..9ded8c7e79e0 100644 --- a/ntpd/refclock_fg.c +++ b/ntpd/refclock_fg.c @@ -331,5 +331,5 @@ fg_receive( #else -int refclock_fg_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_gpsvme.c b/ntpd/refclock_gpsvme.c index 66ccc9a3ec90..3920b7a3cccc 100644 --- a/ntpd/refclock_gpsvme.c +++ b/ntpd/refclock_gpsvme.c @@ -249,5 +249,5 @@ check_leap_sec(struct refclockproc *pp, int unit) } #else -int refclock_gpsvme_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_heath.c b/ntpd/refclock_heath.c index e34fa6b93628..2d9aa45a5b6d 100644 --- a/ntpd/refclock_heath.c +++ b/ntpd/refclock_heath.c @@ -446,5 +446,5 @@ heath_poll( } #else -int refclock_heath_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_hopfpci.c b/ntpd/refclock_hopfpci.c index 95bcab983c4d..5b63e593fa2b 100644 --- a/ntpd/refclock_hopfpci.c +++ b/ntpd/refclock_hopfpci.c @@ -254,5 +254,5 @@ hopfpci_poll( } #else -int refclock_hopfpci_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_hopfser.c b/ntpd/refclock_hopfser.c index e8e5ecefdc40..6cc39c90b774 100644 --- a/ntpd/refclock_hopfser.c +++ b/ntpd/refclock_hopfser.c @@ -362,5 +362,5 @@ hopfserial_poll ( } #else -int refclock_hopfser_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_hpgps.c b/ntpd/refclock_hpgps.c index fb7085a799e5..e9a87172136d 100644 --- a/ntpd/refclock_hpgps.c +++ b/ntpd/refclock_hpgps.c @@ -622,5 +622,5 @@ hpgps_poll( } #else -int refclock_hpgps_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_irig.c b/ntpd/refclock_irig.c index abc94f62e8fb..29cf5d6a748e 100644 --- a/ntpd/refclock_irig.c +++ b/ntpd/refclock_irig.c @@ -1039,5 +1039,5 @@ irig_gain( #else -int refclock_irig_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_jjy.c b/ntpd/refclock_jjy.c index c4e1697bfdf7..84956eb1da2a 100644 --- a/ntpd/refclock_jjy.c +++ b/ntpd/refclock_jjy.c @@ -4525,5 +4525,5 @@ printableString ( char *sOutput, int iOutputLen, const char *sInput, int iInputL /**************************************************************************************************/ #else -int refclock_jjy_bs ; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_jupiter.c b/ntpd/refclock_jupiter.c index 7db0198ec692..4deac7401dc4 100644 --- a/ntpd/refclock_jupiter.c +++ b/ntpd/refclock_jupiter.c @@ -1028,5 +1028,5 @@ jupiter_recv( } #else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */ -int refclock_jupiter_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */ diff --git a/ntpd/refclock_local.c b/ntpd/refclock_local.c index 8c0f74f62c24..62de1a98e84e 100644 --- a/ntpd/refclock_local.c +++ b/ntpd/refclock_local.c @@ -213,5 +213,5 @@ local_poll( refclock_receive(peer); } #else -int refclock_local_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_mx4200.c b/ntpd/refclock_mx4200.c index 11c17d069dd4..0de856ee1edb 100644 --- a/ntpd/refclock_mx4200.c +++ b/ntpd/refclock_mx4200.c @@ -1635,5 +1635,5 @@ mx4200_send(peer, fmt, va_alist) } #else -int refclock_mx4200_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_neoclock4x.c b/ntpd/refclock_neoclock4x.c index a54381678310..a8c0a336307f 100644 --- a/ntpd/refclock_neoclock4x.c +++ b/ntpd/refclock_neoclock4x.c @@ -1057,7 +1057,7 @@ neol_check_firmware(int unit, #endif #else -int refclock_neoclock4x_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ /* diff --git a/ntpd/refclock_nmea.c b/ntpd/refclock_nmea.c index 131ccf641a56..a2d8d499156f 100644 --- a/ntpd/refclock_nmea.c +++ b/ntpd/refclock_nmea.c @@ -1408,6 +1408,7 @@ typedef unsigned char const UCC; static char const * const s_eof_chars = ",*\r\n"; +#ifdef DEBUG static int field_length(UCC *cp, unsigned int nfields) { char const * ep = (char const*)cp; @@ -1419,6 +1420,7 @@ static int field_length(UCC *cp, unsigned int nfields) ? (int)((UCC*)ep - cp) : (int)strlen((char const*)cp); } +#endif /* DEBUG */ /* /[,*\r\n]/ --> skip */ static int _parse_eof(UCC *cp, UCC ** ep) diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c index d41d54023348..512e64b644da 100644 --- a/ntpd/refclock_oncore.c +++ b/ntpd/refclock_oncore.c @@ -4136,5 +4136,5 @@ oncore_log_f( } #else -int refclock_oncore_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK && CLOCK_ONCORE */ diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c index a9fe2689575b..3a61d6012213 100644 --- a/ntpd/refclock_palisade.c +++ b/ntpd/refclock_palisade.c @@ -1567,5 +1567,5 @@ getsingle( } #else /* REFCLOCK && CLOCK_PALISADE*/ -int refclock_palisade_c_notempty; +NONEMPTY_TRANSLATION_UNIT #endif diff --git a/ntpd/refclock_pcf.c b/ntpd/refclock_pcf.c index 45b3475c0d68..4e92370ece10 100644 --- a/ntpd/refclock_pcf.c +++ b/ntpd/refclock_pcf.c @@ -223,5 +223,5 @@ pcf_poll( refclock_receive(peer); } #else -int refclock_pcf_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_pst.c b/ntpd/refclock_pst.c index 1d3e1ffcfd6a..bd0f15938101 100644 --- a/ntpd/refclock_pst.c +++ b/ntpd/refclock_pst.c @@ -314,5 +314,5 @@ pst_poll( } #else -int refclock_pst_int; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_ripencc.c b/ntpd/refclock_ripencc.c index 789029f8aad5..a7339e3d4936 100644 --- a/ntpd/refclock_ripencc.c +++ b/ntpd/refclock_ripencc.c @@ -5250,6 +5250,6 @@ TranslateTSIPReportToText( #endif /* TRIMBLE_OUTPUT_FUNC */ #else /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */ -int refclock_ripencc_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */ diff --git a/ntpd/refclock_tpro.c b/ntpd/refclock_tpro.c index ac511bb4b392..9adcb5c6c7b3 100644 --- a/ntpd/refclock_tpro.c +++ b/ntpd/refclock_tpro.c @@ -204,5 +204,5 @@ tpro_poll( } #else -int refclock_tpro_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_true.c b/ntpd/refclock_true.c index 78e6adb9acaa..e41cd1351840 100644 --- a/ntpd/refclock_true.c +++ b/ntpd/refclock_true.c @@ -977,5 +977,5 @@ true_sample720(void) #endif #else -int refclock_true_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_tsyncpci.c b/ntpd/refclock_tsyncpci.c index e14a3fd122c5..49097ea72420 100644 --- a/ntpd/refclock_tsyncpci.c +++ b/ntpd/refclock_tsyncpci.c @@ -908,5 +908,5 @@ void DoyTimeFromSecTime(DoyTimeObj* pDt, SecTimeObj* pSt) } // End DoyTimeFromSecTime #else -int refclock_tsyncpci_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_tt560.c b/ntpd/refclock_tt560.c index 171ba5c8cc44..89bca13617f3 100644 --- a/ntpd/refclock_tt560.c +++ b/ntpd/refclock_tt560.c @@ -266,5 +266,5 @@ byte_swap(unsigned int input_num) } #else -int refclock_tt560_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_ulink.c b/ntpd/refclock_ulink.c index 60147adba219..c09638c21ca0 100644 --- a/ntpd/refclock_ulink.c +++ b/ntpd/refclock_ulink.c @@ -564,5 +564,5 @@ ulink_poll( } #else -int refclock_ulink_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_wwv.c b/ntpd/refclock_wwv.c index 2736cfa32fd7..f4098ae81cd7 100644 --- a/ntpd/refclock_wwv.c +++ b/ntpd/refclock_wwv.c @@ -2707,5 +2707,5 @@ wwv_gain( #else -int refclock_wwv_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_wwvb.c b/ntpd/refclock_wwvb.c index 6aafc26f1408..3720cdf80a1c 100644 --- a/ntpd/refclock_wwvb.c +++ b/ntpd/refclock_wwvb.c @@ -599,5 +599,5 @@ wwvb_control( #endif /* HAVE_PPSAPI */ #else -int refclock_wwvb_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ diff --git a/ntpd/refclock_zyfer.c b/ntpd/refclock_zyfer.c index f77604868617..0ec566d5aec7 100644 --- a/ntpd/refclock_zyfer.c +++ b/ntpd/refclock_zyfer.c @@ -344,5 +344,5 @@ zyfer_poll( } #else -int refclock_zyfer_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* REFCLOCK */ |
