2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 13:28:14 +00:00

Add support for the load balancing portion of the failover protocol.

This commit is contained in:
Ted Lemon 2000-05-02 00:00:08 +00:00
parent e96232350d
commit 150cedd0a1

View File

@ -43,7 +43,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: dhcp.c,v 1.144 2000/04/08 01:15:50 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; "$Id: dhcp.c,v 1.145 2000/05/02 00:00:08 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@ -153,6 +153,28 @@ void dhcpdiscover (packet, ms_nulltp)
} }
} }
#if defined (FAILOVER_PROTOCOL)
log_info ("lease -> pool = %lx\n", (unsigned long)lease -> pool);
if (lease -> pool) {
log_info ("lease -> pool -> failover_peer = %lx\n",
(unsigned long)(lease -> pool -> failover_peer));
if (lease -> pool -> failover_peer)
log_info ("lease -> pool -> failover_peer -> hba =%lx",
(unsigned long)(lease -> pool
-> failover_peer -> hba));
}
/* Do load balancing if configured. */
if (lease -> pool &&
lease -> pool -> failover_peer &&
lease -> pool -> failover_peer -> hba) {
if (!load_balance_mine (packet,
lease -> pool -> failover_peer))
return;
}
#endif
/* If it's an expired lease, get rid of any bindings. */ /* If it's an expired lease, get rid of any bindings. */
if (lease -> ends < cur_time && lease -> scope.bindings) if (lease -> ends < cur_time && lease -> scope.bindings)
free_bindings (&lease -> scope, MDL); free_bindings (&lease -> scope, MDL);