From: David Hankins Date: Mon, 19 Jun 2006 15:15:16 +0000 (+0000) Subject: MAC address affinity and reserved leases were subtly incompatible. X-Git-Tag: DHCPv6_parsing_base~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b9ce770a34e262681ae4e33cf3ca725900e137d;p=thirdparty%2Fdhcp.git MAC address affinity and reserved leases were subtly incompatible. [ISC-Bugs #16172] --- diff --git a/server/failover.c b/server/failover.c index 5dbd6064b..c93e74903 100644 --- a/server/failover.c +++ b/server/failover.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: failover.c,v 1.62 2006/06/16 19:26:45 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; +"$Id: failover.c,v 1.63 2006/06/19 15:15:16 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -4908,7 +4908,8 @@ isc_result_t dhcp_failover_process_bind_update (dhcp_failover_state_t *state, * peer is more likely to reallocate this lease * to a returning client. */ - if (state->i_am == primary) + if ((state->i_am == primary) && + !(lt->flags & (RESERVED_LEASE | BOOTP_LEASE))) send_to_backup = peer_wants_lease(lt); } else { lt -> next_binding_state = new_binding_state; @@ -5044,6 +5045,7 @@ isc_result_t dhcp_failover_process_bind_ack (dhcp_failover_state_t *state, * the lease to backup state. */ if (state->i_am == primary && + !(lease->flags & (RESERVED_LEASE | BOOTP_LEASE)) && peer_wants_lease(lease)) { lease->next_binding_state = FTS_BACKUP; lease->tstp = cur_time;