From: Harlan Stenn Date: Thu, 11 Jan 2018 12:25:17 +0000 (+0000) Subject: sys_lamport and sys_tsrounding. Document .../N in ntp.keys X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82981bb4aa54964f1bd5556f32c07b2610668e75;p=thirdparty%2Fntp.git sys_lamport and sys_tsrounding. Document .../N in ntp.keys bk: 5a5757ad4FWawfaSfGj1qo3Ddsg3Gg --- diff --git a/ChangeLog b/ChangeLog index ccbe39653..7fa37677a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -71,6 +71,8 @@ * sntp: show the IP of who sent us a crypto-NAK. HStenn. * Allow .../N to specify subnet bits for IPs in ntp.keys. HStenn, JPerlinger. * authistrustedip() - use it in more places. HStenn, JPerlinger. +* New sysstats: sys_lamport, sys_tsrounding. HStenn. +* Update ntp.keys .../N documentation. HStenn. --- (4.2.8p10) 2017/03/21 Released by Harlan Stenn diff --git a/NEWS b/NEWS index 5cd1db36e..048a0a1e4 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,9 @@ update-leap needs: Net::SSLeay IO::Socket::SSL +New sysstats variables: sys_lamport, sys_tsrounding +See them with: ntpq -c "rv 0 ss_lamport,ss_tsrounding" + -- NTP 4.2.8p10 (Harlan Stenn , 2017/03/21) diff --git a/html/keygen.html b/html/keygen.html index bad97fb94..4f10a28d2 100644 --- a/html/keygen.html +++ b/html/keygen.html @@ -1,142 +1,354 @@ - - - - ntp-keygen - generate public and private keys - - - -

ntp-keygen - generate public and private keys

-

giffrom Alice's Adventures in Wonderland, Lewis Carroll

-

Alice holds the key.

-

Last update: - 10-Mar-2014 05:11 - UTC

-
-

Related Links

- -

Table of Contents

- -
-

Synopsis

-

ntp-keygen [ -deGHIMPT ] [ -b modulus ] [ -c [ RSA-MD2 | RSA-MD5 | RSA-SHA - | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ] - [ -C cipher ] [-i group ] [ -l days] - [ -m modulus ] [ -p passwd1 ] [ -q passwd2 ] - [ -S [ RSA | DSA ] ] [ -s host ] [ -V nkeys ]

-

Description

-

This program generates cryptographic data files used by the NTPv4 authentication and identity schemes. It can generate message digest keys used in symmetric key cryptography and, if the OpenSSL software library has been installed, it can generate host keys, sign keys, certificates, and identity keys and parameters used by the Autokey public key cryptography. The message digest keys file is generated in a format compatible with NTPv3. All other files are in PEM-encoded printable ASCII format so they can be embedded as MIME attachments in mail to other sites.

-

When used to generate message digest keys, the program produces a file containing - ten pseudo-random printable ASCII strings suitable for the MD5 message digest algorithm included in the distribution. If the OpenSSL library is installed, it produces an additional ten hex-encoded random bit strings suitable for the SHA1, AES-128 CMAC, and other message digest algorithms. The message digest keys file must be distributed and stored using secure means beyond the scope of NTP itself. Besides the keys used for ordinary NTP associations, additional keys can be defined as passwords for the ntpq and ntpdc utility programs.

-

The remaining generated files are compatible with other OpenSSL applications and other Public Key Infrastructure (PKI) resources. Certificates generated by this program are compatible with extant industry practice, although some users might find the interpretation of X509v3 extension fields somewhat liberal. However, the identity keys are probably not compatible with anything other than Autokey.

-

Some files used by this program are encrypted using a private password. The -p option specifies the password for local encrypted files and the -q option the password for encrypted files sent to remote sites. If no password is specified, the host name returned by the Unix gethostname() function, normally the DNS name of the host, is used.

-

The pw option of the crypto configuration command specifies the read password for previously encrypted local files. This must match the local password used by this program. If not specified, the host name is used. Thus, if files are generated by this program without password, they can be read back by ntpd without password, but only on the same host.

-

Normally, encrypted files for each host are generated by that host and used only by that host, although exceptions exist as noted later on this page. The symmetric keys file, normally called ntp.keys, is usually installed in /etc. Other files and links are usually installed in /usr/local/etc, which is normally in a shared filesystem in NFS-mounted networks and cannot be changed by shared clients. The location of the keys directory can be changed by the keysdir configuration command in such cases. Normally, this is in /etc.

-

This program directs commentary and error messages to the standard error stream stderr and remote files to the standard output stream stdout where they can be piped to other applications or redirected to files. The names used for generated files and links all begin with the string ntpkey and include the file type, generating host and filestamp, as described in the Cryptographic Data Files section below

-

Running the Program

-

To test and gain experience with Autokey concepts, log in as root and change to the keys directory, usually /usr/local/etc. When run for the first time, or if all files with names beginning ntpkey have been removed, use the ntp-keygen command without arguments to generate a default RSA host key and matching RSA-MD5 certificate with expiration date one year hence. If run again without options, the program uses the existing keys and parameters and generates only a new certificate with new expiration date one year hence.

-

Run the command on as many hosts as necessary. Designate one of them as the trusted host (TH) using ntp-keygen with the -T option and configure it to synchronize from reliable Internet servers. Then configure the other hosts to synchronize to the TH directly or indirectly. A certificate trail is created when Autokey asks the immediately ascendant host towards the TH to sign its certificate, which is then provided to the immediately descendant host on request. All group hosts should have acyclic certificate trails ending on the TH.

-

The host key is used to encrypt the cookie when required and so must be RSA type. By default, the host key is also the sign key used to encrypt signatures. A different sign key can be assigned using the -S option and this can be either RSA or DSA type. By default, the signature message digest type is MD5, but any combination of sign key type and message digest type supported by the OpenSSL library can be specified using the -c option.

-

The rules say cryptographic media should be generated with proventic filestamps, which means the host should already be synchronized before this program is run. This of course creates a chicken-and-egg problem when the host is started for the first time. Accordingly, the host time should be set by some other means, such as eyeball-and-wristwatch, at least so that the certificate lifetime is within the current year. After that and when the host is synchronized to a proventic source, the certificate should be re-generated.

-

Additional information on trusted groups and identity schemes is on the Autokey Public-Key Authentication page.

-

Command Line Options

-
-
-b modulus
-
Set the modulus for generating identity keys to modulus bits. The modulus defaults to 256, but can be set from 256 (32 octets) to 2048 (256 octets). Use the larger moduli with caution, as this can consume considerable computing resources and increases the size of authenticated packets.
-
-c [ RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ]
-
Select certificate digital signature and message digest scheme. Note that RSA schemes must be used with an RSA sign key and DSA schemes must be used with a DSA sign key. The default without this option is RSA-MD5. If compatibility with FIPS 140-2 is required, either the DSA-SHA or DSA-SHA1 scheme must be used.
-
-C cipher
-
Select the OpenSSL cipher to use for password-protected keys. The openssl -h command provided with OpenSSL displays available ciphers. The default without this option is des-ede3-cbc.
-
-d
-
Enable debugging. This option displays the cryptographic data produced for eye-friendly billboards.
-
-e
-
Extract the IFF or GQ public parameters from the IFFkey or GQkey keys file previously specified. Send the unencrypted data to the standard output stream stdout.
-
-G
-
Generate a new encrypted GQ key file for the Guillou-Quisquater (GQ) identity scheme. This option is mutually exclusive with the -I and -V options.
-
-H
-
Generate a new encrypted RSA public/private host key file.
-
-i group
-
Set the optional Autokey group name to group. This is used in the identity scheme parameter file names. In that role, the default is the host name if no group is provided. The group name, if specified using -i or using -s following an @ character, is also used in certificate subject and issuer names in the form host@group and should match the group specified via crypto ident or server ident in ntpd's configuration file.
-
-I
-
Generate a new encrypted IFF key file for the Schnorr (IFF) identity scheme. This option is mutually exclusive with the -G and -V options.
-
-l days
-
Set the lifetime for certificates to days. The default lifetime is one year (365 d).
-
-m modulus
-
Set the modulus for generating files to modulus bits. The modulus defaults to 512, but can be set from 256 (32 octets) to 2048 (256 octets). Use the larger moduli with caution, as this can consume considerable computing resources and increases the size of authenticated packets.
-
-M
-
Generate a new keys file containing 10 MD5 keys and 10 SHA keys. An MD5 key is a string of 20 random printable ASCII characters, while a SHA key is a string of 40 random hex digits. The file can be edited using a text editor to change the key type or key content. This option is mutually exclusive with all other option.
-
-P
-
Generate a new private certificate used by the PC identity scheme. By default, the program generates public certificates. Note: the PC identity scheme is not recommended for new installations.
-
-p passwd
-
Set the password for reading and writing encrypted files to passwd. These include the host, sign and identify key files. By default, the password is the string returned by the Unix gethostname() routine.
-
-q passwd
-
Set the password for writing encrypted IFF, GQ and MV identity files redirected to stdout to passwd. In effect, these files are decrypted with the -p password, then encrypted with the -q password. By default, the password is the string returned by the Unix gethostname() routine.
-
-S [ RSA | DSA ]
-
Generate a new encrypted public/private sign key file of the specified type. By default, the sign key is - the host key and has the same type. If compatibly with FIPS 140-2 is required, - the sign key type must be DSA.
-
-s host[@group]
-
Specify the Autokey host name, where host is the host name and group is the optional group name. The host name, and if provided, group name are used in host@group form as certificate subject and issuer. Specifying -s @group is allowed, and results in leaving the host name unchanged, as with -i group. The group name, or if no group is provided, the host name are also used in the file names of IFF, GQ, and MV identity scheme parameter files. If host is not specified, the default host name is the string returned by the gethostname() routine.
-
-T
-
Generate a trusted certificate. By default, the program generates nontrusted certificates.
-
-V nkeys
-
Generate nkeys encrypted server keys for the Mu-Varadharajan (MV) identity scheme. This option is mutually exclusive with the -I and -G options. Note: support for this option should be considered a work in progress.
-
-

Random Seed File

-

All cryptographically sound key generation schemes must have means to randomize the entropy seed used to initialize the internal pseudo-random number generator used by the OpenSSL library routines. If a site supports ssh, it is very likely that means to do this are already available. The entropy seed used by the OpenSSL library is contained in a file, usually called .rnd, which must be available when starting the ntp-keygen program or ntpd daemon.

-

The OpenSSL library looks for the file using the path specified by the RANDFILE environment variable in the user home directory, whether root or some other user. If the RANDFILE environment variable is not present, the library looks for the .rnd file in the user home directory. Since both the ntp-keygen program and ntpd daemon must run as root, the logical place to put this file is in /.rnd or /root/.rnd. If the file is not available or cannot be written, the program exits with a message to the system log.

-

Cryptographic Data Files

-

File and link names are in the form ntpkey_key_name.fstamp, where key is the key or parameter type, name is the host or group name and fstamp is the filestamp (NTP seconds) when the file was created). By convention, key names in generated file names include both upper and lower case characters, while key names in generated link names include only lower case characters. The filestamp is not used in generated link names.

