2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 09:57:20 +00:00

[master] Failover primary now accepts secondary updates from active to abandoned

Merges in rt25189.
This commit is contained in:
Thomas Markwalder 2016-01-18 09:21:15 -05:00
parent a3471269e6
commit 3e3b525736
3 changed files with 15 additions and 4 deletions

1
.gitignore vendored
View File

@ -25,6 +25,7 @@ server/dhcpd
server/tests/dhcpd_unittests server/tests/dhcpd_unittests
server/tests/hash_unittests server/tests/hash_unittests
server/tests/legacy_unittests server/tests/legacy_unittests
server/tests/leaseq_unittests
server/tests/load_bal_unittests server/tests/load_bal_unittests
server/tests/test-suite.log server/tests/test-suite.log
tests/libt_api.a tests/libt_api.a

View File

@ -156,6 +156,13 @@ by Eric Young (eay@cryptsoft.com).
to Jiri Popelka at Red Hat for reporting the issue. to Jiri Popelka at Red Hat for reporting the issue.
[ISC-Bugs #39952] [ISC-Bugs #39952]
- A failover primary server will now accept a binding status update from the
secondary which transitions a lease from ACTIVE to ABANDONED. This accounts
for instances in which a client declines a lease and only the secondary
server receives it. Prior to this the primary server would reject such an
update as an "invalid state transition".
[ISC_BUGS #25180]
Changes since 4.3.3b1 Changes since 4.3.3b1
- None - None

View File

@ -3,7 +3,7 @@
Failover protocol support code... */ Failover protocol support code... */
/* /*
* Copyright (c) 2004-2015 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 2004-2016 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium * Copyright (c) 1999-2003 by Internet Software Consortium
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
@ -6075,9 +6075,12 @@ normal_binding_state_transition_check (struct lease *lease,
lease. */ lease. */
if (state -> i_am == primary) { if (state -> i_am == primary) {
/* Except that the client may send the DHCPRELEASE /* Except that the client may send the DHCPRELEASE
to the secondary, and we have to accept that. */ to the secondary. We also allow for when the
if (binding_state == FTS_RELEASED) secondary gets a DECLINE and the primary does not.*/
return binding_state; if ((binding_state == FTS_RELEASED) ||
(binding_state == FTS_ABANDONED))
return binding_state;
new_state = lease -> binding_state; new_state = lease -> binding_state;
goto out; goto out;
} }