mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
No lease-time in DHCPINFORM replies.
This commit is contained in:
@@ -45,7 +45,11 @@ version 2.64
|
|||||||
subnet, --dhcp-range=::,static Useful for Stateless
|
subnet, --dhcp-range=::,static Useful for Stateless
|
||||||
DHCPv6. Thanks to Vladislav Grishenko for the patch.
|
DHCPv6. Thanks to Vladislav Grishenko for the patch.
|
||||||
|
|
||||||
|
Don't include lease-time in DHCPACK replies to DHCPINFORM
|
||||||
|
queries, since RFC-2131 says we shouldn't. Thanks to
|
||||||
|
Wouter Ibens for pointing this out.
|
||||||
|
|
||||||
|
|
||||||
version 2.63
|
version 2.63
|
||||||
Do duplicate dhcp-host address check in --test mode.
|
Do duplicate dhcp-host address check in --test mode.
|
||||||
|
|
||||||
|
|||||||
@@ -1387,6 +1387,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
|
|||||||
|
|
||||||
if (lease)
|
if (lease)
|
||||||
{
|
{
|
||||||
|
lease_set_interface(lease, int_index, now);
|
||||||
if (override.s_addr != 0)
|
if (override.s_addr != 0)
|
||||||
lease->override = override;
|
lease->override = override;
|
||||||
else
|
else
|
||||||
@@ -1397,16 +1398,6 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
|
|||||||
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);
|
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);
|
||||||
option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, ntohl(server_id(context, override, fallback).s_addr));
|
option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, ntohl(server_id(context, override, fallback).s_addr));
|
||||||
|
|
||||||
if (lease)
|
|
||||||
{
|
|
||||||
if (lease->expires == 0)
|
|
||||||
time = 0xffffffff;
|
|
||||||
else
|
|
||||||
time = (unsigned int)difftime(lease->expires, now);
|
|
||||||
option_put(mess, end, OPTION_LEASE_TIME, 4, time);
|
|
||||||
lease_set_interface(lease, int_index, now);
|
|
||||||
}
|
|
||||||
|
|
||||||
do_options(context, mess, end, req_options, hostname, get_domain(mess->ciaddr),
|
do_options(context, mess, end, req_options, hostname, get_domain(mess->ciaddr),
|
||||||
netid, subnet_addr, fqdn_flags, borken_opt, pxearch, uuid, vendor_class_len, now);
|
netid, subnet_addr, fqdn_flags, borken_opt, pxearch, uuid, vendor_class_len, now);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user