#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.125 1999/10/24 19:38:53 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.126 1999/11/07 20:32:03 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (uid_lease &&
!packet -> raw -> ciaddr.s_addr &&
(share ==
- uid_lease -> subnet -> shared_network))
+ uid_lease -> subnet -> shared_network) &&
+ packet -> packet_type == DHCPREQUEST)
dissociate_lease (uid_lease);
}
uid_lease = ip_lease;
the lease that matched the client identifier. */
if (uid_lease) {
if (lease) {
- if (!packet -> raw -> ciaddr.s_addr)
+ if (!packet -> raw -> ciaddr.s_addr &&
+ packet -> packet_type == DHCPREQUEST)
dissociate_lease (uid_lease);
#if defined (DEBUG_FIND_LEASE)
log_info ("not choosing uid lease.");
/* The lease that matched the hardware address is treated likewise. */
if (hw_lease) {
if (lease) {
- if (!packet -> raw -> ciaddr.s_addr)
+ if (!packet -> raw -> ciaddr.s_addr &&
+ packet -> packet_type == DHCPREQUEST)
dissociate_lease (hw_lease);
#if defined (DEBUG_FIND_LEASE)
log_info ("not choosing hardware lease.");