Commit c104546d authored by David Hankins's avatar David Hankins
Browse files

- Dynamic BOOTP leases are now load balanced in failover. [ISC-Bugs #17079]

parent c886c298
......@@ -241,6 +241,8 @@ suggested fixes to <dhcp-users@isc.org>.
- The FQDN option is only supplied if the client supplied an FQDN option or
if the FQDN option was explicitly requested on the PRL.
- Dynamic BOOTP leases are now load balanced in failover.
Changes since 3.1.0rc1
- The parse warning that 'deny dyanmic bootp;' must be configured for
......
......@@ -86,6 +86,7 @@ void bootp (packet)
if (!lease || ((lease->flags & STATIC_LEASE) == 0)) {
struct host_decl *h;
/* We didn't find an applicable fixed-address host
declaration. Just in case we may be able to dynamically
assign an address, see if there's a host declaration
......@@ -117,12 +118,39 @@ void bootp (packet)
packet -> shared_network -> pools,
&peer_has_leases);
if (lease)
ack_lease (packet, lease, 0, 0, msgbuf, 0, hp);
else
log_info ("%s: BOOTP from dynamic client and no "
"dynamic leases", msgbuf);
if (lease == NULL) {
log_info("%s: BOOTP from dynamic client and no "
"dynamic leases", msgbuf);
goto out;
}
#if defined(FAILOVER_PROTOCOL)
if ((lease->pool != NULL) &&
(lease->pool->failover_peer != NULL)) {
dhcp_failover_state_t *peer;
peer = lease->pool->failover_peer;
/* If we are in a failover state that bars us from
* answering, do not do so.
* If we are in a cooperative state, load balance
* (all) responses.
*/
if ((peer->service_state == not_responding) ||
(peer->service_state == service_startup)) {
log_info("%s: not responding%s",
msgbuf, peer->nrr);
goto out;
} else if((peer->service_state == cooperating) &&
!load_balance_mine(packet, peer)) {
log_info("%s: load balance to peer %s",
msgbuf, peer->name);
goto out;
}
}
#endif
ack_lease (packet, lease, 0, 0, msgbuf, 0, hp);
goto out;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment