mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Disable periodic interface re-scans on modern platforms
This commit disables periodic interface re-scans timer on Linux where a kernel-based dynamic interface mechanisms make it a thing of the past in most cases.
This commit is contained in:
@@ -190,3 +190,11 @@ ns_interfacemgr_getclientmgr(ns_interfacemgr_t *mgr);
|
||||
* Returns the client manager for the current worker thread.
|
||||
* (This cannot be run from outside a network manager thread.)
|
||||
*/
|
||||
|
||||
bool
|
||||
ns_interfacemgr_dynamic_updates_are_reliable(void);
|
||||
/*%<
|
||||
* Returns 'true' if periodic interface re-scans timer should be
|
||||
* disabled. That is the case on the platforms where kernel-based
|
||||
* mechanisms for tracking networking interface states is reliable enough.
|
||||
*/
|
||||
|
@@ -1379,3 +1379,17 @@ ns_interfacemgr_getclientmgr(ns_interfacemgr_t *mgr) {
|
||||
|
||||
return (mgr->clientmgrs[tid]);
|
||||
}
|
||||
|
||||
bool
|
||||
ns_interfacemgr_dynamic_updates_are_reliable(void) {
|
||||
#if defined(LINUX_NETLINK_AVAILABLE)
|
||||
/*
|
||||
* Let's disable periodic interface rescans on Linux, as there a
|
||||
* reliable kernel-based mechanism for tracking interface state
|
||||
* changes is available.
|
||||
*/
|
||||
return (true);
|
||||
#else
|
||||
return (false);
|
||||
#endif /* LINUX_NETLINK_AVAILABLE */
|
||||
}
|
||||
|
Reference in New Issue
Block a user