]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
cmdmon: respond from same address
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 16 Jul 2019 15:13:07 +0000 (17:13 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 18 Jul 2019 15:29:44 +0000 (17:29 +0200)
Enable the destination address of received messages in order to respond
from the same address on multihomed hosts.

cmdmon.c

index 320bde60fc76604d58404e7148e7638657e00b83..9b7afe11f34eca53a490baa384312ecdb0afe383 100644 (file)
--- a/cmdmon.c
+++ b/cmdmon.c
@@ -165,7 +165,7 @@ open_socket(int family)
         SCK_GetLoopbackIPAddress(family, &local_addr.ip_addr);
       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) {
         LOG(LOGS_ERR, "Could not open command socket on %s",
             UTI_IPSockAddrToString(&local_addr));