mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 14:55:30 +00:00
- Set peer state to potential_conflict when there is no known peer state -
this ensures that when a pool is moved from not being a failover pool to being a failover pool, the two servers sync up their lease databases. - Dereference old host group next pointer before installing named group.
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: confpars.c,v 1.121 2000/07/27 09:03:01 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: confpars.c,v 1.122 2000/08/15 22:23:33 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"
|
||||||
@@ -685,7 +685,7 @@ void parse_failover_peer (cfile, group, type)
|
|||||||
peer -> name = name;
|
peer -> name = name;
|
||||||
|
|
||||||
/* Set the initial state. */
|
/* Set the initial state. */
|
||||||
peer -> my_state = communications_interrupted;
|
peer -> my_state = potential_conflict;
|
||||||
peer -> my_stos = cur_time;
|
peer -> my_stos = cur_time;
|
||||||
peer -> partner_state = unknown_state;
|
peer -> partner_state = unknown_state;
|
||||||
peer -> partner_stos = cur_time;
|
peer -> partner_stos = cur_time;
|
||||||
@@ -1491,11 +1491,14 @@ void parse_host_declaration (cfile, group)
|
|||||||
if (host -> named_group && host -> named_group -> group) {
|
if (host -> named_group && host -> named_group -> group) {
|
||||||
if (host -> group -> statements ||
|
if (host -> group -> statements ||
|
||||||
(host -> group -> authoritative !=
|
(host -> group -> authoritative !=
|
||||||
host -> named_group -> group -> authoritative))
|
host -> named_group -> group -> authoritative)) {
|
||||||
|
if (host -> group -> next)
|
||||||
|
group_dereference (&host -> group -> next,
|
||||||
|
MDL);
|
||||||
group_reference (&host -> group -> next,
|
group_reference (&host -> group -> next,
|
||||||
host -> named_group -> group,
|
host -> named_group -> group,
|
||||||
MDL);
|
MDL);
|
||||||
else {
|
} else {
|
||||||
group_dereference (&host -> group, MDL);
|
group_dereference (&host -> group, MDL);
|
||||||
group_reference (&host -> group,
|
group_reference (&host -> group,
|
||||||
host -> named_group -> group,
|
host -> named_group -> group,
|
||||||
|
Reference in New Issue
Block a user