ntp: open server socket only when access is allowed

When changing access configuration, check if any address is allowed and
open/close the server socket as needed.
This commit is contained in:
Miroslav Lichvar
2015-01-06 15:12:26 +01:00
parent 5214d42c07
commit 52e12e42e5
4 changed files with 78 additions and 12 deletions

View File

@@ -72,4 +72,9 @@ extern void ADF_DestroyTable(ADF_AuthTable table);
extern int ADF_IsAllowed(ADF_AuthTable table,
IPAddr *ip);
/* Check if at least one address from a given family is allowed by
the rules in the table */
extern int ADF_IsAnyAllowed(ADF_AuthTable table,
int family);
#endif /* GOT_ADDRFILT_H */