mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
nts: fix address in server NTS-KE log messages
The server session instances are reused for different clients. Separate the server name from the label used in log messages and set it on each start of the session.
This commit is contained in:
@@ -113,7 +113,7 @@ handle_client(int sock_fd, IPSockAddr *addr)
|
||||
instp = ARR_GetElement(sessions, i);
|
||||
if (!*instp) {
|
||||
/* NULL handler arg will be replaced with the session instance */
|
||||
inst = NKSN_CreateInstance(1, UTI_IPSockAddrToString(addr), handle_message, NULL);
|
||||
inst = NKSN_CreateInstance(1, NULL, handle_message, NULL);
|
||||
*instp = inst;
|
||||
break;
|
||||
} else if (NKSN_IsStopped(*instp)) {
|
||||
@@ -128,7 +128,8 @@ handle_client(int sock_fd, IPSockAddr *addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!NKSN_StartSession(inst, sock_fd, server_credentials, SERVER_TIMEOUT))
|
||||
if (!NKSN_StartSession(inst, sock_fd, UTI_IPSockAddrToString(addr),
|
||||
server_credentials, SERVER_TIMEOUT))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user