IPSockAddr nts_address;
/* Hostname or IP address for certificate verification */
char *name;
+ /* Configured NTP port */
+ uint16_t default_ntp_port;
/* Address of NTP server (can be negotiated in NTS-KE) */
IPSockAddr ntp_address;
inst->nts_address = *nts_address;
inst->name = Strdup(name);
+ inst->default_ntp_port = ntp_port;
inst->ntp_address.ip_addr = nts_address->ip_addr;
inst->ntp_address.port = ntp_port;
inst->siv = NULL;
new_address = *negotiated_address;
if (new_address.ip_addr.family == IPADDR_UNSPEC)
- new_address.ip_addr = old_address.ip_addr;
+ new_address.ip_addr = inst->nts_address.ip_addr;
if (new_address.port == 0)
- new_address.port = old_address.port;
+ new_address.port = inst->default_ntp_port;
if (UTI_CompareIPs(&old_address.ip_addr, &new_address.ip_addr, NULL) == 0 &&
old_address.port == new_address.port)