-

The key name is a string defining the cryptographic key type. Key types include public/private keys host and sign, certificate cert and several challenge/response key types. By convention, client files used for challenges have a par subtype, as in the IFF challenge IFFpar, while server files for responses have a key subtype, as in the GQ response GQkey.

-

All files begin with two nonencrypted lines. The first line contains the file name in the format ntpkey_key_host.fstamp. The second line contains the datestamp in conventional Unix date format. Lines beginning with # are ignored.

-

The remainder of the file contains cryptographic data encoded first using ASN.1 rules, then encrypted using the DES-CBC algorithm with given password and finally written in PEM-encoded printable ASCII text preceded and followed by MIME content identifier lines.

-

The format of the symmetric keys file, ordinarily named ntp.keys, is somewhat different than the other files in the interest of backward compatibility. Ordinarily, the file is generated by this program, but it can be constructed and edited using an ordinary text editor.

- - -
- Figure 1. Typical Symmetric Key File -
-
-# ntpkey_MD5key_bk.ntp.org.3595864945
-# Thu Dec 12 19:22:25 2013
+  
+    
+    
+    ntp-keygen - generate public and private keys
+    
+  
+  
+    

ntp-keygen - generate public and private keys

+

giffrom Alice's Adventures in Wonderland, Lewis Carroll

+

Alice holds the key.

+

Last update: + 11-Jan-2018 11:55 + UTC

+
+

Related Links

+ +

Table of Contents

+ +
+

Synopsis

+

ntp-keygen [ -deGHIMPT ] [ -b modulus ] [ -c [ RSA-MD2 | RSA-MD5 | RSA-SHA + | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ] + [ -C cipher ] [-i group ] [ -l days] + [ -m modulus ] [ -p passwd1 ] [ -q passwd2 ] + [ -S [ RSA | DSA ] ] [ -s host ] [ -V nkeys ]

+

Description

+

This program generates cryptographic data files used by the NTPv4 + authentication and identity schemes. It can generate message digest keys + used in symmetric key cryptography and, if the OpenSSL software library + has been installed, it can generate host keys, sign keys, certificates, + and identity keys and parameters used by the Autokey public key + cryptography. The message digest keys file is generated in a format + compatible with NTPv3. All other files are in PEM-encoded printable ASCII + format so they can be embedded as MIME attachments in mail to other + sites.

+

When used to generate message digest keys, the program produces a file + containing ten pseudo-random printable ASCII strings suitable for the MD5 + message digest algorithm included in the distribution. If the OpenSSL + library is installed, it produces an additional ten hex-encoded random bit + strings suitable for the SHA1, AES-128 CMAC, and other message digest + algorithms. The message digest keys file must be distributed and stored + using secure means beyond the scope of NTP itself. Besides the keys used + for ordinary NTP associations, additional keys can be defined as passwords + for the ntpq + and ntpdc utility programs.

+

The remaining generated files are compatible with other OpenSSL + applications and other Public Key Infrastructure (PKI) + resources. Certificates generated by this program are compatible with + extant industry practice, although some users might find the + interpretation of X509v3 extension fields somewhat liberal. However, + the identity keys are probably not compatible with anything other than + Autokey.

+

Some files used by this program are encrypted using a private + password. The -p option specifies the password for local + encrypted files and the -q option the password for encrypted + files sent to remote sites. If no password is specified, the host name + returned by the Unix gethostname() function, normally the DNS + name of the host, is used.

+

The pw option of the crypto configuration command + specifies the read password for previously encrypted local files. + This must match the local password used by this program. If not + specified, the host name is used. Thus, if files are generated by + this program without password, they can be read back by ntpd + without password, but only on the same host.

+

Normally, encrypted files for each host are generated by that host + and used only by that host, although exceptions exist as noted later + on this page. The symmetric keys file, normally + called ntp.keys, is usually installed in /etc. + Other files and links are usually installed + in /usr/local/etc, which is normally in a shared filesystem + in NFS-mounted networks and cannot be changed by shared clients. The + location of the keys directory can be changed by the keysdir + configuration command in such cases. Normally, this is + in /etc.

+

This program directs commentary and error messages to the standard + error stream stderr and remote files to the standard output + stream stdout where they can be piped to other applications + or redirected to files. The names used for generated files and links + all begin with the string ntpkey and include the file type, + generating host and filestamp, as described in + the Cryptographic Data Files section below

+

Running the Program

+

To test and gain experience with Autokey concepts, log in as root and + change to the keys directory, usually /usr/local/etc. When + run for the first time, or if all files with names + beginning ntpkey have been removed, use + the ntp-keygen command without arguments to generate a + default RSA host key and matching RSA-MD5 certificate with expiration + date one year hence. If run again without options, the program uses + the existing keys and parameters and generates only a new certificate + with new expiration date one year hence.

+

Run the command on as many hosts as necessary. Designate one of them + as the trusted host (TH) using ntp-keygen with + the -T option and configure it to synchronize from reliable + Internet servers. Then configure the other hosts to synchronize to + the TH directly or indirectly. A certificate trail is created when + Autokey asks the immediately ascendant host towards the TH to sign its + certificate, which is then provided to the immediately descendant host + on request. All group hosts should have acyclic certificate trails + ending on the TH.

+

The host key is used to encrypt the cookie when required and so must + be RSA type. By default, the host key is also the sign key used to + encrypt signatures. A different sign key can be assigned using + the -S option and this can be either RSA or DSA type. By + default, the signature message digest type is MD5, but any combination + of sign key type and message digest type supported by the OpenSSL + library can be specified using the -c option.

+

The rules say cryptographic media should be generated with proventic + filestamps, which means the host should already be synchronized before + this program is run. This of course creates a chicken-and-egg problem + when the host is started for the first time. Accordingly, the host + time should be set by some other means, such as + eyeball-and-wristwatch, at least so that the certificate lifetime is + within the current year. After that and when the host is synchronized + to a proventic source, the certificate should be re-generated.

+

Additional information on trusted groups and identity schemes is on + the Autokey Public-Key Authentication + page.

+

Command Line Options

+
+
-b modulus
+
Set the modulus for generating identity keys to modulus + bits. The modulus defaults to 256, but can be set from 256 (32 + octets) to 2048 (256 octets). Use the larger moduli with caution, + as this can consume considerable computing resources and increases + the size of authenticated packets.
+
-c [ RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ]
+
Select certificate digital signature and message digest scheme. + Note that RSA schemes must be used with an RSA sign key and DSA + schemes must be used with a DSA sign key. The default without this + option is RSA-MD5. If compatibility with FIPS 140-2 is + required, either the DSA-SHA or DSA-SHA1 scheme + must be used.
+
-C cipher
+
Select the OpenSSL cipher to use for password-protected keys. + The openssl -h command provided with OpenSSL displays + available ciphers. The default without this option + is des-ede3-cbc.
+
-d
+
Enable debugging. This option displays the cryptographic data + produced for eye-friendly billboards.
+
-e
+
Extract the IFF or GQ public parameters from the IFFkey + or GQkey keys file previously specified. Send the + unencrypted data to the standard output stream stdout.
+
-G
+
Generate a new encrypted GQ key file for the Guillou-Quisquater + (GQ) identity scheme. This option is mutually exclusive with + the -I and -V options.
+
-H
+
Generate a new encrypted RSA public/private host key file.
+
-i group
+
Set the optional Autokey group name to group. This + is used in the identity scheme parameter file names. In that role, + the default is the host name if no group is provided. The group + name, if specified using -i or using -s following + an @ character, is also used in certificate subject and + issuer names in the form host@group and + should match the group specified via crypto ident + or server ident in ntpd's configuration file.
+
-I
+
Generate a new encrypted IFF key file for the Schnorr (IFF) + identity scheme. This option is mutually exclusive with + the -G and -V options.
+
-l days
+
Set the lifetime for certificates to days. The + default lifetime is one year (365 d).
+
-m modulus
+
Set the modulus for generating files to modulus bits. The + modulus defaults to 512, but can be set from 256 (32 octets) to 2048 + (256 octets). Use the larger moduli with caution, as this can + consume considerable computing resources and increases the size of + authenticated packets.
+
-M
+
Generate a new keys file containing 10 MD5 keys and 10 SHA keys. + An MD5 key is a string of 20 random printable ASCII characters, + while a SHA key is a string of 40 random hex digits. The file can be + edited using a text editor to change the key type or key content. + This option is mutually exclusive with all other options.
+
-P
+
Generate a new private certificate used by the PC identity scheme. + By default, the program generates public certificates. Note: the PC + identity scheme is not recommended for new installations.
+
-p passwd
+
Set the password for reading and writing encrypted files + to passwd. These include the host, sign and + identify key files. By default, the password is the string returned + by the Unix gethostname() routine.
+
-q passwd
+
Set the password for writing encrypted IFF, GQ and MV identity + files redirected to stdout to passwd=. In + effect, these files are decrypted with the -p password, + then encrypted with the -q password. By default, the + password is the string returned by the Unix gethostname() + routine.
+
-S [ RSA | DSA ]
+
Generate a new encrypted public/private sign key file of the + specified type. By default, the sign key is the host key and has + the same type. If compatibly with FIPS 140-2 is required, the sign + key type must be DSA.
+
-s host[@group]
+
Specify the Autokey host name, where host is the + host name and group is the optional group name. The + host name, and if provided, group name are used + in host@group form as certificate subject and + issuer. Specifying -s @group is allowed, and + results in leaving the host name unchanged, as + with -i group. The group name, or if no group is + provided, the host name are also used in the file names of IFF, GQ, + and MV identity scheme parameter files. If host is + not specified, the default host name is the string returned by + the gethostname() routine.
+
-T
+
Generate a trusted certificate. By default, the program generates + nontrusted certificates.
+
-V nkeys
+
Generate nkeys encrypted server keys for the + Mu-Varadharajan (MV) identity scheme. This option is mutually + exclusive with the -I and -G options. Note: + support for this option should be considered a work in + progress.
+
+

Random Seed File

+

All cryptographically sound key generation schemes must have means to + randomize the entropy seed used to initialize the internal + pseudo-random number generator used by the OpenSSL library routines. + If a site supports ssh, it is very likely that means to do + this are already available. The entropy seed used by the OpenSSL + library is contained in a file, usually called .rnd, which + must be available when starting the ntp-keygen program + or ntpd daemon.

+

The OpenSSL library looks for the file using the path specified by + the RANDFILE environment variable in the user home directory, + whether root or some other user. If the RANDFILE environment + variable is not present, the library looks for the .rnd file + in the user home directory. Since both the ntp-keygen + program and ntpd daemon must run as root, the logical place + to put this file is in /.rnd or /root/.rnd. If the + file is not available or cannot be written, the program exits with a + message to the system log.

+

Cryptographic Data Files

+

File and link names are in the + form ntpkey_key_name.fstamp, + where key is the key or parameter + type, name is the host or group name + and fstamp is the filestamp (NTP seconds) when the + file was created). By convention, key names in + generated file names include both upper and lower case characters, + while key names in generated link names include only + lower case characters. The filestamp is not used in generated link + names.

