mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 20:35:07 -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:
@@ -268,7 +268,7 @@ open_socket(int family, int port)
|
||||
|
||||
local_addr.port = port;
|
||||
|
||||
sock_fd = SCK_OpenTcpSocket(NULL, &local_addr, 0);
|
||||
sock_fd = SCK_OpenTcpSocket(NULL, &local_addr, NULL, 0);
|
||||
if (sock_fd < 0) {
|
||||
LOG(LOGS_ERR, "Could not open NTS-KE socket on %s", UTI_IPSockAddrToString(&local_addr));
|
||||
return INVALID_SOCK_FD;
|
||||
|
||||
Reference in New Issue
Block a user