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:
parent
3e55fe6919
commit
4f43c060a3
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue