mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 05:17:57 +00:00
[master] Fixed build issues with --disable-failover
Merged in rt40372.
This commit is contained in:
parent
4745d807f0
commit
5cc6f201cb
4
RELNOTES
4
RELNOTES
@ -54,6 +54,10 @@ by Eric Young (eay@cryptsoft.com).
|
|||||||
|
|
||||||
Changes since 4.3.3
|
Changes since 4.3.3
|
||||||
|
|
||||||
|
- Corrected compilation errors that prohibited building the server
|
||||||
|
and its ATF unit tests when failover disabled.
|
||||||
|
[ISC-Bugs #40372]
|
||||||
|
|
||||||
- Fixed several potential null references. Thanks to Bill Parker
|
- Fixed several potential null references. Thanks to Bill Parker
|
||||||
(wp02855 at gmail dot com) who identified these issues and supplied
|
(wp02855 at gmail dot com) who identified these issues and supplied
|
||||||
patches to address them.
|
patches to address them.
|
||||||
|
@ -4581,7 +4581,6 @@ int allocate_lease (struct lease **lp, struct packet *packet,
|
|||||||
{
|
{
|
||||||
struct lease *lease = NULL;
|
struct lease *lease = NULL;
|
||||||
struct lease *candl = NULL;
|
struct lease *candl = NULL;
|
||||||
struct lease *peerl = NULL;
|
|
||||||
|
|
||||||
for (; pool ; pool = pool -> next) {
|
for (; pool ; pool = pool -> next) {
|
||||||
if ((pool -> prohibit_list &&
|
if ((pool -> prohibit_list &&
|
||||||
@ -4606,6 +4605,7 @@ int allocate_lease (struct lease **lp, struct packet *packet,
|
|||||||
/* Skip to the most expired lease in the pool that is not
|
/* Skip to the most expired lease in the pool that is not
|
||||||
* owned by a failover peer. */
|
* owned by a failover peer. */
|
||||||
if (pool->failover_peer != NULL) {
|
if (pool->failover_peer != NULL) {
|
||||||
|
struct lease *peerl = NULL;
|
||||||
if (pool->failover_peer->i_am == primary) {
|
if (pool->failover_peer->i_am == primary) {
|
||||||
candl = LEASE_GET_FIRST(pool->free);
|
candl = LEASE_GET_FIRST(pool->free);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@ -52,6 +52,7 @@ ATF_TC_HEAD(load_balance, tc)
|
|||||||
|
|
||||||
ATF_TC_BODY(load_balance, tc)
|
ATF_TC_BODY(load_balance, tc)
|
||||||
{
|
{
|
||||||
|
#if defined(FAILOVER_PROTOCOL)
|
||||||
struct packet packet;
|
struct packet packet;
|
||||||
struct dhcp_packet raw;
|
struct dhcp_packet raw;
|
||||||
dhcp_failover_state_t pstate, sstate;
|
dhcp_failover_state_t pstate, sstate;
|
||||||
@ -117,7 +118,9 @@ ATF_TC_BODY(load_balance, tc)
|
|||||||
if (load_balance_mine(&packet, &sstate) != 1) {
|
if (load_balance_mine(&packet, &sstate) != 1) {
|
||||||
atf_tc_fail("ERROR: secondary not accepted %s:%d", MDL);
|
atf_tc_fail("ERROR: secondary not accepted %s:%d", MDL);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
atf_tc_skip("failover is disabled");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ATF_TC(load_balance_swap);
|
ATF_TC(load_balance_swap);
|
||||||
@ -130,6 +133,7 @@ ATF_TC_HEAD(load_balance_swap, tc)
|
|||||||
|
|
||||||
ATF_TC_BODY(load_balance_swap, tc)
|
ATF_TC_BODY(load_balance_swap, tc)
|
||||||
{
|
{
|
||||||
|
#if defined(FAILOVER_PROTOCOL)
|
||||||
#if defined(SECS_BYTEORDER)
|
#if defined(SECS_BYTEORDER)
|
||||||
struct packet packet;
|
struct packet packet;
|
||||||
struct dhcp_packet raw;
|
struct dhcp_packet raw;
|
||||||
@ -179,6 +183,9 @@ ATF_TC_BODY(load_balance_swap, tc)
|
|||||||
#else
|
#else
|
||||||
atf_tc_skip("SECS_BYTEORDER not defined");
|
atf_tc_skip("SECS_BYTEORDER not defined");
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
atf_tc_skip("failover is disabled");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user