From: Miroslav Lichvar Date: Fri, 8 Apr 2016 10:34:48 +0000 (+0200) Subject: reference: clamp local stratum set from cmdmon X-Git-Tag: 2.4-pre1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5084a8b34254f9b8f85287c8068cf0d7f23a4246;p=thirdparty%2Fchrony.git reference: clamp local stratum set from cmdmon --- diff --git a/reference.c b/reference.c index c531356f..61a356bd 100644 --- a/reference.c +++ b/reference.c @@ -1314,7 +1314,7 @@ void REF_EnableLocal(int stratum) { enable_local_stratum = 1; - local_stratum = stratum; + local_stratum = CLAMP(1, stratum, NTP_MAX_STRATUM - 1); } /* ================================================== */