messages also log the 'effective client ip address' rather than the
client's supplied ciaddr (since some clients produce null ciaddrs).
+- The server was inappropriately sending leases to the RESET state in the
+ event that multiple active leases were found to match a singly-identified
+ client. This was changed to RELEASED (by accepting a different, ACTIVE
+ binding, the client is implicitly releasing its lease). This repairs a
+ bug wherein secondary servers in failover pairs detecting this condition
+ move leases to RESET, and primaries refuse to accept that state
+ transition (properly).
+
Changes since 3.0.4b1
- Command line parsing in omshell was repaired - it no longer closes
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.192.2.58 2006/01/06 22:07:11 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.192.2.59 2006/01/06 22:09:23 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
(share ==
uid_lease -> subnet -> shared_network) &&
packet -> packet_type == DHCPREQUEST)
- dissociate_lease (uid_lease);
+ release_lease (uid_lease, packet);
}
lease_dereference (&uid_lease, MDL);
lease_reference (&uid_lease, ip_lease, MDL);
permitted (packet, ip_lease -> pool -> prohibit_list)) ||
(ip_lease -> pool -> permit_list &&
!permitted (packet, ip_lease -> pool -> permit_list)))) {
- if (!packet -> raw -> ciaddr.s_addr)
+ if (!packet->raw->ciaddr.s_addr &&
+ (ip_lease->binding_state == FTS_ACTIVE))
release_lease (ip_lease, packet);
+
lease_dereference (&ip_lease, MDL);
}
the lease that matched the client identifier. */
if (uid_lease) {
if (lease) {
+ log_error("uid lease %s for client %s is duplicate "
+ "on %s",
+ piaddr(uid_lease->ip_addr),
+ print_hw_addr(packet->raw->htype,
+ packet->raw->hlen,
+ packet->raw->chaddr),
+ uid_lease->subnet->shared_network->name);
+
if (!packet -> raw -> ciaddr.s_addr &&
packet -> packet_type == DHCPREQUEST &&
uid_lease -> binding_state == FTS_ACTIVE)
- dissociate_lease (uid_lease);
+ release_lease (uid_lease, packet);
#if defined (DEBUG_FIND_LEASE)
log_info ("not choosing uid lease.");
#endif