mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 05:15:06 -05:00
cmdmon: respond from same address
Enable the destination address of received messages in order to respond from the same address on multihomed hosts.
This commit is contained in:
2
cmdmon.c
2
cmdmon.c
@@ -165,7 +165,7 @@ open_socket(int family)
|
|||||||
SCK_GetLoopbackIPAddress(family, &local_addr.ip_addr);
|
SCK_GetLoopbackIPAddress(family, &local_addr.ip_addr);
|
||||||
local_addr.port = port;
|
local_addr.port = port;
|
||||||
|
|
||||||
sock_fd = SCK_OpenUdpSocket(NULL, &local_addr, 0);
|
sock_fd = SCK_OpenUdpSocket(NULL, &local_addr, SCK_FLAG_RX_DEST_ADDR);
|
||||||
if (sock_fd < 0) {
|
if (sock_fd < 0) {
|
||||||
LOG(LOGS_ERR, "Could not open command socket on %s",
|
LOG(LOGS_ERR, "Could not open command socket on %s",
|
||||||
UTI_IPSockAddrToString(&local_addr));
|
UTI_IPSockAddrToString(&local_addr));
|
||||||
|
|||||||
Reference in New Issue
Block a user