Rescan the interfaces again when reconfiguring the server

On FreeBSD, the server would not listen on the configured 'localhost'
interfaces immediately, but only after the 'interface-interval' period
has passed.  After the fix for default interface-interval was merged in
!10281, this means the server would listen on the localhost after 60
minutes.

Rescan the interfaces immediately after configuring the
interface-interval value to start listening on the 'localhost' interface
immediately.
This commit is contained in:
Ondřej Surý 2025-07-22 14:59:25 +02:00
parent 4d24dabc25
commit e86eed54f5
No known key found for this signature in database
GPG key ID: 2820F37E873DEA41

View file

@ -9358,6 +9358,13 @@ load_configuration(const char *filename, named_server_t *server,
}
server->interface_interval = interface_interval;
/*
* FreeBSD workaround: Trigger the interface rescan immediately
* otherwise the server will start listening only after
* 'interface-interval' first tick, possibly never.
*/
(void)ns_interfacemgr_scan(server->interfacemgr, false, false);
/*
* Enable automatic interface scans.
*/