diff --git a/ntp_core.c b/ntp_core.c index c4da33d..3b262ea 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -703,6 +703,11 @@ NCR_ChangeRemoteAddress(NCR_Instance inst, NTP_Remote_Address *remote_addr, int { memset(&inst->report, 0, sizeof (inst->report)); NCR_ResetInstance(inst); + + /* Update the authentication-specific address before NTP address */ + if (!ntp_only) + NAU_ChangeAddress(inst->auth, &remote_addr->ip_addr); + inst->remote_addr = *remote_addr; if (inst->mode == MODE_CLIENT) @@ -718,9 +723,6 @@ NCR_ChangeRemoteAddress(NCR_Instance inst, NTP_Remote_Address *remote_addr, int SRC_SetRefid(inst->source, UTI_IPToRefid(&remote_addr->ip_addr), &inst->remote_addr.ip_addr); SRC_ResetInstance(inst->source); - - if (!ntp_only) - NAU_ChangeAddress(inst->auth, &remote_addr->ip_addr); } /* ================================================== */