]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
NAK if a client requests an address that we own but can't give to it.
authorTed Lemon <source@isc.org>
Sat, 6 Dec 1997 04:04:50 +0000 (04:04 +0000)
committerTed Lemon <source@isc.org>
Sat, 6 Dec 1997 04:04:50 +0000 (04:04 +0000)
server/dhcp.c

index 7a6a1d1f88a8ea884091a5f0d540a49879c2215e..c00a3afdd9abdb649168720daa0e9ceb6d755e1c 100644 (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 &&