2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

NAK if a client requests an address that we own but can't give to it.

This commit is contained in:
Ted Lemon
1997-12-06 04:04:50 +00:00
parent 357708da5a
commit 0c11afbceb

View File

@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: dhcp.c,v 1.56 1997/12/02 09:28:08 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
"$Id: dhcp.c,v 1.57 1997/12/06 04:04:50 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -274,6 +274,13 @@ void dhcprequest (packet)
return;
}
/* If the address the client asked for is ours, but it wasn't
available for the client, NAK it. */
if (!lease && ours) {
nak_lease (packet, &cip);
return;
}
/* If we own the lease that the client is asking for,
and it's already been assigned to the client, ack it. */
if (lease &&