mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix problem with domains associated with DHCP hosts at startup.
At startup, the leases file is read by lease_init(), and in lease_init() undecorated hostnames are expanded into FQDNs by adding the domain associated with the address of the lease. lease_init() happens relavtively early in the startup, party because if it calls the dhcp-lease helper script, we don't want that to inherit a load of sensitive file descriptors. This has implications if domains are defined using the --domain=example.com,eth0 format since it's long before we call enumerate_interfaces(), so get_domain fails for such domains. The patch just moves the hostname expansion function to a seperate subroutine that gets called later, after enumerate_interfaces().
This commit is contained in:
@@ -1605,6 +1605,7 @@ void lease_update_from_configs(void);
|
||||
int do_script_run(time_t now);
|
||||
void rerun_scripts(void);
|
||||
void lease_find_interfaces(time_t now);
|
||||
void lease_calc_fqdns(void);
|
||||
#ifdef HAVE_SCRIPT
|
||||
void lease_add_extradata(struct dhcp_lease *lease, unsigned char *data,
|
||||
unsigned int len, int delim);
|
||||
|
||||
Reference in New Issue
Block a user