mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 01:15: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
client.c
2
client.c
@@ -222,7 +222,7 @@ open_socket(struct Address *addr)
|
||||
|
||||
switch (addr->type) {
|
||||
case SCK_ADDR_IP:
|
||||
sock_fd = SCK_OpenUdpSocket(&addr->addr.ip, NULL, 0);
|
||||
sock_fd = SCK_OpenUdpSocket(&addr->addr.ip, NULL, NULL, 0);
|
||||
break;
|
||||
case SCK_ADDR_UNIX:
|
||||
/* Construct path of our socket. Use the same directory as the server
|
||||
|
||||
Reference in New Issue
Block a user