]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
reference: suppress orphan option in special reference modes
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 May 2016 11:59:01 +0000 (13:59 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 May 2016 12:12:42 +0000 (14:12 +0200)
This allows a server that will become the orphan source to initialize
its time with the initstepslew directive from the current orphan source
or its clients.

reference.c

index 4f4ced596adbe0285245f212afb153514c44f087..17001860694e416ef9a313b9b5c6e2020254acdc 100644 (file)
@@ -1248,7 +1248,7 @@ REF_GetOurStratum(void)
 int
 REF_GetOrphanStratum(void)
 {
-  if (!enable_local_stratum || !local_orphan)
+  if (!enable_local_stratum || !local_orphan || mode != REF_ModeNormal)
     return NTP_MAX_STRATUM;
   return local_stratum;
 }