From: Ted Lemon Date: Sat, 6 Dec 1997 04:04:50 +0000 (+0000) Subject: NAK if a client requests an address that we own but can't give to it. X-Git-Tag: V2-BETA-1~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c11afbceb7fb7ae0dae7ba1fd3767b40417126c;p=thirdparty%2Fdhcp.git NAK if a client requests an address that we own but can't give to it. --- 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 &&