From fde59885f3cf46aea30cdceba1e47228d40b74d6 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Tue, 4 Jun 1996 19:15:10 +0000 Subject: [PATCH] Allow DHCP leases to be assigned to the same client via Dynamic BOOTP --- bootp.c | 10 ++++------ server/bootp.c | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/bootp.c b/bootp.c index 6342015a..c8115ab7 100644 --- a/bootp.c +++ b/bootp.c @@ -115,18 +115,16 @@ void bootp (packet) return; } - /* If a lease has already been assigned through dynamic - BOOTP, and it's still okay to use dynamic bootp on + /* If a lease has already been assigned to this client + and it's still okay to use dynamic bootp on that lease, reassign it. */ if (lease) { - if ((lease -> flags & BOOTP_LEASE) && - (lease -> flags & DYNAMIC_BOOTP_OK)) { + if (lease -> flags & DYNAMIC_BOOTP_OK) { lease -> host = host; ack_lease (packet, lease, 0, 0); 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. */ release_lease (lease); } diff --git a/server/bootp.c b/server/bootp.c index 6342015a..c8115ab7 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -115,18 +115,16 @@ void bootp (packet) return; } - /* If a lease has already been assigned through dynamic - BOOTP, and it's still okay to use dynamic bootp on + /* If a lease has already been assigned to this client + and it's still okay to use dynamic bootp on that lease, reassign it. */ if (lease) { - if ((lease -> flags & BOOTP_LEASE) && - (lease -> flags & DYNAMIC_BOOTP_OK)) { + if (lease -> flags & DYNAMIC_BOOTP_OK) { lease -> host = host; ack_lease (packet, lease, 0, 0); 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. */ release_lease (lease); }