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:
parent
aab6d1b153
commit
b2c2132e4b
1 changed files with 2 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue