Fix up some failover dependencies

This commit is contained in:
mellon 2000-06-10 18:31:11 +00:00
parent 3eff691939
commit ce18212259
3 changed files with 17 additions and 15 deletions

View File

@ -234,6 +234,19 @@ struct hardware {
u_int8_t hbuf [17];
};
/* Lease states: */
typedef enum {
FTS_FREE = 1,
FTS_ACTIVE = 2,
FTS_EXPIRED = 3,
FTS_RELEASED = 4,
FTS_ABANDONED = 5,
FTS_RESET = 6,
FTS_BACKUP = 7,
FTS_RESERVED = 8,
FTS_BOOTP = 9
} binding_state_t;
/* A dhcp lease declaration structure. */
struct lease {
OMAPI_OBJECT_PREAMBLE;
@ -502,10 +515,10 @@ struct pool {
struct lease *backup;
struct lease *abandoned;
TIME next_event_time;
#if defined (FAILOVER_PROTOCOL)
int lease_count;
int free_leases;
int backup_leases;
#if defined (FAILOVER_PROTOCOL)
dhcp_failover_state_t *failover_peer;
#endif
};

View File

@ -156,19 +156,6 @@ typedef struct {
#define FTR_HBA_CONFLICT 19
#define FTR_UNKNOWN 254
/* Lease states: */
typedef enum {
FTS_FREE = 1,
FTS_ACTIVE = 2,
FTS_EXPIRED = 3,
FTS_RELEASED = 4,
FTS_ABANDONED = 5,
FTS_RESET = 6,
FTS_BACKUP = 7,
FTS_RESERVED = 8,
FTS_BOOTP = 9
} binding_state_t;
#define DHCP_FAILOVER_MAX_MESSAGE_SIZE 2048
typedef struct {

View File

@ -43,7 +43,7 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhcpd.c,v 1.16 2000/06/10 18:17:22 mellon Exp $ Copyright 1995-2000 Internet Software Consortium.";
"$Id: dhcpd.c,v 1.17 2000/06/10 18:31:11 mellon Exp $ Copyright 1995-2000 Internet Software Consortium.";
#endif
static char copyright[] =
@ -610,8 +610,10 @@ void lease_pinged (from, packet, length)
}
if (!lp -> state) {
#if defined (FAILOVER_PROTOCOL)
if (!lp -> pool ||
!lp -> pool -> failover_peer)
#endif
log_debug ("ICMP Echo Reply for %s late or spurious.",
piaddr (from));
goto out;