2
0
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:
Ted Lemon
1996-05-23 22:22:35 +00:00
parent ee9d710a5a
commit b6b1cadf14
2 changed files with 8 additions and 0 deletions

View File

@@ -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