From: Ted Lemon Date: Mon, 18 May 1998 05:28:06 +0000 (+0000) Subject: Pull up half of 1.61: reclaim abandoned leases. X-Git-Tag: V2-BETA-2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72a388d1fac9a1b3d8c261ab9be60e3dc83e3d42;p=thirdparty%2Fdhcp.git Pull up half of 1.61: reclaim abandoned leases. --- diff --git a/server/dhcp.c b/server/dhcp.c index c00a3afdd..e1c261272 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$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"; +"$Id: dhcp.c,v 1.57.2.1 1998/05/18 05:28:06 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -116,6 +116,15 @@ void dhcpdiscover (packet) return; } + /* If we find an abandoned lease, take it, but print a + warning message, so that if it continues to lose, + the administrator will eventually investigate. */ + if (lease -> flags & ABANDONED_LEASE) { + warn ("Reclaiming abandoned IP address %s.\n", + piaddr (lease -> ip_addr)); + lease -> flags &= ~ABANDONED_LEASE; + } + /* Try to find a host_decl that matches the client identifier or hardware address on the packet, and has no fixed IP address. If there is one, hang