+

The key name is a string defining the cryptographic + key type. Key types include public/private keys host + and sign, certificate cert and several + challenge/response key types. By convention, client files used for + challenges have a par subtype, as in the IFF + challenge IFFpar, while server files for responses have + a key subtype, as in the GQ response GQkey.

+

All files begin with two nonencrypted lines. The first line contains + the file name in the + format ntpkey_key_host.fstamp. The second + line contains the datestamp in conventional Unix date format. + Lines beginning with # are ignored.

+

The remainder of the file contains cryptographic data encoded first + using ASN.1 rules, then encrypted using the DES-CBC algorithm with + given password and finally written in PEM-encoded printable ASCII text + preceded and followed by MIME content identifier lines.

+

The format of the symmetric keys file, ordinarily + named ntp.keys, is somewhat different than the other files in + the interest of backward compatibility. Ordinarily, the file is + generated by this program, but it can be constructed and edited using + an ordinary text editor.

+ + +
+ Figure 1. Typical Symmetric Key File +
+
+	    # ntpkey_MD5key_bk.ntp.org.3595864945
+	    # Thu Dec 12 19:22:25 2013
 
-1  MD5 L";Nw<`.I<f4U0)247"i  # MD5 key
-2  MD5 &>l0%XXK9O'51VwV<xq~  # MD5 key
-3  MD5 lb4zLW~d^!K:]RsD'qb6  # MD5 key
-4  MD5 Yue:tL[+vR)M`n~bY,'?  # MD5 key
-5  MD5 B;fxlKgr/&4ZTbL6=RxA  # MD5 key
-6  MD5 4eYwa`o}3i@@V@..R9!l  # MD5 key
-7  MD5 `A.([h+;wTQ|xfi%Sn_!  # MD5 key
-8  MD5 45:V,r4]l6y^JH6"Sh?F  # MD5 key
-9  MD5 3-5vcn*6l29DS?Xdsg)*  # MD5 key
-10 MD5 2late4Me              # MD5 key
-11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c  # SHA1 key
-12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74  # SHA1 key
-13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9  # SHA1 key
-14 SHA  a5332809c8878dd3a5b918819108a111509aeceb  # SHA  key
-15 MD2  2fe16c88c760ff2f16d4267e36c1aa6c926e6964  # MD2  key
-16 MD4  b2691811dc19cfc0e2f9bcacd74213f29812183d  # MD4  key
-17 MD5  e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c  # MD5  key
-18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc  # MDC2 key
-19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2  # RIPEMD160 key
-20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878  # AES128CMAC key
-  
-

Figure 1 shows a typical symmetric keys file used by the reference implementation. Each line of the file contains three fields, first an integer between 1 and 65534, inclusive, representing the key identifier used in the server and peer configuration commands. Next is the key type for the message digest algorithm, which in the absence of the OpenSSL library must be MD5 to designate the MD5 message digest algorithm. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by that library. However, if compatibility with FIPS 140-2 is required, the key type must be either SHA or SHA1. The key type can be changed using an ASCII text editor.

-

An MD5 key consists of a printable ASCII string less than or equal to 16 characters and terminated by whitespace or a # character. An OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which is truncated as necessary.

-

Note that the keys used by the ntpq and ntpdc programs are checked against passwords requested by the programs and entered by hand, so it is generally appropriate to specify these keys in human readable ASCII format.

-

The ntp-keygen program generates a MD5 symmetric keys file ntpkey_MD5key_hostname.filestamp. Since the file contains private shared keys, it should be visible only to root and distributed by secure means to other subnet hosts. The NTP daemon loads the file ntp.keys, so ntp-keygen installs a soft link from this name to the generated file. Subsequently, similar soft links must be installed by manual or automated means on the other subnet hosts. While this file is not used with the Autokey Version 2 protocol, it is needed to authenticate some remote configuration commands used by the ntpq and ntpdc utilities.

-

Bugs

-

It can take quite a while to generate some cryptographic values.

-
- - + 1 MD5 L";Nw<`.I<f4U0)247"i # MD5 key + 2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key + 3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key + 4 MD5 Yue:tL[+vR)M`n~bY,'? # MD5 key + 5 MD5 B;fxlKgr/&4ZTbL6=RxA # MD5 key + 6 MD5 4eYwa`o}3i@@V@..R9!l # MD5 key + 7 MD5 `A.([h+;wTQ|xfi%Sn_! # MD5 key + 8 MD5 45:V,r4]l6y^JH6.Sh?F # MD5 key + 9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key + 10 MD5 2late4Me # MD5 key + 11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key + 12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key + 13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key + 14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key + 15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key + 16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key + 17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key + 18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key + 19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key + 20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key + 21 MD5 sampo 10.1.2.3/24 +
+

Figure 1 shows a typical symmetric keys file used by the reference + implementation. Each line of the file contains three or four fields, + first an integer between 1 and 65534, inclusive, representing the key + identifier used in the server and peer configuration + commands. Second is the key type for the message digest algorithm, + which in the absence of the OpenSSL library must be MD5 to + designate the MD5 message digest algorithm. If the OpenSSL library is + installed, the key type can be any message digest algorithm supported + by that library. However, if compatibility with FIPS 140-2 is + required, the key type must be either SHA or SHA1. + The key type can be changed using an ASCII text editor.

+

The third field is the key.

+

An MD5 key consists of a printable ASCII string less than or equal to + 16 characters and terminated by whitespace or a # character. An + OpenSSL key consists of a hex-encoded ASCII string of 40 characters, + which is truncated as necessary.

+

Note that the keys used by the ntpq and ntpdc + programs are checked against passwords requested by the programs and + entered by hand, so it is generally appropriate to specify these keys + in human readable ASCII format.

+

The optional fourth field is one or more IPs, with each IP separated + with a comma. An IP may end with an optional /subnetbits + suffix, which limits the acceptance of the key identifier to packets + claiming to be from the described IP space.

+

The ntp-keygen program generates a MD5 symmetric keys + file ntpkey_MD5key_hostname.filestamp. Since the file + contains private shared keys, it should be visible only to root and + distributed by secure means to other subnet hosts. The NTP daemon + loads the file ntp.keys, so ntp-keygen installs a + soft link from this name to the generated file. Subsequently, similar + soft links must be installed by manual or automated means on the other + subnet hosts. While this file is not used with the Autokey Version 2 + protocol, it is needed to authenticate some remote configuration + commands used by the ntpq + and ntpdc utilities.

+

Bugs

+

It can take quite a while to generate some cryptographic values.

