From 4f43c060a387139534b77fa76f0997f83af15e67 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 21 Apr 2021 12:52:17 +0200 Subject: [PATCH] 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") --- sources.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources.c b/sources.c index 0d1bce5..895172e 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));