Fix initialisation order.

This commit is contained in:
Simon Kelley
2012-12-17 21:54:08 +00:00
parent 72c9c3b11b
commit 8445f5d2e2
4 changed files with 18 additions and 13 deletions

View File

@@ -200,13 +200,19 @@ int iface_enumerate(int family, void *parm, int (*callback)())
after we complete as we're not re-entrant */
if (newaddr)
{
time_t now = dnsmasq_time();
if (option_bool(OPT_CLEVERBIND))
{
enumerate_interfaces();
create_bound_listeners(0);
}
#ifdef HAVE_DHCP6
dhcp_construct_contexts(dnsmasq_time());
if (daemon->doing_dhcp6 || daemon->doing_ra)
dhcp_construct_contexts(now);
if (daemon->doing_dhcp6)
lease_find_interfaces(now);
#endif
}
return callback_ok;