Miroslav Lichvar
b717904f9e
ntp: don't try to bind acquire socket if port is equal to ntp port
2014-03-25 15:24:38 +01:00
Miroslav Lichvar
f2c4ab09a8
ntp: check if packet was received by right socket
2014-03-25 15:24:38 +01:00
Miroslav Lichvar
9a657cd4a3
ntp: store socket in NTP instance
...
This is preparation for separate client sockets.
2014-03-25 15:22:59 +01:00
Miroslav Lichvar
308de81221
ntp: split local_ip_addr from NTP_Remote_Address struct
2014-03-25 11:34:35 +01:00
Miroslav Lichvar
6823109cfb
ntp: set invalid socket fd by macro
2014-03-25 11:34:31 +01:00
Miroslav Lichvar
a02149cf65
doc: improve commandkey and keyfile descriptions
2014-03-21 15:49:00 +01:00
Miroslav Lichvar
7aa4bbf621
ntp: set minpoll from received KoD RATE at most to 10
...
Limit changing minpoll to a reasonable maximum in case the server is
broken or temporarily misconfigured.
2014-03-21 15:32:14 +01:00
Miroslav Lichvar
5afddad0d2
ntp: print warning when source is added with unknown key
2014-03-21 14:36:51 +01:00
Miroslav Lichvar
0380cf0c76
ntp: reset negative minpoll or maxpoll to default values
2014-03-21 13:25:14 +01:00
Miroslav Lichvar
6c2a1e62e0
cmdparse: don't allow NTP key ID of 0
...
Key number 0 is used as inactive key, prevent the user from
inadvertently not using authentication.
2014-03-21 13:20:37 +01:00
Miroslav Lichvar
6560628209
test: add 111-knownclient
2014-03-21 13:20:36 +01:00
Miroslav Lichvar
3cc81376a6
test: add port number check
2014-03-21 13:20:36 +01:00
Miroslav Lichvar
8d02e5f680
ntp: make use of NCR_ProcessUnknown in NCR_ProcessKnown
...
After recent changes the code in NCR_ProcessKnown is now identical and
can be replaced with NCR_ProcessUnknown call.
2014-03-21 13:20:34 +01:00
Miroslav Lichvar
f9e2213afd
ntp: don't store tx time stamp when replying to known source
2014-03-21 13:20:31 +01:00
Miroslav Lichvar
8b362ba3e7
ntp: don't reply to known source if missing key or invalid auth
...
This is now similar to replying to unknown sources.
2014-03-21 13:20:29 +01:00
Miroslav Lichvar
eecec8fffa
test: extend 105-ntpauth
2014-03-21 13:20:29 +01:00
Miroslav Lichvar
a26058d425
ntp: don't send requests with unknown key
...
There is no point in sending a request if the configured key is missing.
A reply would be ignored anyway.
2014-03-21 13:20:27 +01:00
Miroslav Lichvar
c14b81f3a9
ntp: remove unnecessary KEY_KeyKnown calls
2014-03-21 13:20:25 +01:00
Miroslav Lichvar
0059a43254
keys: don't cache position for unknown keys
2014-03-21 13:20:24 +01:00
Miroslav Lichvar
7dd3cc354d
client: print positive signed freq and offset values with sign
2014-03-21 13:20:24 +01:00
Miroslav Lichvar
ce34aa0763
test: make 110-chronyc more tolerant
2014-03-21 13:20:24 +01:00
Miroslav Lichvar
7a512ad9c3
tempcomp: print warning message on error
2014-03-21 13:20:24 +01:00
Miroslav Lichvar
0a56c0e8c1
tempcomp: use macro to set maximum allowed compensation
2014-03-21 13:20:24 +01:00
Miroslav Lichvar
0b71504ee9
sourcestats: fix signedness in scanf format
2014-03-21 13:20:24 +01:00
Miroslav Lichvar
9479c6451e
makefile: improve check rule
2014-03-21 13:20:20 +01:00
Miroslav Lichvar
115e83f3aa
Add simulation tests
...
Use clknetsim to run multiple chronyd instances with simulated clocks
and network. It allows fast and reproducible testing, without real
network.
Included are several tests of performance in different clock/network
conditions, chronyd options, NTP authentication, chronyc, and past bug
fixes.
2014-02-27 18:34:52 +01:00
Miroslav Lichvar
ea526b96dd
configure: suppress pkg-config errors
2014-02-05 08:53:15 +01:00
Miroslav Lichvar
726cf84e19
Check array index before reading
2014-02-04 16:02:21 +01:00
Miroslav Lichvar
dc8a46363f
Merge branch '1.29-security'
2014-01-31 17:06:08 +01:00
Miroslav Lichvar
916ca7ab86
make_release: set owner and group in released tarball to root
2014-01-31 13:37:55 +01:00
Miroslav Lichvar
be036ed58a
make_release: remove config.log and config.h
2014-01-31 13:37:52 +01:00
Miroslav Lichvar
2afdd4544d
Update NEWS
2014-01-31 13:12:59 +01:00
Miroslav Lichvar
c4e61835d3
Update faq.txt
2014-01-30 15:59:45 +01:00
Miroslav Lichvar
e15ce69d08
Send cmdmon error replies only to allowed hosts
...
The status codes STT_BADPKTVERSION, STT_BADPKTLENGTH, STT_NOHOSTACCESS
were sent even to hosts that were not allowed by cmdallow. Deprecate
STT_NOHOSTACCESS and ignore packets from hosts not allowed by cmdallow
completely.
2014-01-30 15:59:45 +01:00
Miroslav Lichvar
d537ed11fd
Support previous protocol version in chronyc
...
This adds compatibility with chronyd using the previous protocol version
(chrony versions 1.27, 1.28, 1.29).
2014-01-30 15:59:45 +01:00
Miroslav Lichvar
dba458d50c
Add padding to cmdmon requests to prevent amplification attack
...
To prevent an attacker using chronyd in an amplification attack, change
the protocol to include padding in request packets so that the largest
possible reply is not larger than the request. Request packets that
don't include this padding are ignored as invalid.
This is an incompatible change in the protocol. Clients from chrony
1.27, 1.28 and 1.29 will receive NULL reply with STT_BADPKTVERSION and
print "Protocol version mismatch". Clients from 1.26 and older will not
receive a reply as it would be larger than the request if it was padded
to be compatible with their protocol.
2014-01-30 15:59:45 +01:00
Miroslav Lichvar
3e23430926
Set maximum number of samples in manual list reply to 16
...
In chronyd the maximum number of manual samples is 16, so there is no
need to keep room for 32 samples in the command reply. This limits the
maximum assumed size of the reply packet.
2014-01-30 15:59:45 +01:00
Miroslav Lichvar
3f507b782c
Replace number and total fields in cmdmon reply packet with padding
...
They were not used for anything and there is no plan to change that.
2014-01-24 16:53:32 +01:00
Miroslav Lichvar
2fc3525fdf
Don't read uninitialized memory in client packet length check
...
Before calling PKL_ReplyLength() check that the packet has full header.
This didn't change the outcome of the test if the packet was shorter as
the invalid result from PKL_ReplyLength() was either larger than length
of the packet or smaller than header length, failing the length check in
both cases.
2014-01-24 16:53:32 +01:00
Miroslav Lichvar
0f3e464202
Remove superfluous code in read_from_cmd_socket()
2014-01-24 16:53:32 +01:00
Miroslav Lichvar
925d7119ec
Fix writing of drift and RTC files
...
Without sequence points the driftfile and RTC file could be closed
before new values were written.
2014-01-21 18:23:12 +01:00
Miroslav Lichvar
f456cd57b9
Fix selecting of sources with prefer option
...
List of selectable sources that is used in combining was trimmed to
sources with prefer option, but scoring algorithm considered all
selectable sources. When a source without prefer was selected and
no source was combined, it caused assertion failure.
2014-01-21 17:18:48 +01:00
Miroslav Lichvar
ea58500cef
Remove superfluous code in SRC_SelectSource
2014-01-21 16:41:00 +01:00
Miroslav Lichvar
4048b200ed
Fix error message when chronyc can't open keyfile
2014-01-21 14:51:32 +01:00
Miroslav Lichvar
54211f0f6e
Update comment on setting poll in reply packet
2014-01-17 18:10:32 +01:00
Miroslav Lichvar
4b5f465026
Don't allow maxpoll to be set shorter than minpoll
2014-01-17 17:37:07 +01:00
Miroslav Lichvar
7efd1151cb
Convert linux kernel info messages to debug
2014-01-17 17:30:06 +01:00
Miroslav Lichvar
19dbe52930
Update linux_freq_scale and linux_hz documentation
2014-01-10 15:56:53 +01:00
Miroslav Lichvar
2a981b7d39
Print error message on invalid syntax with all chronyc commands
2014-01-10 11:14:39 +01:00
Miroslav Lichvar
d34ebdb431
Simplify expression used in frequency accumulation
2014-01-09 18:31:35 +01:00