From: Miroslav Lichvar Date: Tue, 12 Nov 2019 17:04:48 +0000 (+0100) Subject: sources: don't reset active status X-Git-Tag: 4.0-pre1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e727c4497dd028e4ea4f32fc3298e4bd580c68a;p=thirdparty%2Fchrony.git sources: don't reset active status Avoid resetting the active status when an NTP source changes its address in NCR_ChangeRemoteAddress(). This will allow an NTP source to update its address with NTS-KE hostname negotiation and continue in a special reference mode (e.g. -q/-Q option). --- diff --git a/sources.c b/sources.c index 71934912..2e6f45e5 100644 --- a/sources.c +++ b/sources.c @@ -249,6 +249,7 @@ SRC_Instance SRC_CreateNewInstance(uint32_t ref_id, SRC_Type type, int sel_optio result->index = n_sources; result->type = type; result->sel_options = sel_options; + result->active = 0; SRC_SetRefid(result, ref_id, addr); SRC_ResetInstance(result); @@ -291,7 +292,6 @@ void SRC_DestroyInstance(SRC_Instance instance) void SRC_ResetInstance(SRC_Instance instance) { - instance->active = 0; instance->updates = 0; instance->reachability = 0; instance->reachability_size = 0;