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:
Miroslav Lichvar
2020-06-17 12:06:21 +02:00
parent 80316de3b8
commit 27e20a568b
12 changed files with 52 additions and 50 deletions

View File

@@ -3601,7 +3601,7 @@ main(int argc, char **argv)
UTI_SetQuitSignalsHandler(signal_handler, 0);
SCK_Initialise();
SCK_Initialise(IPADDR_UNSPEC);
server_addresses = get_addresses(hostnames, port);
if (!open_io())