Commit dcffad2a authored by Simon Kelley's avatar Simon Kelley

Ensure that the DBus DhcpLeaseUpdated events are generated.

parent 6a69ab5e
......@@ -96,6 +96,11 @@ version 2.61
Add --tftp-lowercase option. Thanks to Oliver Rath for the
patch.
Ensure that the DBus DhcpLeaseUpdated events are generated
when a lease goes through INIT_REBOOT state, even if the
dhcp-script is not in use. thanks to Antoaneta-Ecaterina
Ene for the patch.
version 2.60
Fix compilation problem in Mac OS X Lion. Thanks to Olaf
......
......@@ -1222,15 +1222,19 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
log_tags(tagif_netid, ntohl(mess->xid));
if (do_classes)
{
/* pick up INIT-REBOOT events. */
lease->flags |= LEASE_CHANGED;
#ifdef HAVE_SCRIPT
if (do_classes && daemon->lease_change_command)
if (daemon->lease_change_command)
{
struct dhcp_netid *n;
if (mess->giaddr.s_addr)
lease->giaddr = mess->giaddr;
lease->flags |= LEASE_CHANGED;
free(lease->extradata);
lease->extradata = NULL;
lease->extradata_size = lease->extradata_len = 0;
......@@ -1267,6 +1271,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
}
}
#endif
}
if (!hostname_auth && (client_hostname = host_from_dns(mess->yiaddr)))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment