Fix up some failover dependencies
This commit is contained in:
parent
3eff691939
commit
ce18212259
|
@ -234,6 +234,19 @@ struct hardware {
|
||||||
u_int8_t hbuf [17];
|
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. */
|
/* A dhcp lease declaration structure. */
|
||||||
struct lease {
|
struct lease {
|
||||||
OMAPI_OBJECT_PREAMBLE;
|
OMAPI_OBJECT_PREAMBLE;
|
||||||
|
@ -502,10 +515,10 @@ struct pool {
|
||||||
struct lease *backup;
|
struct lease *backup;
|
||||||
struct lease *abandoned;
|
struct lease *abandoned;
|
||||||
TIME next_event_time;
|
TIME next_event_time;
|
||||||
#if defined (FAILOVER_PROTOCOL)
|
|
||||||
int lease_count;
|
int lease_count;
|
||||||
int free_leases;
|
int free_leases;
|
||||||
int backup_leases;
|
int backup_leases;
|
||||||
|
#if defined (FAILOVER_PROTOCOL)
|
||||||
dhcp_failover_state_t *failover_peer;
|
dhcp_failover_state_t *failover_peer;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -156,19 +156,6 @@ typedef struct {
|
||||||
#define FTR_HBA_CONFLICT 19
|
#define FTR_HBA_CONFLICT 19
|
||||||
#define FTR_UNKNOWN 254
|
#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
|
#define DHCP_FAILOVER_MAX_MESSAGE_SIZE 2048
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char ocopyright[] =
|
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
|
#endif
|
||||||
|
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
|
@ -610,8 +610,10 @@ void lease_pinged (from, packet, length)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lp -> state) {
|
if (!lp -> state) {
|
||||||
|
#if defined (FAILOVER_PROTOCOL)
|
||||||
if (!lp -> pool ||
|
if (!lp -> pool ||
|
||||||
!lp -> pool -> failover_peer)
|
!lp -> pool -> failover_peer)
|
||||||
|
#endif
|
||||||
log_debug ("ICMP Echo Reply for %s late or spurious.",
|
log_debug ("ICMP Echo Reply for %s late or spurious.",
|
||||||
piaddr (from));
|
piaddr (from));
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue