mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 11:05:07 -05:00
socket: enable only specified IP families
Allow an IP family to be specified in the socket initialization in order to globally disable the other family. This replaces the ntp_io and cmdmon code handling the -4/-6 options and fixes a case where the NTP client could still use a disabled family if the source was specified with an IP address.
This commit is contained in:
@@ -258,7 +258,7 @@ open_socket(int family, int port)
|
||||
IPSockAddr local_addr;
|
||||
int sock_fd;
|
||||
|
||||
if (!SCK_IsFamilySupported(family))
|
||||
if (!SCK_IsIpFamilyEnabled(family))
|
||||
return INVALID_SOCK_FD;
|
||||
|
||||
CNF_GetBindAddress(family, &local_addr.ip_addr);
|
||||
|
||||
Reference in New Issue
Block a user