]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Rescan the interfaces again when reconfiguring the server
authorOndřej Surý <ondrej@isc.org>
Tue, 22 Jul 2025 12:59:25 +0000 (14:59 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 4 Aug 2025 09:24:23 +0000 (11:24 +0200)
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.

bin/named/server.c

index 66eb8be466e2107e857c39ad10ad96d2d783b13d..da2fb017090f464e257c924330ba17f8b9d9f962 100644 (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.
         */