mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 22:05:23 +00:00
Allow DHCP leases to be assigned to the same client via Dynamic BOOTP
This commit is contained in:
10
bootp.c
10
bootp.c
@@ -115,18 +115,16 @@ void bootp (packet)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If a lease has already been assigned through dynamic
|
/* If a lease has already been assigned to this client
|
||||||
BOOTP, and it's still okay to use dynamic bootp on
|
and it's still okay to use dynamic bootp on
|
||||||
that lease, reassign it. */
|
that lease, reassign it. */
|
||||||
if (lease) {
|
if (lease) {
|
||||||
if ((lease -> flags & BOOTP_LEASE) &&
|
if (lease -> flags & DYNAMIC_BOOTP_OK) {
|
||||||
(lease -> flags & DYNAMIC_BOOTP_OK)) {
|
|
||||||
lease -> host = host;
|
lease -> host = host;
|
||||||
ack_lease (packet, lease, 0, 0);
|
ack_lease (packet, lease, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* If the lease was acquired with DHCP, or
|
/* If dynamic BOOTP is no longer allowed for
|
||||||
if dynamic BOOTP is no longer allowed for
|
|
||||||
this lease, set it free. */
|
this lease, set it free. */
|
||||||
release_lease (lease);
|
release_lease (lease);
|
||||||
}
|
}
|
||||||
|
@@ -115,18 +115,16 @@ void bootp (packet)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If a lease has already been assigned through dynamic
|
/* If a lease has already been assigned to this client
|
||||||
BOOTP, and it's still okay to use dynamic bootp on
|
and it's still okay to use dynamic bootp on
|
||||||
that lease, reassign it. */
|
that lease, reassign it. */
|
||||||
if (lease) {
|
if (lease) {
|
||||||
if ((lease -> flags & BOOTP_LEASE) &&
|
if (lease -> flags & DYNAMIC_BOOTP_OK) {
|
||||||
(lease -> flags & DYNAMIC_BOOTP_OK)) {
|
|
||||||
lease -> host = host;
|
lease -> host = host;
|
||||||
ack_lease (packet, lease, 0, 0);
|
ack_lease (packet, lease, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* If the lease was acquired with DHCP, or
|
/* If dynamic BOOTP is no longer allowed for
|
||||||
if dynamic BOOTP is no longer allowed for
|
|
||||||
this lease, set it free. */
|
this lease, set it free. */
|
||||||
release_lease (lease);
|
release_lease (lease);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user