diff options
author | Ted Lemon <source@isc.org> | 2001-05-01 20:02:10 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2001-05-01 20:02:10 +0000 |
commit | 37d8bfebe626ff7a78464a930f920b7a90ebf114 (patch) | |
tree | c4874d8aa992ce5336a8bb16e89746062b8d953d /server/failover.c | |
parent | 90e0ef949ecc8dc4d30b45c9158d6e649c94dfaf (diff) | |
download | isc-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.c | 11 |
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, |