mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 16:45:06 -05:00
ntp: provide remote port to NIO_OpenServerSocket()
This will allow selection of different protocols based on the remote port. Zero means the default (NTP).
This commit is contained in:
@@ -2504,11 +2504,13 @@ NCR_AddAccessRestriction(IPAddr *ip_addr, int subnet_bits, int allow, int all)
|
||||
if (server_sock_fd4 == INVALID_SOCK_FD &&
|
||||
ADF_IsAnyAllowed(access_auth_table, IPADDR_INET4)) {
|
||||
remote_addr.ip_addr.family = IPADDR_INET4;
|
||||
remote_addr.port = 0;
|
||||
server_sock_fd4 = NIO_OpenServerSocket(&remote_addr);
|
||||
}
|
||||
if (server_sock_fd6 == INVALID_SOCK_FD &&
|
||||
ADF_IsAnyAllowed(access_auth_table, IPADDR_INET6)) {
|
||||
remote_addr.ip_addr.family = IPADDR_INET6;
|
||||
remote_addr.port = 0;
|
||||
server_sock_fd6 = NIO_OpenServerSocket(&remote_addr);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user