fix: usr: 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.

Merge branch 'ondrej/rescan-the-interface-on-time-0' into 'bind-9.18'

See merge request isc-projects/bind9!10758
This commit is contained in:
Ondřej Surý 2025-08-04 11:24:44 +02:00
commit c9f05d750a

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.
*/