From 65e9a8957ccf64eb50402060ccf823a876ad6ed6 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Thu, 10 Jul 2025 10:58:14 +0100 Subject: [PATCH] Fix order of reads dhcp-hostsfile and /etc/ethers. Reading /etc/ethers assumes that dhcp-host cofig has already been read, and that is the case for dhcp-host, but for unknown reasons, the analogous congiguration is dhcp-hostfile was being read after /etc/ethers. Swap the order. Thanks to Andreas Kuropka for spotting the problem. --- src/dnsmasq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dnsmasq.c b/src/dnsmasq.c index 62a9e59..9c37e5a 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -1777,9 +1777,9 @@ void clear_cache_and_reload(time_t now) #ifdef HAVE_DHCP if (daemon->dhcp || daemon->doing_dhcp6) { + reread_dhcp(); if (option_bool(OPT_ETHERS)) dhcp_read_ethers(); - reread_dhcp(); dhcp_update_configs(daemon->dhcp_conf); lease_update_from_configs(); lease_update_file(now);