mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 06:15:06 -05:00
ntp: fix loop test for special reference modes
It is not sufficient to check for disabled server sockets as they are
not open only after the special reference modes end (e.g. initstepslew).
Fixes: 004986310d ("ntp: skip loop test if no server socket is open")
This commit is contained in:
@@ -1381,9 +1381,8 @@ check_sync_loop(NCR_Instance inst, NTP_Packet *message, NTP_Local_Address *local
|
|||||||
NTP_Leap leap_status;
|
NTP_Leap leap_status;
|
||||||
uint32_t our_ref_id;
|
uint32_t our_ref_id;
|
||||||
|
|
||||||
/* Check if a server socket is open, i.e. a client or peer can actually
|
/* Check if a client or peer can be synchronised to us */
|
||||||
be synchronised to us */
|
if (!NIO_IsServerSocketOpen() || REF_GetMode() != REF_ModeNormal)
|
||||||
if (!NIO_IsServerSocketOpen())
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Check if the source indicates that it is synchronised to our address
|
/* Check if the source indicates that it is synchronised to our address
|
||||||
|
|||||||
Reference in New Issue
Block a user