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:
Miroslav Lichvar 2019-07-16 17:13:07 +02:00
parent 6cd47bff8f
commit f06c1cfa97

View file

@ -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));