diff options
-rw-r--r-- | RELNOTES | 6 | ||||
-rw-r--r-- | server/dhcpd.conf.5 | 4 | ||||
-rw-r--r-- | server/failover.c | 11 |
3 files changed, 20 insertions, 1 deletions
@@ -177,6 +177,12 @@ dhcp-users@lists.isc.org. the MPL 2.0 license terms. [ISC-Bugs #45541] +- Load balancing for failover peers can now be disabled by setting + "load balance max secs" to 0. Doing so for both peers means both + servers will respond to all DHCPDISCOVERs or DHCPREQUESTs as soon as + they are received. + [ISC-Bugs #39669] + Changes since 4.3.0 (bug fixes) - Tidy up several small tickets. diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5 index a5ab07e2..02f854a9 100644 --- a/server/dhcpd.conf.5 +++ b/server/dhcpd.conf.5 @@ -749,6 +749,10 @@ failover peers gets into a state where it is responding to failover messages but not responding to some client requests, the other failover peer will take over its client load automatically as the clients retry. +.PP +It is possible to disable load balancing between peers by setting this +value to 0 on both peers. Bear in mind that this means both peers will +respond to all DHCPDISCOVERs or DHCPREQUESTs. .RE .PP The diff --git a/server/failover.c b/server/failover.c index 6630660d..25e1b72b 100644 --- a/server/failover.c +++ b/server/failover.c @@ -76,11 +76,19 @@ void dhcp_failover_sanity_check() { state->name); fail_count++; } + + if (state->load_balance_max_secs == 0) { + log_info ("WARNING: load balancing will be disabled " + "for failover peer, %s, " + "because its load balance max secs is 0", + state->name); + } } if (fail_count) { log_fatal ("Failover configuration sanity check failed"); } + } void dhcp_failover_startup () @@ -5968,7 +5976,8 @@ int load_balance_mine (struct packet *packet, dhcp_failover_state_t *state) } #endif - if (state->load_balance_max_secs < ec) { + if ((state->load_balance_max_secs == 0) || + (state->load_balance_max_secs < ec)) { return (1); } |