From 5084a8b34254f9b8f85287c8068cf0d7f23a4246 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 8 Apr 2016 12:34:48 +0200 Subject: [PATCH] reference: clamp local stratum set from cmdmon --- reference.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference.c b/reference.c index c531356..61a356b 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); } /* ================================================== */