From: Miroslav Lichvar Date: Wed, 21 Apr 2021 10:52:17 +0000 (+0200) Subject: sources: fix loading of refclock dump files X-Git-Tag: 4.1-pre1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f43c060a387139534b77fa76f0997f83af15e67;p=thirdparty%2Fchrony.git sources: fix loading of refclock dump files Allow zero stratum in loaded dump files. Fixes: f8610d69f08f ("sources: improve handling of dump files and their format") --- diff --git a/sources.c b/sources.c index 0d1bce5d..895172e7 100644 --- a/sources.c +++ b/sources.c @@ -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));