summaryrefslogtreecommitdiff
path: root/server/failover.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-05-01 20:02:10 +0000
committerTed Lemon <source@isc.org>2001-05-01 20:02:10 +0000
commit37d8bfebe626ff7a78464a930f920b7a90ebf114 (patch)
treec4874d8aa992ce5336a8bb16e89746062b8d953d /server/failover.c
parent90e0ef949ecc8dc4d30b45c9158d6e649c94dfaf (diff)
downloadisc-dhcp-37d8bfebe626ff7a78464a930f920b7a90ebf114.tar.gz
Don't bother with recover_wait if both peers are recovering.
Diffstat (limited to 'server/failover.c')
-rw-r--r--server/failover.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/failover.c b/server/failover.c
index 914cc386..e3aa736a 100644
--- a/server/failover.c
+++ b/server/failover.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: failover.c,v 1.50 2001/04/20 19:58:42 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: failover.c,v 1.51 2001/05/01 20:02:10 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -4491,7 +4491,14 @@ dhcp_failover_process_update_done (dhcp_failover_state_t *state,
break;
case recover:
- if (state -> me.stos + state -> mclt > cur_time) {
+ /* Wait for MCLT to expire before moving to recover_done,
+ except that if both peers come up in recover, there is
+ no point in waiting for MCLT to expire - this probably
+ indicates the initial startup of a newly-configured
+ failover pair. */
+ if (state -> me.stos + state -> mclt > cur_time &&
+ state -> partner.state != recover &&
+ state -> partner.state != recover_done) {
dhcp_failover_set_state (state, recover_wait);
add_timeout ((int)(state -> me.stos + state -> mclt),
dhcp_failover_recover_done,