Skip to content

Commit bdf7f57

Browse files
citrus-ithawkw
authored andcommitted
Prevent chrony from authoritatively advertising times from the 1980s. (#5610)
1 parent 2d5d3f3 commit bdf7f57

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

zone-setup/src/bin/zone-setup.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,20 @@ allow @ALLOW@
333333
334334
# Enable local reference mode, which keeps us operating as an NTP server that
335335
# appears synchronised even if there are currently no active upstreams. When
336-
# in this mode, we report as stratum 10 to clients.
337-
local stratum 10
336+
# in this mode, we report as stratum 10 to clients. The `distance' parameter
337+
# controls when we will decide to abandon the upstreams and switch to the local
338+
# reference. By setting `activate`, we prevent the server from ever activating
339+
# its local reference until it has synchronised with upstream at least once and
340+
# the root distance has dropped below the provided threshold. This prevents
341+
# a boundary server in a cold booted rack from authoritatively advertising a
342+
# time from the 1980s prior to gaining external connectivity.
343+
#
344+
# distance: Distance from root above which we use the local reference, opting
345+
# to ignore the upstream.
346+
# activate: Distance from root below which we must fall once to ever consider
347+
# the local reference.
348+
#
349+
local stratum 10 distance 0.4 activate 0.5
338350
339351
# makestep <threshold> <limit>
340352
# We allow chrony to step the system clock during the first three time updates

0 commit comments

Comments
 (0)