]> git.ipfire.org Git - thirdparty/chrony.git/commit
nts: use shorter NTS-KE retry interval when network is down
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 23 Feb 2023 12:10:11 +0000 (13:10 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 27 Feb 2023 10:43:22 +0000 (11:43 +0100)
commit1daa40a2f759df30a7afe086c9f001d99fdd14a3
treedb5b3822924011865f6e39cfa198cee871c3b49a
parenta1406eded39e3f607f5fbc5fa3a5f8720a1e5bc1
nts: use shorter NTS-KE retry interval when network is down

When chronyd configured with an NTS source not specified as offline and
resolvable without network was started before the network was up, it was
using an unnecessarily long NTS-KE retry interval, same as if the server
was refusing the connections.

When the network is down, the connect() call made from NKC_Start() on
the non-blocking TCP socket should fail with a different error than
EINPROGRESS and cause NKC_Start() to return with failure. Add a constant
2-second retry interval (matching default iburst) for this case.
nts_ntp_client.c