mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 11:25:06 -05:00
Compare commits
16 Commits
mandriva-1
...
1.23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5331e1a146 | ||
|
|
eeac7b7ca0 | ||
|
|
efcf3f7c6b | ||
|
|
eb4c9d908c | ||
|
|
b6e40dbde7 | ||
|
|
4ba843f8f4 | ||
|
|
75a7af9edc | ||
|
|
8022874a47 | ||
|
|
ca1195a0e6 | ||
|
|
ce4e0a3c2f | ||
|
|
215d988286 | ||
|
|
084efe606f | ||
|
|
38efaf10a8 | ||
|
|
93f6664378 | ||
|
|
8a94298b7e | ||
|
|
242c520912 |
22
NEWS
22
NEWS
@@ -1,3 +1,25 @@
|
||||
New in version 1.23
|
||||
===================
|
||||
|
||||
* Support for MIPS, x86_64, sparc, alpha, arm, FreeBSD
|
||||
* Fix serious sign-extension error in handling IP addresses
|
||||
* RTC support can be excluded at compile time
|
||||
* Make sources gcc-4 compatible
|
||||
* Fix various compiler warnings
|
||||
* Handle fluctuations in peer distance better.
|
||||
* Fixed handling of stratum zero.
|
||||
* Fix various problems for 64-bit systems
|
||||
* Flush chronyc output streams after each command, to allow it to be driven
|
||||
through pipes
|
||||
* Manpage improvements
|
||||
|
||||
Version 1.22
|
||||
============
|
||||
|
||||
This release number was claimed by a release that Mandriva made to patch
|
||||
important bugs in 1.21. The official numbering has jumped to 1.23 as a
|
||||
consequence.
|
||||
|
||||
New in version 1.21
|
||||
===================
|
||||
|
||||
|
||||
11
configure
vendored
11
configure
vendored
@@ -133,6 +133,7 @@ For better control, use the options below.
|
||||
--readline-inc-dir=DIR Specify where readline include directory is
|
||||
--readline-lib-dir=DIR Specify where readline lib directory is
|
||||
--with-ncurses-library=DIR Specify where ncurses lib directory is
|
||||
--disable-rtc Don't include RTC even on Linux
|
||||
|
||||
Fine tuning of the installation directories:
|
||||
--infodir=DIR info documentation [PREFIX/info]
|
||||
@@ -172,6 +173,7 @@ SYSDEFS=""
|
||||
|
||||
# Support for readline (on by default)
|
||||
feat_readline=1
|
||||
feat_rtc=1
|
||||
readline_lib=""
|
||||
readline_inc=""
|
||||
ncurses_lib=""
|
||||
@@ -206,6 +208,9 @@ do
|
||||
--mandir=* )
|
||||
SETMANDIR=`echo $option | sed -e 's/^.*=//;'`
|
||||
;;
|
||||
--disable-rtc)
|
||||
feat_rtc=0
|
||||
;;
|
||||
--help | -h )
|
||||
usage
|
||||
exit 0
|
||||
@@ -238,7 +243,11 @@ case $SYSTEM in
|
||||
esac
|
||||
;;
|
||||
Linux* )
|
||||
EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o rtc_linux.o"
|
||||
EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o"
|
||||
if [ $feat_rtc -eq 1 ] ; then
|
||||
EXTRA_OBJECTS+=" rtc_linux.o"
|
||||
EXTRA_DEFS+=" -DFEAT_RTC=1"
|
||||
fi
|
||||
SYSDEFS="-DLINUX"
|
||||
echo "Configuring for " $SYSTEM
|
||||
if [ "${MACHINE}" = "alpha" ]; then
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/* Hmm. These constants vary a bit between systems. */
|
||||
/* (__sh__ includes both sh and sh64) */
|
||||
#if defined(__i386__) || defined(__sh__)
|
||||
#if defined(__i386__) || defined(__sh__) || defined(__arm__)||defined(__x86_64__)
|
||||
#define CHRONY_IOC_NRBITS 8
|
||||
#define CHRONY_IOC_TYPEBITS 8
|
||||
#define CHRONY_IOC_SIZEBITS 14
|
||||
|
||||
@@ -19,7 +19,7 @@ if (-d "RELEASES/$subdir") {
|
||||
system ("rm -rf RELEASES/$subdir");
|
||||
}
|
||||
|
||||
system ("git-tar-tree $version RELEASES/${subdir} | tar xf -");
|
||||
system ("git-archive --format=tar --prefix=RELEASES/${subdir}/ $version | tar xf -");
|
||||
die "git-tar-tree failed" if ($? != 0);
|
||||
|
||||
chdir "RELEASES";
|
||||
|
||||
@@ -39,7 +39,7 @@ unsigned long
|
||||
DNS_Name2IPAddress(const char *name)
|
||||
{
|
||||
struct hostent *host;
|
||||
char *address0;
|
||||
unsigned char *address0;
|
||||
unsigned long result;
|
||||
|
||||
host = gethostbyname(name);
|
||||
|
||||
15
ntp_core.c
15
ntp_core.c
@@ -196,6 +196,9 @@ struct NCR_Instance_Record {
|
||||
/* Maximum allowed stratum */
|
||||
#define NTP_MAX_STRATUM 15
|
||||
|
||||
/* INVALID or Unkown stratum from external server as per the NTP 4 docs */
|
||||
#define NTP_INVALID_STRATUM 0
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
static ADF_AuthTable access_auth_table;
|
||||
@@ -539,7 +542,13 @@ transmit_packet(NTP_Mode my_mode, /* The mode this machine wants to be */
|
||||
|
||||
/* Generate transmit packet */
|
||||
message.lvm = ((leap << 6) &0xc0) | ((version << 3) & 0x38) | (my_mode & 0x07);
|
||||
if (our_stratum <= NTP_MAX_STRATUM) {
|
||||
message.stratum = our_stratum;
|
||||
} else {
|
||||
/* (WGU) to handle NTP "Invalid" stratum as per the NTP V4 documents. */
|
||||
message.stratum = NTP_INVALID_STRATUM;
|
||||
}
|
||||
|
||||
message.poll = my_poll;
|
||||
message.precision = LCL_GetSysPrecisionAsLog();
|
||||
|
||||
@@ -983,6 +992,12 @@ receive_packet(NTP_Packet *message, struct timeval *now, NCR_Instance inst, int
|
||||
test6 = 1; /* Succeeded */
|
||||
}
|
||||
|
||||
/* (WGU) Set stratum to greater than any valid if incoming is 0 */
|
||||
/* as per the NPT v4 documentation*/
|
||||
if (message->stratum <= NTP_INVALID_STRATUM) {
|
||||
message->stratum = NTP_MAX_STRATUM + 1;
|
||||
}
|
||||
|
||||
/* Test 7 checks that the stratum in the packet is appropriate */
|
||||
if ((message->stratum > REF_GetOurStratum()) ||
|
||||
(message->stratum > NTP_MAX_STRATUM)) {
|
||||
|
||||
4
ntp_io.c
4
ntp_io.c
@@ -244,7 +244,7 @@ NIO_SendNormalPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr)
|
||||
|
||||
if (sendto(sock_fd, (void *) packet, NTP_NORMAL_PACKET_SIZE, 0,
|
||||
(struct sockaddr *) &remote, sizeof(remote)) < 0) {
|
||||
LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to :%s%d : %s",
|
||||
LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to %s:%d : %s",
|
||||
UTI_IPToDottedQuad(remote_addr->ip_addr), remote_addr->port, strerror(errno));
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ NIO_SendAuthenticatedPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr)
|
||||
|
||||
if (sendto(sock_fd, (void *) packet, sizeof(NTP_Packet), 0,
|
||||
(struct sockaddr *) &remote, sizeof(remote)) < 0) {
|
||||
LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to :%s%d : %s",
|
||||
LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to %s:%d : %s",
|
||||
UTI_IPToDottedQuad(remote_addr->ip_addr), remote_addr->port, strerror(errno));
|
||||
}
|
||||
|
||||
|
||||
4
rtc.c
4
rtc.c
@@ -33,7 +33,7 @@
|
||||
#include "logging.h"
|
||||
#include "conf.h"
|
||||
|
||||
#if defined LINUX
|
||||
#if defined LINUX && defined FEAT_RTC
|
||||
#include "rtc_linux.h"
|
||||
#endif /* defined LINUX */
|
||||
|
||||
@@ -53,7 +53,7 @@ static struct {
|
||||
void (*cycle_logfile)(void);
|
||||
} driver =
|
||||
{
|
||||
#if defined LINUX
|
||||
#if defined LINUX && defined FEAT_RTC
|
||||
RTC_Linux_Initialise,
|
||||
RTC_Linux_Finalise,
|
||||
RTC_Linux_TimePreInit,
|
||||
|
||||
19
rtc_linux.c
19
rtc_linux.c
@@ -174,7 +174,7 @@ static double file_ref_offset, file_rate_ppm;
|
||||
/* ================================================== */
|
||||
|
||||
/* Flag to remember whether to assume the RTC is running on UTC */
|
||||
static int rtc_on_utc = 0;
|
||||
static int rtc_on_utc = 1;
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
@@ -226,15 +226,18 @@ accumulate_sample(time_t rtc, struct timeval *sys)
|
||||
discard_samples(NEW_FIRST_WHEN_FULL);
|
||||
}
|
||||
|
||||
rtc_sec[n_samples] = rtc;
|
||||
|
||||
/* Always use most recent sample as reference */
|
||||
/* use sample only if n_sample is not negative*/
|
||||
if(n_samples >=0)
|
||||
{
|
||||
rtc_ref = rtc;
|
||||
|
||||
rtc_sec[n_samples] = rtc;
|
||||
rtc_trim[n_samples] = 0.0;
|
||||
system_times[n_samples] = *sys;
|
||||
++n_samples;
|
||||
++n_samples_since_regression;
|
||||
}
|
||||
++n_samples;
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -742,7 +745,11 @@ handle_initial_trim(void)
|
||||
run_regression(1, &coefs_valid, &coef_ref_time, &coef_seconds_fast, &coef_gain_rate);
|
||||
|
||||
n_samples_since_regression = 0;
|
||||
n_samples = 0;
|
||||
|
||||
/* Set sample number to -1 so the next sample is not used, as it will not yet be corrected for System Trim*/
|
||||
|
||||
n_samples = -1;
|
||||
|
||||
|
||||
read_coefs_from_file();
|
||||
|
||||
@@ -866,6 +873,8 @@ read_from_device(void *any)
|
||||
int error = 0;
|
||||
|
||||
status = read(fd, &data, sizeof(data));
|
||||
if (operating_mode == OM_NORMAL)
|
||||
status = read(fd, &data, sizeof(data));
|
||||
if (status < 0) {
|
||||
/* This looks like a bad error : the file descriptor was indicating it was
|
||||
* ready to read but we couldn't read anything. Give up. */
|
||||
|
||||
@@ -373,9 +373,9 @@ find_best_sample_index(SST_Stats inst, double *times_back)
|
||||
/* This defines the assumed ratio between the standard deviation of
|
||||
the samples and the peer distance as measured from the round trip
|
||||
time. E.g. a value of 4 means that we think the standard deviation
|
||||
is a quarter of the peer distance */
|
||||
is four times the fluctuation of the peer distance */
|
||||
|
||||
#define SD_TO_DIST_RATIO 8.0
|
||||
#define SD_TO_DIST_RATIO 1.0
|
||||
|
||||
/* ================================================== */
|
||||
/* This function runs the linear regression operation on the data. It
|
||||
|
||||
Reference in New Issue
Block a user