2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 13:28:14 +00:00

Release DHCP lease before assigning it to BOOTP client, so as to avoid unnecessary lease conflict behaviour.

This commit is contained in:
Ted Lemon 1996-06-11 08:13:00 +00:00
parent efdf1d6ec1
commit 2824de2061
2 changed files with 24 additions and 2 deletions

13
bootp.c
View File

@ -119,11 +119,22 @@ void bootp (packet)
and it's still okay to use dynamic bootp on
that lease, reassign it. */
if (lease) {
if (lease -> flags & DYNAMIC_BOOTP_OK) {
/* If this lease can be used for dynamic bootp,
do so. */
if ((lease -> flags & DYNAMIC_BOOTP_OK)) {
/* If it's not a DYNAMIC_BOOTP lease,
release it before reassigning it
so that we don't get a lease
conflict. */
if (!(lease -> flags & BOOTP_LEASE))
release_lease (lease);
lease -> host = host;
ack_lease (packet, lease, 0, 0);
return;
}
/* If dynamic BOOTP is no longer allowed for
this lease, set it free. */
release_lease (lease);

View File

@ -119,11 +119,22 @@ void bootp (packet)
and it's still okay to use dynamic bootp on
that lease, reassign it. */
if (lease) {
if (lease -> flags & DYNAMIC_BOOTP_OK) {
/* If this lease can be used for dynamic bootp,
do so. */
if ((lease -> flags & DYNAMIC_BOOTP_OK)) {
/* If it's not a DYNAMIC_BOOTP lease,
release it before reassigning it
so that we don't get a lease
conflict. */
if (!(lease -> flags & BOOTP_LEASE))
release_lease (lease);
lease -> host = host;
ack_lease (packet, lease, 0, 0);
return;
}
/* If dynamic BOOTP is no longer allowed for
this lease, set it free. */
release_lease (lease);