mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 22:05:23 +00:00
Make sure uid_lease is initialized somewhere; use ciaddr to find lease if Requested Address option not present
This commit is contained in:
@@ -800,6 +800,7 @@ struct lease *find_lease (packet, share)
|
||||
if (hp) {
|
||||
host = hp;
|
||||
fixed_lease = mockup_lease (packet, share, hp);
|
||||
uid_lease = (struct lease *)0;
|
||||
} else
|
||||
uid_lease = find_lease_by_uid
|
||||
(packet -> options
|
||||
@@ -837,6 +838,9 @@ struct lease *find_lease (packet, share)
|
||||
memcpy (cip.iabuf,
|
||||
packet -> options [DHO_DHCP_REQUESTED_ADDRESS].data,
|
||||
packet -> options [DHO_DHCP_REQUESTED_ADDRESS].len);
|
||||
ip_lease = find_lease_by_ip_addr (cip);
|
||||
} else if (packet -> raw -> ciaddr.s_addr) {
|
||||
cip.len = packet -> options [DHO_DHCP_REQUESTED_ADDRESS].len;
|
||||
memcpy (cip.iabuf, &packet -> raw -> ciaddr, 4);
|
||||
ip_lease = find_lease_by_ip_addr (cip);
|
||||
} else
|
||||
|
Reference in New Issue
Block a user