From 0c11afbceb7fb7ae0dae7ba1fd3767b40417126c Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Sat, 6 Dec 1997 04:04:50 +0000 Subject: [PATCH] NAK if a client requests an address that we own but can't give to it. --- server/dhcp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/dhcp.c b/server/dhcp.c index 7a6a1d1f8..c00a3afdd 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -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 && -- 2.47.2