mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:45:07 -05:00
sources: fix loading of refclock dump files
Allow zero stratum in loaded dump files.
Fixes: f8610d69f0 ("sources: improve handling of dump files and their format")
This commit is contained in:
@@ -1428,7 +1428,7 @@ load_source(SRC_Instance inst)
|
||||
sscanf(words[0], "%d %o %d %d %d",
|
||||
&auth, &reach, &reach_size, &stratum, &leap) != 5 ||
|
||||
(!auth && inst->authenticated) ||
|
||||
stratum < 1 || stratum >= NTP_MAX_STRATUM ||
|
||||
stratum < 0 || stratum >= NTP_MAX_STRATUM ||
|
||||
leap < LEAP_Normal || leap >= LEAP_Unsynchronised ||
|
||||
!SST_LoadFromFile(inst->stats, f)) {
|
||||
LOG(LOGS_WARN, "Could not load dump file for %s", source_to_string(inst));
|
||||
|
||||
Reference in New Issue
Block a user