mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
socket: add support for binding sockets to device
As a Linux-specific feature, allow sockets to be bound to a device using the SO_BINDTODEVICE socket option. The CAP_NET_RAW capability is required for setting the option.
This commit is contained in:
2
cmdmon.c
2
cmdmon.c
@@ -173,7 +173,7 @@ open_socket(int family)
|
||||
SCK_GetLoopbackIPAddress(family, &local_addr.ip_addr);
|
||||
local_addr.port = port;
|
||||
|
||||
sock_fd = SCK_OpenUdpSocket(NULL, &local_addr, SCK_FLAG_RX_DEST_ADDR);
|
||||
sock_fd = SCK_OpenUdpSocket(NULL, &local_addr, NULL, SCK_FLAG_RX_DEST_ADDR);
|
||||
if (sock_fd < 0) {
|
||||
LOG(LOGS_ERR, "Could not open command socket on %s",
|
||||
UTI_IPSockAddrToString(&local_addr));
|
||||
|
||||
Reference in New Issue
Block a user