+
+ + diff --git a/include/ntp_request.h b/include/ntp_request.h index 93a27e2ad..52c973f0a 100644 --- a/include/ntp_request.h +++ b/include/ntp_request.h @@ -513,6 +513,8 @@ struct info_sys_stats { u_int32 badauth; /* bad authentication */ u_int32 received; /* packets received */ u_int32 limitrejected; /* rate exceeded */ + u_int32 lamport; /* Lamport violations */ + u_int32 tsrounding; /* Timestamp rounding errors */ }; diff --git a/include/ntpd.h b/include/ntpd.h index 2b4bddcd6..39266ffcb 100644 --- a/include/ntpd.h +++ b/include/ntpd.h @@ -500,18 +500,19 @@ extern u_int sys_ttlmax; /* max ttl mapping vector index */ /* * Statistics counters */ -extern u_long sys_stattime; /* time since reset */ -extern u_long sys_received; /* packets received */ -extern u_long sys_processed; /* packets for this host */ -extern u_long sys_restricted; /* restricted packets */ -extern u_long sys_newversion; /* current version */ -extern u_long sys_oldversion; /* old version */ -extern u_long sys_restricted; /* access denied */ -extern u_long sys_badlength; /* bad length or format */ extern u_long sys_badauth; /* bad authentication */ +extern u_long sys_badlength; /* bad length or format */ extern u_long sys_declined; /* declined */ -extern u_long sys_limitrejected; /* rate exceeded */ extern u_long sys_kodsent; /* KoD sent */ +extern u_long sys_lamport; /* Lamport violation */ +extern u_long sys_limitrejected; /* rate exceeded */ +extern u_long sys_newversion; /* current version */ +extern u_long sys_oldversion; /* old version */ +extern u_long sys_processed; /* packets for this host */ +extern u_long sys_received; /* packets received */ +extern u_long sys_restricted; /* access denied */ +extern u_long sys_stattime; /* time since reset */ +extern u_long sys_tsrounding; /* timestamp rounding errors */ /* ntp_request.c */ extern keyid_t info_auth_keyid; /* keyid used to authenticate requests */ diff --git a/libntp/systime.c b/libntp/systime.c index 18528438a..8e7089746 100644 --- a/libntp/systime.c +++ b/libntp/systime.c @@ -31,6 +31,9 @@ int allow_panic = FALSE; /* allow panic correction (-g) */ int enable_panic_check = TRUE; /* Can we check allow_panic's state? */ +u_long sys_lamport; /* Lamport violation */ +u_long sys_tsrounding; /* timestamp rounding errors */ + #ifndef USE_COMPILETIME_PIVOT # define USE_COMPILETIME_PIVOT 1 #endif @@ -114,7 +117,7 @@ set_sys_fuzz( INSIST(sys_fuzz >= 0); INSIST(sys_fuzz <= 1.0); /* [Bug 3450] ensure nsec fuzz >= sys_fuzz to reduce chance of - * short falling fuzz advance + * short-falling fuzz advance */ sys_fuzz_nsec = (long)ceil(sys_fuzz * 1e9); } @@ -194,8 +197,10 @@ get_systime( * introduce small steps backward. It should not be an issue on * systems where get_ostime() results in a true syscall.) */ - if (cmp_tspec(add_tspec_ns(ts, 50000000), ts_last) < 0) + if (cmp_tspec(add_tspec_ns(ts, 50000000), ts_last) < 0) { lamport_violated = 1; + sys_lamport++; + } ts_last = ts; /* @@ -248,10 +253,10 @@ get_systime( * along silently. */ if (!USING_SIGIO()) { - if (!L_ISZERO(&lfp_prev) && - !lamport_violated && - (sys_fuzz > 0.0) ) - { + if ( !L_ISZERO(&lfp_prev) + && !lamport_violated + && (sys_fuzz > 0.0) + ) { lfpdelta = result; L_SUB(&lfpdelta, &lfp_prev); L_SUBUF(&lfpdelta, 1); @@ -262,6 +267,7 @@ get_systime( lfptoa(&lfpdelta, 9))); result = lfp_prev; L_ADDUF(&result, 1); + sys_tsrounding++; } } lfp_prev = result; diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi index 7b93dd65c..509864dca 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 May 19, 2017 at 12:32:59 PM by AutoGen 5.18.5 +# It has been AutoGen-ed January 11, 2018 at 12:04:08 PM by AutoGen 5.18.5 # From the definitions ntp.keys.def # and the template file agtexi-file.tpl @end ignore @@ -45,16 +45,24 @@ where is a positive integer (between 1 and 65534), @kbd{type} is the message digest algorithm, -and @kbd{key} is the key itself, and @kbd{opt_IP_list} is an optional comma-separated list of IPs +where the +@kbd{keyno} +should be trusted. that are allowed to serve time. +Each IP in +@kbd{opt_IP_list} +may contain an optional +@code{/subnetbits} +specification which identifies the number of bits for +the desired subnet of trust. If @kbd{opt_IP_list} is empty, -any properly-authenticated server message will be +any properly-authenticated message will be accepted. The diff --git a/ntpd/ntp.keys.5man b/ntpd/ntp.keys.5man index 61b64b654..12884b856 100644 --- a/ntpd/ntp.keys.5man +++ b/ntpd/ntp.keys.5man @@ -1,8 +1,8 @@ -.TH ntp.keys 5man "19 May 2017" "4.2.8p10" "File Formats" +.TH ntp.keys 5man "11 Jan 2018" "4.2.8p10" "File Formats" .\" .\" EDIT THIS FILE WITH CAUTION (ntp.man) .\" -.\" It has been AutoGen-ed May 19, 2017 at 12:33:02 PM by AutoGen 5.18.5 +.\" It has been AutoGen-ed January 11, 2018 at 12:04:09 PM by AutoGen 5.18.5 .\" From the definitions ntp.keys.def .\" and the template file agman-file.tpl .Sh NAME @@ -76,16 +76,24 @@ where is a positive integer (between 1 and 65534), \f\*[I-Font]type\f[] is the message digest algorithm, -and \f\*[I-Font]key\f[] is the key itself, and \f\*[I-Font]opt_IP_list\f[] is an optional comma-separated list of IPs +where the +\f\*[I-Font]keyno\f[] +should be trusted. that are allowed to serve time. +Each IP in +\f\*[I-Font]opt_IP_list\f[] +may contain an optional +\f\*[B-Font]/subnetbits\f[] +specification which identifies the number of bits for +the desired subnet of trust. If \f\*[I-Font]opt_IP_list\f[] is empty, -any properly-authenticated server message will be +any properly-authenticated message will be accepted. .sp \n(Ppu .ne 2 diff --git a/ntpd/ntp.keys.5mdoc b/ntpd/ntp.keys.5mdoc index d9cf51dc0..15fa6b4f3 100644 --- a/ntpd/ntp.keys.5mdoc +++ b/ntpd/ntp.keys.5mdoc @@ -1,9 +1,9 @@ -.Dd May 19 2017 +.Dd January 11 2018 .Dt NTP_KEYS 5mdoc File Formats .Os Linux 3.2.0-4-686-pae .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed May 19, 2017 at 12:32:54 PM by AutoGen 5.18.5 +.\" It has been AutoGen-ed January 11, 2018 at 12:04:07 PM by AutoGen 5.18.5 .\" From the definitions ntp.keys.def .\" and the template file agmdoc-file.tpl .Sh NAME @@ -51,16 +51,24 @@ where is a positive integer (between 1 and 65534), .Ar type is the message digest algorithm, -and .Ar key is the key itself, and .Ar opt_IP_list is an optional comma\-separated list of IPs +where the +.Ar keyno +should be trusted. that are allowed to serve time. +Each IP in +.Ar opt_IP_list +may contain an optional +.Cm /subnetbits +specification which identifies the number of bits for +the desired subnet of trust. If .Ar opt_IP_list is empty, -any properly\-authenticated server message will be +any properly\-authenticated message will be accepted. .Pp The diff --git a/ntpd/ntp.keys.def b/ntpd/ntp.keys.def index efe774c2e..88dd2aac3 100644 --- a/ntpd/ntp.keys.def +++ b/ntpd/ntp.keys.def @@ -50,16 +50,24 @@ where is a positive integer (between 1 and 65534), .Ar type is the message digest algorithm, -and .Ar key is the key itself, and .Ar opt_IP_list is an optional comma-separated list of IPs +where the +.Ar keyno +should be trusted. that are allowed to serve time. +Each IP in +.Ar opt_IP_list +may contain an optional +.Cm /subnetbits +specification which identifies the number of bits for +the desired subnet of trust. If .Ar opt_IP_list is empty, -any properly-authenticated server message will be +any properly-authenticated message will be accepted. .Pp The diff --git a/ntpd/ntp.keys.man.in b/ntpd/ntp.keys.man.in index cf1aa1162..3459e3882 100644 --- a/ntpd/ntp.keys.man.in +++ b/ntpd/ntp.keys.man.in @@ -1,8 +1,8 @@ -.TH ntp.keys 5 "19 May 2017" "4.2.8p10" "File Formats" +.TH ntp.keys 5 "11 Jan 2018" "4.2.8p10" "File Formats" .\" .\" EDIT THIS FILE WITH CAUTION (ntp.man) .\" -.\" It has been AutoGen-ed May 19, 2017 at 12:33:02 PM by AutoGen 5.18.5 +.\" It has been AutoGen-ed January 11, 2018 at 12:04:09 PM by AutoGen 5.18.5 .\" From the definitions ntp.keys.def .\" and the template file agman-file.tpl .Sh NAME @@ -76,16 +76,24 @@ where is a positive integer (between 1 and 65534), \f\*[I-Font]type\f[] is the message digest algorithm, -and \f\*[I-Font]key\f[] is the key itself, and \f\*[I-Font]opt_IP_list\f[] is an optional comma-separated list of IPs +where the +\f\*[I-Font]keyno\f[] +should be trusted. that are allowed to serve time. +Each IP in +\f\*[I-Font]opt_IP_list\f[] +may contain an optional +\f\*[B-Font]/subnetbits\f[] +specification which identifies the number of bits for +the desired subnet of trust. If \f\*[I-Font]opt_IP_list\f[] is empty, -any properly-authenticated server message will be +any properly-authenticated message will be accepted. .sp \n(Ppu .ne 2 diff --git a/ntpd/ntp.keys.mdoc.in b/ntpd/ntp.keys.mdoc.in index f8c9cd325..9e165a52c 100644 --- a/ntpd/ntp.keys.mdoc.in +++ b/ntpd/ntp.keys.mdoc.in @@ -1,9 +1,9 @@ -.Dd May 19 2017 +.Dd January 11 2018 .Dt NTP_KEYS 5 File Formats .Os Linux 3.2.0-4-686-pae .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed May 19, 2017 at 12:32:54 PM by AutoGen 5.18.5 +.\" It has been AutoGen-ed January 11, 2018 at 12:04:07 PM by AutoGen 5.18.5 .\" From the definitions ntp.keys.def .\" and the template file agmdoc-file.tpl .Sh NAME @@ -51,16 +51,24 @@ where is a positive integer (between 1 and 65534), .Ar type is the message digest algorithm, -and .Ar key is the key itself, and .Ar opt_IP_list is an optional comma\-separated list of IPs +where the +.Ar keyno +should be trusted. that are allowed to serve time. +Each IP in +.Ar opt_IP_list +may contain an optional +.Cm /subnetbits +specification which identifies the number of bits for +the desired subnet of trust. If .Ar opt_IP_list is empty, -any properly\-authenticated server message will be +any properly\-authenticated message will be accepted. .Pp The diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c index 57d65238c..756a874c1 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -176,56 +176,58 @@ static const struct ctl_proc control_codes[] = { #define CS_SS_LIMITED 41 #define CS_SS_KODSENT 42 #define CS_SS_PROCESSED 43 -#define CS_PEERADR 44 -#define CS_PEERMODE 45 -#define CS_BCASTDELAY 46 -#define CS_AUTHDELAY 47 -#define CS_AUTHKEYS 48 -#define CS_AUTHFREEK 49 -#define CS_AUTHKLOOKUPS 50 -#define CS_AUTHKNOTFOUND 51 -#define CS_AUTHKUNCACHED 52 -#define CS_AUTHKEXPIRED 53 -#define CS_AUTHENCRYPTS 54 -#define CS_AUTHDECRYPTS 55 -#define CS_AUTHRESET 56 -#define CS_K_OFFSET 57 -#define CS_K_FREQ 58 -#define CS_K_MAXERR 59 -#define CS_K_ESTERR 60 -#define CS_K_STFLAGS 61 -#define CS_K_TIMECONST 62 -#define CS_K_PRECISION 63 -#define CS_K_FREQTOL 64 -#define CS_K_PPS_FREQ 65 -#define CS_K_PPS_STABIL 66 -#define CS_K_PPS_JITTER 67 -#define CS_K_PPS_CALIBDUR 68 -#define CS_K_PPS_CALIBS 69 -#define CS_K_PPS_CALIBERRS 70 -#define CS_K_PPS_JITEXC 71 -#define CS_K_PPS_STBEXC 72 +#define CS_SS_LAMPORT 44 +#define CS_SS_TSROUNDING 45 +#define CS_PEERADR 46 +#define CS_PEERMODE 47 +#define CS_BCASTDELAY 48 +#define CS_AUTHDELAY 49 +#define CS_AUTHKEYS 50 +#define CS_AUTHFREEK 51 +#define CS_AUTHKLOOKUPS 52 +#define CS_AUTHKNOTFOUND 53 +#define CS_AUTHKUNCACHED 54 +#define CS_AUTHKEXPIRED 55 +#define CS_AUTHENCRYPTS 56 +#define CS_AUTHDECRYPTS 57 +#define CS_AUTHRESET 58 +#define CS_K_OFFSET 59 +#define CS_K_FREQ 60 +#define CS_K_MAXERR 61 +#define CS_K_ESTERR 62 +#define CS_K_STFLAGS 63 +#define CS_K_TIMECONST 64 +#define CS_K_PRECISION 65 +#define CS_K_FREQTOL 66 +#define CS_K_PPS_FREQ 67 +#define CS_K_PPS_STABIL 68 +#define CS_K_PPS_JITTER 69 +#define CS_K_PPS_CALIBDUR 70 +#define CS_K_PPS_CALIBS 71 +#define CS_K_PPS_CALIBERRS 72 +#define CS_K_PPS_JITEXC 73 +#define CS_K_PPS_STBEXC 74 #define CS_KERN_FIRST CS_K_OFFSET #define CS_KERN_LAST CS_K_PPS_STBEXC -#define CS_IOSTATS_RESET 73 -#define CS_TOTAL_RBUF 74 -#define CS_FREE_RBUF 75 -#define CS_USED_RBUF 76 -#define CS_RBUF_LOWATER 77 -#define CS_IO_DROPPED 78 -#define CS_IO_IGNORED 79 -#define CS_IO_RECEIVED 80 -#define CS_IO_SENT 81 -#define CS_IO_SENDFAILED 82 -#define CS_IO_WAKEUPS 83 -#define CS_IO_GOODWAKEUPS 84 -#define CS_TIMERSTATS_RESET 85 -#define CS_TIMER_OVERRUNS 86 -#define CS_TIMER_XMTS 87 -#define CS_FUZZ 88 -#define CS_WANDER_THRESH 89 -#define CS_LEAPSMEARINTV 90 -#define CS_LEAPSMEAROFFS 91 +#define CS_IOSTATS_RESET 75 +#define CS_TOTAL_RBUF 76 +#define CS_FREE_RBUF 77 +#define CS_USED_RBUF 78 +#define CS_RBUF_LOWATER 79 +#define CS_IO_DROPPED 80 +#define CS_IO_IGNORED 81 +#define CS_IO_RECEIVED 82 +#define CS_IO_SENT 83 +#define CS_IO_SENDFAILED 84 +#define CS_IO_WAKEUPS 85 +#define CS_IO_GOODWAKEUPS 86 +#define CS_TIMERSTATS_RESET 87 +#define CS_TIMER_OVERRUNS 88 +#define CS_TIMER_XMTS 89 +#define CS_FUZZ 90 +#define CS_WANDER_THRESH 91 +#define CS_LEAPSMEARINTV 92 +#define CS_LEAPSMEAROFFS 93 #define CS_MAX_NOAUTOKEY CS_LEAPSMEAROFFS #ifdef AUTOKEY #define CS_FLAGS (1 + CS_MAX_NOAUTOKEY) @@ -376,55 +378,57 @@ static const struct ctl_var sys_var[] = { { CS_SS_LIMITED, RO, "ss_limited" }, /* 41 */ { CS_SS_KODSENT, RO, "ss_kodsent" }, /* 42 */ { CS_SS_PROCESSED, RO, "ss_processed" }, /* 43 */ - { CS_PEERADR, RO, "peeradr" }, /* 44 */ - { CS_PEERMODE, RO, "peermode" }, /* 45 */ - { CS_BCASTDELAY, RO, "bcastdelay" }, /* 46 */ - { CS_AUTHDELAY, RO, "authdelay" }, /* 47 */ - { CS_AUTHKEYS, RO, "authkeys" }, /* 48 */ - { CS_AUTHFREEK, RO, "authfreek" }, /* 49 */ - { CS_AUTHKLOOKUPS, RO, "authklookups" }, /* 50 */ - { CS_AUTHKNOTFOUND, RO, "authknotfound" }, /* 51 */ - { CS_AUTHKUNCACHED, RO, "authkuncached" }, /* 52 */ - { CS_AUTHKEXPIRED, RO, "authkexpired" }, /* 53 */ - { CS_AUTHENCRYPTS, RO, "authencrypts" }, /* 54 */ - { CS_AUTHDECRYPTS, RO, "authdecrypts" }, /* 55 */ - { CS_AUTHRESET, RO, "authreset" }, /* 56 */ - { CS_K_OFFSET, RO, "koffset" }, /* 57 */ - { CS_K_FREQ, RO, "kfreq" }, /* 58 */ - { CS_K_MAXERR, RO, "kmaxerr" }, /* 59 */ - { CS_K_ESTERR, RO, "kesterr" }, /* 60 */ - { CS_K_STFLAGS, RO, "kstflags" }, /* 61 */ - { CS_K_TIMECONST, RO, "ktimeconst" }, /* 62 */ - { CS_K_PRECISION, RO, "kprecis" }, /* 63 */ - { CS_K_FREQTOL, RO, "kfreqtol" }, /* 64 */ - { CS_K_PPS_FREQ, RO, "kppsfreq" }, /* 65 */ - { CS_K_PPS_STABIL, RO, "kppsstab" }, /* 66 */ - { CS_K_PPS_JITTER, RO, "kppsjitter" }, /* 67 */ - { CS_K_PPS_CALIBDUR, RO, "kppscalibdur" }, /* 68 */ - { CS_K_PPS_CALIBS, RO, "kppscalibs" }, /* 69 */ - { CS_K_PPS_CALIBERRS, RO, "kppscaliberrs" }, /* 70 */ - { CS_K_PPS_JITEXC, RO, "kppsjitexc" }, /* 71 */ - { CS_K_PPS_STBEXC, RO, "kppsstbexc" }, /* 72 */ - { CS_IOSTATS_RESET, RO, "iostats_reset" }, /* 73 */ - { CS_TOTAL_RBUF, RO, "total_rbuf" }, /* 74 */ - { CS_FREE_RBUF, RO, "free_rbuf" }, /* 75 */ - { CS_USED_RBUF, RO, "used_rbuf" }, /* 76 */ - { CS_RBUF_LOWATER, RO, "rbuf_lowater" }, /* 77 */ - { CS_IO_DROPPED, RO, "io_dropped" }, /* 78 */ - { CS_IO_IGNORED, RO, "io_ignored" }, /* 79 */ - { CS_IO_RECEIVED, RO, "io_received" }, /* 80 */ - { CS_IO_SENT, RO, "io_sent" }, /* 81 */ - { CS_IO_SENDFAILED, RO, "io_sendfailed" }, /* 82 */ - { CS_IO_WAKEUPS, RO, "io_wakeups" }, /* 83 */ - { CS_IO_GOODWAKEUPS, RO, "io_goodwakeups" }, /* 84 */ - { CS_TIMERSTATS_RESET, RO, "timerstats_reset" },/* 85 */ - { CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 86 */ - { CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */ - { CS_FUZZ, RO, "fuzz" }, /* 88 */ - { CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */ - - { CS_LEAPSMEARINTV, RO, "leapsmearinterval" }, /* 90 */ - { CS_LEAPSMEAROFFS, RO, "leapsmearoffset" }, /* 91 */ + { CS_SS_LAMPORT, RO, "ss_lamport" }, /* 44 */ + { CS_SS_TSROUNDING, RO, "ss_tsrounding" }, /* 45 */ + { CS_PEERADR, RO, "peeradr" }, /* 46 */ + { CS_PEERMODE, RO, "peermode" }, /* 47 */ + { CS_BCASTDELAY, RO, "bcastdelay" }, /* 48 */ + { CS_AUTHDELAY, RO, "authdelay" }, /* 49 */ + { CS_AUTHKEYS, RO, "authkeys" }, /* 50 */ + { CS_AUTHFREEK, RO, "authfreek" }, /* 51 */ + { CS_AUTHKLOOKUPS, RO, "authklookups" }, /* 52 */ + { CS_AUTHKNOTFOUND, RO, "authknotfound" }, /* 53 */ + { CS_AUTHKUNCACHED, RO, "authkuncached" }, /* 54 */ + { CS_AUTHKEXPIRED, RO, "authkexpired" }, /* 55 */ + { CS_AUTHENCRYPTS, RO, "authencrypts" }, /* 56 */ + { CS_AUTHDECRYPTS, RO, "authdecrypts" }, /* 57 */ + { CS_AUTHRESET, RO, "authreset" }, /* 58 */ + { CS_K_OFFSET, RO, "koffset" }, /* 59 */ + { CS_K_FREQ, RO, "kfreq" }, /* 60 */ + { CS_K_MAXERR, RO, "kmaxerr" }, /* 61 */ + { CS_K_ESTERR, RO, "kesterr" }, /* 62 */ + { CS_K_STFLAGS, RO, "kstflags" }, /* 63 */ + { CS_K_TIMECONST, RO, "ktimeconst" }, /* 64 */ + { CS_K_PRECISION, RO, "kprecis" }, /* 65 */ + { CS_K_FREQTOL, RO, "kfreqtol" }, /* 66 */ + { CS_K_PPS_FREQ, RO, "kppsfreq" }, /* 67 */ + { CS_K_PPS_STABIL, RO, "kppsstab" }, /* 68 */ + { CS_K_PPS_JITTER, RO, "kppsjitter" }, /* 69 */ + { CS_K_PPS_CALIBDUR, RO, "kppscalibdur" }, /* 70 */ + { CS_K_PPS_CALIBS, RO, "kppscalibs" }, /* 71 */ + { CS_K_PPS_CALIBERRS, RO, "kppscaliberrs" }, /* 72 */ + { CS_K_PPS_JITEXC, RO, "kppsjitexc" }, /* 73 */ + { CS_K_PPS_STBEXC, RO, "kppsstbexc" }, /* 74 */ + { CS_IOSTATS_RESET, RO, "iostats_reset" }, /* 75 */ + { CS_TOTAL_RBUF, RO, "total_rbuf" }, /* 76 */ + { CS_FREE_RBUF, RO, "free_rbuf" }, /* 77 */ + { CS_USED_RBUF, RO, "used_rbuf" }, /* 78 */ + { CS_RBUF_LOWATER, RO, "rbuf_lowater" }, /* 79 */ + { CS_IO_DROPPED, RO, "io_dropped" }, /* 80 */ + { CS_IO_IGNORED, RO, "io_ignored" }, /* 81 */ + { CS_IO_RECEIVED, RO, "io_received" }, /* 82 */ + { CS_IO_SENT, RO, "io_sent" }, /* 83 */ + { CS_IO_SENDFAILED, RO, "io_sendfailed" }, /* 84 */ + { CS_IO_WAKEUPS, RO, "io_wakeups" }, /* 85 */ + { CS_IO_GOODWAKEUPS, RO, "io_goodwakeups" }, /* 86 */ + { CS_TIMERSTATS_RESET, RO, "timerstats_reset" },/* 87 */ + { CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 88 */ + { CS_TIMER_XMTS, RO, "timer_xmts" }, /* 89 */ + { CS_FUZZ, RO, "fuzz" }, /* 90 */ + { CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 91 */ + + { CS_LEAPSMEARINTV, RO, "leapsmearinterval" }, /* 92 */ + { CS_LEAPSMEAROFFS, RO, "leapsmearoffset" }, /* 93 */ #ifdef AUTOKEY { CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */ @@ -436,7 +440,7 @@ static const struct ctl_var sys_var[] = { { CS_IDENT, RO, "ident" }, /* 7 + CS_MAX_NOAUTOKEY */ { CS_DIGEST, RO, "digest" }, /* 8 + CS_MAX_NOAUTOKEY */ #endif /* AUTOKEY */ - { 0, EOV, "" } /* 87/95 */ + { 0, EOV, "" } /* 94/102 */ }; static struct ctl_var *ext_sys_var = NULL; @@ -2218,6 +2222,14 @@ ctl_putsys( ctl_putuint(sys_var[varid].text, sys_limitrejected); break; + case CS_SS_LAMPORT: + ctl_putuint(sys_var[varid].text, sys_lamport); + break; + + case CS_SS_TSROUNDING: + ctl_putuint(sys_var[varid].text, sys_tsrounding); + break; + case CS_SS_KODSENT: ctl_putuint(sys_var[varid].text, sys_kodsent); break; diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c index b445aeee2..a8a8c20c4 100644 --- a/ntpd/ntp_parser.c +++ b/ntpd/ntp_parser.c @@ -96,7 +96,7 @@ # define ONLY_SIM(a) NULL #endif -#line 100 "ntp_parser.c" /* yacc.c:339 */ +#line 100 "../../ntpd/ntp_parser.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -116,8 +116,8 @@ /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ -#ifndef YY_YY_NTP_PARSER_H_INCLUDED -# define YY_YY_NTP_PARSER_H_INCLUDED +#ifndef YY_YY_Y_TAB_H_INCLUDED +# define YY_YY_Y_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -557,7 +557,7 @@ union YYSTYPE script_info * Sim_script; script_info_fifo * Sim_script_fifo; -#line 561 "ntp_parser.c" /* yacc.c:355 */ +#line 561 "../../ntpd/ntp_parser.c" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; @@ -570,11 +570,11 @@ extern YYSTYPE yylval; int yyparse (void); -#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */ +#endif /* !YY_YY_Y_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ -#line 578 "ntp_parser.c" /* yacc.c:358 */ +#line 578 "../../ntpd/ntp_parser.c" /* yacc.c:358 */ #ifdef short # undef short @@ -2131,7 +2131,7 @@ yyreduce: ip_ctx->errpos.nline, ip_ctx->errpos.ncol); } -#line 2135 "ntp_parser.c" /* yacc.c:1646 */ +#line 2135 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 20: @@ -2142,37 +2142,37 @@ yyreduce: 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 2146 "ntp_parser.c" /* yacc.c:1646 */ +#line 2146 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 27: #line 437 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); } -#line 2152 "ntp_parser.c" /* yacc.c:1646 */ +#line 2152 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 28: #line 442 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); } -#line 2158 "ntp_parser.c" /* yacc.c:1646 */ +#line 2158 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 29: #line 447 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Integer) = AF_INET; } -#line 2164 "ntp_parser.c" /* yacc.c:1646 */ +#line 2164 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 30: #line 449 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Integer) = AF_INET6; } -#line 2170 "ntp_parser.c" /* yacc.c:1646 */ +#line 2170 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 31: #line 454 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val_fifo) = NULL; } -#line 2176 "ntp_parser.c" /* yacc.c:1646 */ +#line 2176 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 32: @@ -2181,31 +2181,31 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2185 "ntp_parser.c" /* yacc.c:1646 */ +#line 2185 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 36: #line 470 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } -#line 2191 "ntp_parser.c" /* yacc.c:1646 */ +#line 2191 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 45: #line 486 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2197 "ntp_parser.c" /* yacc.c:1646 */ +#line 2197 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 46: #line 488 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2203 "ntp_parser.c" /* yacc.c:1646 */ +#line 2203 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 53: #line 502 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 2209 "ntp_parser.c" /* yacc.c:1646 */ +#line 2209 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 55: @@ -2217,31 +2217,31 @@ yyreduce: if (my_node) APPEND_G_FIFO(cfgt.unpeers, my_node); } -#line 2221 "ntp_parser.c" /* yacc.c:1646 */ +#line 2221 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 58: #line 537 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.broadcastclient = 1; } -#line 2227 "ntp_parser.c" /* yacc.c:1646 */ +#line 2227 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 59: #line 539 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); } -#line 2233 "ntp_parser.c" /* yacc.c:1646 */ +#line 2233 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 60: #line 541 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); } -#line 2239 "ntp_parser.c" /* yacc.c:1646 */ +#line 2239 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 61: #line 543 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.mdnstries = (yyvsp[0].Integer); } -#line 2245 "ntp_parser.c" /* yacc.c:1646 */ +#line 2245 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 62: @@ -2252,13 +2252,13 @@ yyreduce: atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); APPEND_G_FIFO(cfgt.vars, atrv); } -#line 2256 "ntp_parser.c" /* yacc.c:1646 */ +#line 2256 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 63: #line 561 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.auth.control_key = (yyvsp[0].Integer); } -#line 2262 "ntp_parser.c" /* yacc.c:1646 */ +#line 2262 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 64: @@ -2267,31 +2267,31 @@ yyreduce: cfgt.auth.cryptosw++; CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo)); } -#line 2271 "ntp_parser.c" /* yacc.c:1646 */ +#line 2271 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 65: #line 568 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.auth.keys = (yyvsp[0].String); } -#line 2277 "ntp_parser.c" /* yacc.c:1646 */ +#line 2277 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 66: #line 570 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.auth.keysdir = (yyvsp[0].String); } -#line 2283 "ntp_parser.c" /* yacc.c:1646 */ +#line 2283 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 67: #line 572 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.auth.request_key = (yyvsp[0].Integer); } -#line 2289 "ntp_parser.c" /* yacc.c:1646 */ +#line 2289 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 68: #line 574 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.auth.revoke = (yyvsp[0].Integer); } -#line 2295 "ntp_parser.c" /* yacc.c:1646 */ +#line 2295 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 69: @@ -2305,19 +2305,19 @@ 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 2309 "ntp_parser.c" /* yacc.c:1646 */ +#line 2309 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 70: #line 586 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); } -#line 2315 "ntp_parser.c" /* yacc.c:1646 */ +#line 2315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 71: #line 591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val_fifo) = NULL; } -#line 2321 "ntp_parser.c" /* yacc.c:1646 */ +#line 2321 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 72: @@ -2326,13 +2326,13 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2330 "ntp_parser.c" /* yacc.c:1646 */ +#line 2330 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 73: #line 601 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 2336 "ntp_parser.c" /* yacc.c:1646 */ +#line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 74: @@ -2345,13 +2345,13 @@ yyreduce: "please use 'revoke %d' instead.", cfgt.auth.revoke, cfgt.auth.revoke); } -#line 2349 "ntp_parser.c" /* yacc.c:1646 */ +#line 2349 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 80: #line 628 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); } -#line 2355 "ntp_parser.c" /* yacc.c:1646 */ +#line 2355 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 81: @@ -2360,7 +2360,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2364 "ntp_parser.c" /* yacc.c:1646 */ +#line 2364 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 82: @@ -2369,37 +2369,37 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2373 "ntp_parser.c" /* yacc.c:1646 */ +#line 2373 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 83: #line 646 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); } -#line 2379 "ntp_parser.c" /* yacc.c:1646 */ +#line 2379 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 84: #line 648 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } -#line 2385 "ntp_parser.c" /* yacc.c:1646 */ +#line 2385 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 85: #line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); } -#line 2391 "ntp_parser.c" /* yacc.c:1646 */ +#line 2391 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 86: #line 652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); } -#line 2397 "ntp_parser.c" /* yacc.c:1646 */ +#line 2397 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 98: #line 679 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); } -#line 2403 "ntp_parser.c" /* yacc.c:1646 */ +#line 2403 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 99: @@ -2412,7 +2412,7 @@ yyreduce: yyerror("statsdir remote configuration ignored"); } } -#line 2416 "ntp_parser.c" /* yacc.c:1646 */ +#line 2416 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 100: @@ -2423,7 +2423,7 @@ yyreduce: fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo)); APPEND_G_FIFO(cfgt.filegen_opts, fgn); } -#line 2427 "ntp_parser.c" /* yacc.c:1646 */ +#line 2427 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 101: @@ -2432,7 +2432,7 @@ yyreduce: (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 2436 "ntp_parser.c" /* yacc.c:1646 */ +#line 2436 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 102: @@ -2441,13 +2441,13 @@ yyreduce: (yyval.Int_fifo) = NULL; APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 2445 "ntp_parser.c" /* yacc.c:1646 */ +#line 2445 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 111: #line 724 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val_fifo) = NULL; } -#line 2451 "ntp_parser.c" /* yacc.c:1646 */ +#line 2451 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 112: @@ -2456,7 +2456,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2460 "ntp_parser.c" /* yacc.c:1646 */ +#line 2460 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 113: @@ -2470,7 +2470,7 @@ yyreduce: yyerror("filegen file remote config ignored"); } } -#line 2474 "ntp_parser.c" /* yacc.c:1646 */ +#line 2474 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 114: @@ -2483,7 +2483,7 @@ yyreduce: yyerror("filegen type remote config ignored"); } } -#line 2487 "ntp_parser.c" /* yacc.c:1646 */ +#line 2487 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 115: @@ -2502,13 +2502,13 @@ yyreduce: yyerror(err); } } -#line 2506 "ntp_parser.c" /* yacc.c:1646 */ +#line 2506 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 116: #line 768 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } -#line 2512 "ntp_parser.c" /* yacc.c:1646 */ +#line 2512 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 128: @@ -2516,7 +2516,7 @@ yyreduce: { CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo)); } -#line 2520 "ntp_parser.c" /* yacc.c:1646 */ +#line 2520 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 129: @@ -2524,7 +2524,7 @@ yyreduce: { CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo)); } -#line 2528 "ntp_parser.c" /* yacc.c:1646 */ +#line 2528 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 130: @@ -2536,7 +2536,7 @@ yyreduce: lex_current()->curpos.nline); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2540 "ntp_parser.c" /* yacc.c:1646 */ +#line 2540 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 131: @@ -2548,7 +2548,7 @@ yyreduce: lex_current()->curpos.nline); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2552 "ntp_parser.c" /* yacc.c:1646 */ +#line 2552 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 132: @@ -2560,7 +2560,7 @@ yyreduce: lex_current()->curpos.nline); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2564 "ntp_parser.c" /* yacc.c:1646 */ +#line 2564 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 133: @@ -2579,7 +2579,7 @@ yyreduce: lex_current()->curpos.nline); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2583 "ntp_parser.c" /* yacc.c:1646 */ +#line 2583 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 134: @@ -2598,7 +2598,7 @@ yyreduce: lex_current()->curpos.nline); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2602 "ntp_parser.c" /* yacc.c:1646 */ +#line 2602 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 135: @@ -2611,13 +2611,13 @@ yyreduce: NULL, NULL, (yyvsp[0].Int_fifo), lex_current()->curpos.nline); APPEND_G_FIFO(cfgt.restrict_opts, rn); } -#line 2615 "ntp_parser.c" /* yacc.c:1646 */ +#line 2615 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 136: #line 872 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Int_fifo) = NULL; } -#line 2621 "ntp_parser.c" /* yacc.c:1646 */ +#line 2621 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 137: @@ -2626,7 +2626,7 @@ yyreduce: (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 2630 "ntp_parser.c" /* yacc.c:1646 */ +#line 2630 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 155: @@ -2635,7 +2635,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2639 "ntp_parser.c" /* yacc.c:1646 */ +#line 2639 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 156: @@ -2644,13 +2644,13 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2648 "ntp_parser.c" /* yacc.c:1646 */ +#line 2648 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 157: #line 915 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2654 "ntp_parser.c" /* yacc.c:1646 */ +#line 2654 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 161: @@ -2659,7 +2659,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2663 "ntp_parser.c" /* yacc.c:1646 */ +#line 2663 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 162: @@ -2668,13 +2668,13 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2672 "ntp_parser.c" /* yacc.c:1646 */ +#line 2672 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 163: #line 939 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2678 "ntp_parser.c" /* yacc.c:1646 */ +#line 2678 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 172: @@ -2685,7 +2685,7 @@ yyreduce: aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo)); APPEND_G_FIFO(cfgt.fudge, aon); } -#line 2689 "ntp_parser.c" /* yacc.c:1646 */ +#line 2689 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 173: @@ -2694,7 +2694,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2698 "ntp_parser.c" /* yacc.c:1646 */ +#line 2698 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 174: @@ -2703,19 +2703,19 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2707 "ntp_parser.c" /* yacc.c:1646 */ +#line 2707 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 175: #line 982 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } -#line 2713 "ntp_parser.c" /* yacc.c:1646 */ +#line 2713 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 176: #line 984 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2719 "ntp_parser.c" /* yacc.c:1646 */ +#line 2719 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 177: @@ -2728,25 +2728,25 @@ yyreduce: yyerror("fudge factor: stratum value not in [0..16], ignored"); } } -#line 2732 "ntp_parser.c" /* yacc.c:1646 */ +#line 2732 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 178: #line 995 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 2738 "ntp_parser.c" /* yacc.c:1646 */ +#line 2738 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 179: #line 997 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } -#line 2744 "ntp_parser.c" /* yacc.c:1646 */ +#line 2744 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 186: #line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); } -#line 2750 "ntp_parser.c" /* yacc.c:1646 */ +#line 2750 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 187: @@ -2755,7 +2755,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2759 "ntp_parser.c" /* yacc.c:1646 */ +#line 2759 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 188: @@ -2764,25 +2764,25 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2768 "ntp_parser.c" /* yacc.c:1646 */ +#line 2768 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 189: #line 1036 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 2774 "ntp_parser.c" /* yacc.c:1646 */ +#line 2774 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 193: #line 1052 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); } -#line 2780 "ntp_parser.c" /* yacc.c:1646 */ +#line 2780 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 194: #line 1054 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); } -#line 2786 "ntp_parser.c" /* yacc.c:1646 */ +#line 2786 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 195: @@ -2791,7 +2791,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2795 "ntp_parser.c" /* yacc.c:1646 */ +#line 2795 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 196: @@ -2800,13 +2800,13 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2804 "ntp_parser.c" /* yacc.c:1646 */ +#line 2804 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 197: #line 1072 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } -#line 2810 "ntp_parser.c" /* yacc.c:1646 */ +#line 2810 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 198: @@ -2824,13 +2824,13 @@ yyreduce: yyerror(err_str); } } -#line 2828 "ntp_parser.c" /* yacc.c:1646 */ +#line 2828 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 211: #line 1113 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); } -#line 2834 "ntp_parser.c" /* yacc.c:1646 */ +#line 2834 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 212: @@ -2839,7 +2839,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2843 "ntp_parser.c" /* yacc.c:1646 */ +#line 2843 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 213: @@ -2848,13 +2848,13 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 2852 "ntp_parser.c" /* yacc.c:1646 */ +#line 2852 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 214: #line 1131 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } -#line 2858 "ntp_parser.c" /* yacc.c:1646 */ +#line 2858 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 227: @@ -2865,7 +2865,7 @@ yyreduce: av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); APPEND_G_FIFO(cfgt.vars, av); } -#line 2869 "ntp_parser.c" /* yacc.c:1646 */ +#line 2869 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 228: @@ -2876,7 +2876,7 @@ yyreduce: av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); APPEND_G_FIFO(cfgt.vars, av); } -#line 2880 "ntp_parser.c" /* yacc.c:1646 */ +#line 2880 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 229: @@ -2887,7 +2887,7 @@ yyreduce: av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); APPEND_G_FIFO(cfgt.vars, av); } -#line 2891 "ntp_parser.c" /* yacc.c:1646 */ +#line 2891 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 230: @@ -2907,7 +2907,7 @@ yyreduce: yyerror(error_text); } } -#line 2911 "ntp_parser.c" /* yacc.c:1646 */ +#line 2911 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 231: @@ -2930,37 +2930,37 @@ yyreduce: } YYFREE((yyvsp[-1].String)); /* avoid leak */ } -#line 2934 "ntp_parser.c" /* yacc.c:1646 */ +#line 2934 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 232: #line 1212 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { lex_flush_stack(); } -#line 2940 "ntp_parser.c" /* yacc.c:1646 */ +#line 2940 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 233: #line 1214 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { /* see drift_parm below for actions */ } -#line 2946 "ntp_parser.c" /* yacc.c:1646 */ +#line 2946 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 234: #line 1216 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); } -#line 2952 "ntp_parser.c" /* yacc.c:1646 */ +#line 2952 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 235: #line 1218 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); } -#line 2958 "ntp_parser.c" /* yacc.c:1646 */ +#line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 236: #line 1220 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); } -#line 2964 "ntp_parser.c" /* yacc.c:1646 */ +#line 2964 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 237: @@ -2971,13 +2971,13 @@ yyreduce: aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo)); APPEND_G_FIFO(cfgt.trap, aon); } -#line 2975 "ntp_parser.c" /* yacc.c:1646 */ +#line 2975 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 238: #line 1229 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); } -#line 2981 "ntp_parser.c" /* yacc.c:1646 */ +#line 2981 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 243: @@ -2987,7 +2987,7 @@ yyreduce: yyerror("Built without LEAP_SMEAR support."); #endif } -#line 2991 "ntp_parser.c" /* yacc.c:1646 */ +#line 2991 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 249: @@ -3002,7 +3002,7 @@ yyreduce: yyerror("driftfile remote configuration ignored"); } } -#line 3006 "ntp_parser.c" /* yacc.c:1646 */ +#line 3006 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 250: @@ -3019,7 +3019,7 @@ yyreduce: yyerror("driftfile remote configuration ignored"); } } -#line 3023 "ntp_parser.c" /* yacc.c:1646 */ +#line 3023 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 251: @@ -3033,25 +3033,25 @@ yyreduce: yyerror("driftfile remote configuration ignored"); } } -#line 3037 "ntp_parser.c" /* yacc.c:1646 */ +#line 3037 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 252: #line 1301 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); } -#line 3043 "ntp_parser.c" /* yacc.c:1646 */ +#line 3043 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 254: #line 1307 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Integer) = 0; } -#line 3049 "ntp_parser.c" /* yacc.c:1646 */ +#line 3049 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 255: #line 1312 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val_fifo) = NULL; } -#line 3055 "ntp_parser.c" /* yacc.c:1646 */ +#line 3055 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 256: @@ -3060,13 +3060,13 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3064 "ntp_parser.c" /* yacc.c:1646 */ +#line 3064 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 257: #line 1322 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } -#line 3070 "ntp_parser.c" /* yacc.c:1646 */ +#line 3070 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 258: @@ -3075,7 +3075,7 @@ yyreduce: (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address)); destroy_address_node((yyvsp[0].Address_node)); } -#line 3079 "ntp_parser.c" /* yacc.c:1646 */ +#line 3079 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 259: @@ -3084,7 +3084,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3088 "ntp_parser.c" /* yacc.c:1646 */ +#line 3088 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 260: @@ -3093,7 +3093,7 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3097 "ntp_parser.c" /* yacc.c:1646 */ +#line 3097 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 261: @@ -3119,7 +3119,7 @@ yyreduce: (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type)); YYFREE((yyvsp[0].String)); } -#line 3123 "ntp_parser.c" /* yacc.c:1646 */ +#line 3123 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 262: @@ -3130,7 +3130,7 @@ yyreduce: nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer)); APPEND_G_FIFO(cfgt.nic_rules, nrn); } -#line 3134 "ntp_parser.c" /* yacc.c:1646 */ +#line 3134 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 263: @@ -3141,13 +3141,13 @@ yyreduce: nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer)); APPEND_G_FIFO(cfgt.nic_rules, nrn); } -#line 3145 "ntp_parser.c" /* yacc.c:1646 */ +#line 3145 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 273: #line 1405 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); } -#line 3151 "ntp_parser.c" /* yacc.c:1646 */ +#line 3151 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 274: @@ -3156,7 +3156,7 @@ yyreduce: (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3160 "ntp_parser.c" /* yacc.c:1646 */ +#line 3160 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 275: @@ -3165,7 +3165,7 @@ yyreduce: (yyval.Int_fifo) = NULL; APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3169 "ntp_parser.c" /* yacc.c:1646 */ +#line 3169 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 283: @@ -3174,7 +3174,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3178 "ntp_parser.c" /* yacc.c:1646 */ +#line 3178 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 284: @@ -3183,7 +3183,7 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer))); } -#line 3187 "ntp_parser.c" /* yacc.c:1646 */ +#line 3187 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 285: @@ -3192,7 +3192,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3196 "ntp_parser.c" /* yacc.c:1646 */ +#line 3196 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 286: @@ -3201,19 +3201,19 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); } -#line 3205 "ntp_parser.c" /* yacc.c:1646 */ +#line 3205 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 287: #line 1465 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); } -#line 3211 "ntp_parser.c" /* yacc.c:1646 */ +#line 3211 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 289: #line 1471 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); } -#line 3217 "ntp_parser.c" /* yacc.c:1646 */ +#line 3217 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 290: @@ -3222,7 +3222,7 @@ yyreduce: (yyval.String_fifo) = (yyvsp[-1].String_fifo); APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String))); } -#line 3226 "ntp_parser.c" /* yacc.c:1646 */ +#line 3226 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 291: @@ -3231,7 +3231,7 @@ yyreduce: (yyval.String_fifo) = NULL; APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String))); } -#line 3235 "ntp_parser.c" /* yacc.c:1646 */ +#line 3235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 292: @@ -3240,7 +3240,7 @@ yyreduce: (yyval.Address_fifo) = (yyvsp[-1].Address_fifo); APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node)); } -#line 3244 "ntp_parser.c" /* yacc.c:1646 */ +#line 3244 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 293: @@ -3249,7 +3249,7 @@ yyreduce: (yyval.Address_fifo) = NULL; APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node)); } -#line 3253 "ntp_parser.c" /* yacc.c:1646 */ +#line 3253 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 294: @@ -3262,31 +3262,31 @@ yyreduce: (yyval.Integer) = (yyvsp[0].Integer); } } -#line 3266 "ntp_parser.c" /* yacc.c:1646 */ +#line 3266 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 295: #line 1510 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Integer) = 1; } -#line 3272 "ntp_parser.c" /* yacc.c:1646 */ +#line 3272 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 296: #line 1511 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Integer) = 0; } -#line 3278 "ntp_parser.c" /* yacc.c:1646 */ +#line 3278 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 297: #line 1515 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Double) = (double)(yyvsp[0].Integer); } -#line 3284 "ntp_parser.c" /* yacc.c:1646 */ +#line 3284 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 299: #line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); } -#line 3290 "ntp_parser.c" /* yacc.c:1646 */ +#line 3290 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 300: @@ -3300,13 +3300,13 @@ yyreduce: /* Revert from ; to \n for end-of-command */ old_config_style = 1; } -#line 3304 "ntp_parser.c" /* yacc.c:1646 */ +#line 3304 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 301: #line 1546 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { old_config_style = 0; } -#line 3310 "ntp_parser.c" /* yacc.c:1646 */ +#line 3310 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 302: @@ -3315,7 +3315,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3319 "ntp_parser.c" /* yacc.c:1646 */ +#line 3319 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 303: @@ -3324,13 +3324,13 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3328 "ntp_parser.c" /* yacc.c:1646 */ +#line 3328 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 304: #line 1564 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); } -#line 3334 "ntp_parser.c" /* yacc.c:1646 */ +#line 3334 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 307: @@ -3339,7 +3339,7 @@ yyreduce: (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo); APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server)); } -#line 3343 "ntp_parser.c" /* yacc.c:1646 */ +#line 3343 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 308: @@ -3348,25 +3348,25 @@ yyreduce: (yyval.Sim_server_fifo) = NULL; APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server)); } -#line 3352 "ntp_parser.c" /* yacc.c:1646 */ +#line 3352 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 309: #line 1587 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); } -#line 3358 "ntp_parser.c" /* yacc.c:1646 */ +#line 3358 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 310: #line 1592 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Double) = (yyvsp[-1].Double); } -#line 3364 "ntp_parser.c" /* yacc.c:1646 */ +#line 3364 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 311: #line 1597 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Address_node) = (yyvsp[0].Address_node); } -#line 3370 "ntp_parser.c" /* yacc.c:1646 */ +#line 3370 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 312: @@ -3375,7 +3375,7 @@ yyreduce: (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo); APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script)); } -#line 3379 "ntp_parser.c" /* yacc.c:1646 */ +#line 3379 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 313: @@ -3384,13 +3384,13 @@ yyreduce: (yyval.Sim_script_fifo) = NULL; APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script)); } -#line 3388 "ntp_parser.c" /* yacc.c:1646 */ +#line 3388 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 314: #line 1615 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); } -#line 3394 "ntp_parser.c" /* yacc.c:1646 */ +#line 3394 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 315: @@ -3399,7 +3399,7 @@ yyreduce: (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo); APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3403 "ntp_parser.c" /* yacc.c:1646 */ +#line 3403 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 316: @@ -3408,17 +3408,17 @@ yyreduce: (yyval.Attr_val_fifo) = NULL; APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); } -#line 3412 "ntp_parser.c" /* yacc.c:1646 */ +#line 3412 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; case 317: #line 1633 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); } -#line 3418 "ntp_parser.c" /* yacc.c:1646 */ +#line 3418 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ break; -#line 3422 "ntp_parser.c" /* yacc.c:1646 */ +#line 3422 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h index 8e7f053d2..ed0da4fe2 100644 --- a/ntpd/ntp_parser.h +++ b/ntpd/ntp_parser.h @@ -30,8 +30,8 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -#ifndef YY_YY_NTP_PARSER_H_INCLUDED -# define YY_YY_NTP_PARSER_H_INCLUDED +#ifndef YY_YY_Y_TAB_H_INCLUDED +# define YY_YY_Y_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -471,7 +471,7 @@ union YYSTYPE script_info * Sim_script; script_info_fifo * Sim_script_fifo; -#line 475 "ntp_parser.h" /* yacc.c:1909 */ +#line 475 "../../ntpd/ntp_parser.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; @@ -484,4 +484,4 @@ extern YYSTYPE yylval; int yyparse (void); -#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */ +#endif /* !YY_YY_Y_TAB_H_INCLUDED */ diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index d0a402f58..ab2f936e2 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -4989,4 +4989,6 @@ proto_clr_stats(void) sys_badauth = 0; sys_limitrejected = 0; sys_kodsent = 0; + sys_lamport = 0; + sys_tsrounding = 0; } diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c index 1acbf80d4..1463eaa94 100644 --- a/ntpd/ntp_request.c +++ b/ntpd/ntp_request.c @@ -1151,6 +1151,8 @@ sys_stats( ss->badauth = htonl((u_int32)sys_badauth); ss->limitrejected = htonl((u_int32)sys_limitrejected); ss->received = htonl((u_int32)sys_received); + ss->lamport = htonl((u_int32)sys_lamport); + ss->tsrounding = htonl((u_int32)sys_tsrounding); (void) more_pkt(); flush_pkt(); } diff --git a/ntpdc/layout.std b/ntpdc/layout.std index 6117f5215..01b46c5c6 100644 --- a/ntpdc/layout.std +++ b/ntpdc/layout.std @@ -168,7 +168,7 @@ offsetof(v6_flag) = 56 offsetof(unused4) = 60 offsetof(peer6) = 64 -sizeof(struct info_sys_stats) = 44 +sizeof(struct info_sys_stats) = 52 offsetof(timeup) = 0 offsetof(timereset) = 4 offsetof(denied) = 8 @@ -180,6 +180,8 @@ offsetof(processed) = 28 offsetof(badauth) = 32 offsetof(received) = 36 offsetof(limitrejected) = 40 +offsetof(lamport) = 44 +offsetof(tsrounding) = 48 sizeof(struct old_info_sys_stats) = 40 offsetof(timeup) = 0 diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c index 56aed3298..acc175d19 100644 --- a/ntpq/ntpq-subs.c +++ b/ntpq/ntpq-subs.c @@ -3859,6 +3859,10 @@ sysstats( VDC_INIT("ss_limited", "rate limited: ", NTP_STR), VDC_INIT("ss_kodsent", "KoD responses: ", NTP_STR), VDC_INIT("ss_processed", "processed for time: ", NTP_STR), +#if 0 + VDC_INIT("ss_lamport", "Lamport violations: ", NTP_STR), + VDC_INIT("ss_tsrounding", "bad timestamp rounding:", NTP_STR), +#endif VDC_INIT(NULL, NULL, 0) };