2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 13:28:14 +00:00

93 Commits

Author SHA1 Message Date
David Hankins
b8d45c67ea - Secondary servers in a failover pair will now perform ddns removals if
they had performed ddns updates on a lease that is expiring, or was
  released through the primary.  As part of the same fix, stale binding scopes
  will now be removed if a change in identity of a lease's active client is
  detected, rather than simply if a lease is noticed to have expired (which it
  may have expired without a failover server noticing in some situations).
  [ISC-Bugs #19826b]
2009-07-22 17:00:01 +00:00
Paul Selkirk
32fd12cc74 update copyright 2009-07-16 22:01:26 +00:00
Paul Selkirk
d453265fd2 add a null check to avoid primary crash on contact with secondary [rt19705] 2009-07-16 19:48:45 +00:00
David Hankins
9e3eb22ab7 - A new failover configuration parameter has been introduced for those
environments where DHCP servers can be reasonably guaranteed to be
  "down" when the failover TCP socket is severed, "auto-partner-down".
  This parameter is not generally safe, and by default is disabled, so
  please carefully review the documentation of this parameter in the
  dhcpd.conf(5) manpage before determining to use it yourself.
  [ISC-Bugs #19600]
2009-06-17 22:08:42 +00:00
David Hankins
350576c5d4 - Fixed a bug where an OMAPI socket disconnection message would not result
in scheduling a failover reconnection, if the link had not negotiated a
  failover connect yet (e.g.: connection refused, asynch socket connect()
  timeouts).  [ISC-Bugs #19684]
2009-05-20 23:58:53 +00:00
David Hankins
dedde1ba35 - Fixed failover reconnection retry code to continue to retry to reconnect
rather than restarting the listener.  [ISC-Bugs #19618]
2009-04-22 20:27:58 +00:00
David Hankins
95fd7038a2 - Memory leak in the load_balance_mine() function is fixed. This would
leak ~20-30 octets per DHCPDISCOVER packet while failover was in use
  and in normal state. [ISC-Bugs #19548]

- Various compilation fixes have been included for the memory related
  DEBUG #defines in includes/site.h.  [ISC-Bugs #19548]
2009-04-07 19:55:52 +00:00
David Hankins
1387545ff7 - Some failover debugging #defines have been better defined and some
high frequency messages moved to a deeper debugging symbol.

- The CLTT parameter in failover is now only updated by client activity,
  and not by failover binding updates (taking on the peer's CLTT).

- Failover BNDUPD messages are now discarded if they conflict with an
  update that has been trasnmitted, but not acknowledged.

  [ISC-Bugs #17577c]
2008-09-24 16:18:56 +00:00
Evan Hunt
dccb6edf66 Updated copyright strings for 4.1.0a1 release 2008-01-24 02:43:06 +00:00
David Hankins
ffdf3c8cb9 - When a failover server suspects it has encountered a peer running a
version 3.0.x failover server, a warning that the failover wire protocol
  is incompatible is printed.  [ISC-Bugs #17129]
- The failover server no longer issues a floating point error if it encounters
  a previously undefined option code.  [ISC-Bugs #17129]
2008-01-21 19:05:20 +00:00
David Hankins
41d4652fd5 - A log message was introduced to clarify the situation where a failover
'address' parameter (the server's local address) did not resolve to an
  IPv4 address.  [ISC-Bugs #15826]
2008-01-08 16:22:23 +00:00
Francis Dupont
be62cf0675 finer granularity timers 2008-01-03 00:30:14 +00:00
David Hankins
f71bc98898 - A bug in failover pool rebalancing that caused POOLREQ message ping-pongs
was repaired.  [ISC-Bugs #17228]

- A flaw in failover pool rebalancing that could cause POOLREQ messages to
  be sent outside of the min-balance/max-balance scheduled intervals has
  been repaired.  [ISC-Bugs #17228]
2007-12-18 18:04:22 +00:00
David Hankins
99363a7414 - A cosmetic bug during potential-conflict recovery that caused the peer's
'conflict-done' state message to be logged as 'unknown-state' has been
  repaired.  It is now logged correctly.  [ISC-Bugs #17204]
2007-12-13 16:59:10 +00:00
Francis Dupont
20ae1affb0 almost editorial stuff 2007-11-30 21:51:43 +00:00
David Hankins
edb1283e10 - The peer_wants_leases() changes pulled up from 3.1.0 were corrected,
'never used' leases will no longer consistently shift between servers
  on every pool rebalance run.  [ISC-Bugs #17211]
2007-10-09 22:32:49 +00:00
David Hankins
1418fd1103 - A bug was repaired where MAC Address Affinity for virgin leases always
mapped to the primary.  Virgin leases now have an interleaved preference
  between primary and secondary. [ISC-Bugs #17174]

- A bug was repaired where MAC Address Affinity for clients with no client
  identifier was sometimes mishashed to the peer.  Load balancing during
  runtime and pool rebalancing were opposing. [ISC-Bugs #17174]
2007-09-27 15:28:05 +00:00
Shane Kerr
d7ec175bc0 Couple of casts to fix build errors reported by robie. 2007-09-18 07:24:22 +00:00
David Hankins
fa9b593de7 - Log messages when failover peer names mismatch have been improved to
point out the problem.
2007-09-17 17:18:49 +00:00
Shane Kerr
28868515f6 Code cleanup to remove warnings from "gcc -Wall".
See RT ticket #16988 for more.
2007-07-13 06:43:43 +00:00
David Hankins
a512cc3a31 - Failover rebalance events no longer play ping pong with round errors
(moving leases between free and back to backup where there are an
  odd number of leases).
  [ISC-Bugs #16910]

- The 'pool' log line has been split into two messages, one before the
  rebalance run, and one after.
  [ISC-Bugs #16910]

- Any queued BNDACKs are transmitted before transmitting new BNDUPDs.
  This enforces the correct sequence of events for the remote server
  processing these messages.
  [ISC-Bugs #16910]
2007-06-01 22:26:01 +00:00
David Hankins
fc3b9c907d - A flaw in failover startup sequences was repaired that sometimes left
the primary DHCP server's pool rebalance schedules unscheduled.
  [ISC-Bugs #16621]
2007-05-22 22:56:21 +00:00
David Hankins
706792c9d3 Copyright++ 2007-05-19 19:16:28 +00:00
David Hankins
fe5b0fdd70 - Replaced ./configure shellscripting with GNU Autoconf. [ISC-Bugs #16405b]
- RELNOTES/README++
- s/wether/whether/ in dhcp-options.5 manpage edits.
2007-05-19 18:47:15 +00:00
Shane Kerr
c57db45ce9 Spelling fixes. See RT ticket 16513 for details. 2007-01-29 10:25:55 +00:00
David Hankins
6708d944e1 - Some default hash table sizes were tweaked, some upwards, some downwards.
3.1.0a1's tables resulted in a reduction in default server memory use.
  The new selected values provide more of a zero sum (increasing the size
  of tables likely to be populated, decreasing the size of tables unlikely).

- Lease structures appear in three spearate hashes: by IP address, by UID,
  and by hardware address.  One type of table was used for all three, and
  improvements to IP address hashing were applied to all three (so UID and
  hardware addresses were treated like 4-byte integers).  There are now two
  types of tables, and the uid/hw hashes use functions more appropriate
  to their needs.

- The max-lease-misbalance percentage no longer causes scheduled rebalance
  runs to be skipped: it still governs the schedule, but every scheduled
  run will attempt balance.

[ISC-Bugs #16396]
2006-10-27 22:54:13 +00:00
David Hankins
4c7ffd58fc Silencing compiler warnings in ths run of development. [ISC-Bugs #16425] 2006-10-09 17:47:43 +00:00
David Hankins
616d67cb0a - The servers now try harder to transmit pending binding updates when
entering normal state. [ISC-Bugs #16412]

- UPDREQ/UPDREQALL handling was optimized - it no longer dequeues and
  requeues all pending updates.  This should reduce the number of spurious
  'xid mismatch' log mesasges. [ISC-Bugs #16412]
2006-09-27 18:27:27 +00:00
David Hankins
808d45fd9d Head bugfix, dueling BNDUPD/ACKs [ISC-Bugs #16346b] 2006-08-28 21:35:03 +00:00
David Hankins
d084a789f5 - Don't forget to set ATSFP on receiving a BNDACK - bug introduced in 3.1.0
work.  [ISC-Bugs #16359]
2006-08-24 14:55:51 +00:00
David Hankins
2b9ce770a3 MAC address affinity and reserved leases were subtly incompatible.
[ISC-Bugs #16172]
2006-06-19 15:15:16 +00:00
David Hankins
2426234f7c - Failover pairs now implement 'MAC Affinity' on leases moving from the
active to free states.  Leases that belonged to the failover secondary
  are moved to BACKUP state rather than FREE upon exiting EXPIRED state.
  If lease rebalancing must move leases, it tries first to move leases
  that belong to the peer in need.
- The server no longer sends POOLREQ messages unless the pool is severely
  misbalanced in the peer's favor (see 'man dhcpd.conf' for more details).
- Pool rebalance events no longer happen upon successfully allocating a
  lease.  Instead, they happen on a schedule.  See 'man dhcpd.conf' for the
  min-balance and max-balance statements for more information.

  [ISC-Bugs #13308]
2006-06-16 19:26:45 +00:00
David Hankins
0b17f049ed - The Load Balance Algorithm was misimplemented. The current implementation
matches RFC 3074. [ISC-Bugs #15980]
2006-05-04 21:14:21 +00:00
David Hankins
a55ccdd037 - Support for 'reserved' (psuedo-static) and BOOTP leases via failover
was introduced. [ISC-Bugs #13672]
- The failover implementation was updated to comply with revision 12 of
  the protocol draft. [ISC-Bugs #13672]
2006-04-27 17:26:42 +00:00
David Hankins
88cd8aca9e - Merge changes between 3.0.3RC1 and 3.0.4-BETA-3 into HEAD (silence
robie).
2006-02-24 23:16:32 +00:00
David Hankins
98311e4ba9 MASSIVE merge from V3-RELEASE-BRANCH into HEAD. HEAD and V3-RELEASE are
now synced as of tag V3-0-3-BETA-1.
2005-03-17 20:15:29 +00:00
Ted Lemon
a609e69bba sync with branch 2001-08-10 10:50:50 +00:00
Ted Lemon
0db87765e3 Pull up RC9 2001-06-29 18:34:57 +00:00
Ted Lemon
d758ad8cac Merge changes between 3.0rc7 and 3.0rc8pl2. 2001-06-27 00:31:20 +00:00
Ted Lemon
31bbee784c Sync with 3.0rc7 2001-05-17 19:04:09 +00:00
Ted Lemon
01c6e68ac8 - Whenever we are connected, send updates.
- Correctly handle an immediate peer transition to partner-down when we come
  up in normal.
- Change 'peer_name' attribute of failover-state object to just 'name'.
2001-05-03 18:31:28 +00:00
Ted Lemon
2036af066a - When we are in partner_down and peer moves to recover_wait, behave as we
would for recover, not for recover_done.
2001-05-01 23:12:06 +00:00
Ted Lemon
37d8bfebe6 Don't bother with recover_wait if both peers are recovering. 2001-05-01 20:02:10 +00:00
Ted Lemon
61aaca12d9 Make put_message work with mallocs that don't allocate zero-length buffers. 2001-04-20 19:58:42 +00:00
Ted Lemon
17a5059ba0 - If we are get a contact timeout on a link, drop it, regardless of
what state we're in.
2001-04-20 19:05:53 +00:00
Ted Lemon
d07ccee395 Don't ignore 'no-op' peer state changes when we're disconnected. 2001-04-20 18:48:25 +00:00
Ted Lemon
837d4342f8 Oops, keep the old stos but take the new state when moving to recover_wait! 2001-04-20 18:34:27 +00:00
Ted Lemon
fd273e02d9 - Add recover_wait state.
- If we make transition from startup to recover_wait, set a timer to
  get us to recover_done.
- If peer state update is received, _always_ check to see if we should
  do a transition out of startup.
2001-04-20 18:11:40 +00:00
Ted Lemon
f67a7be59e - Don't print out spurious messages and initiate reconnect timeouts when
dhcp_failover_link_initiate returns ISC_R_INCOMPLETE.
2001-04-20 15:14:40 +00:00
Ted Lemon
755acf8875 - Add some informational statements in recover mode when it looks like nothing
is happening.
- Fix another compile option incompatibility.
2001-04-18 19:00:42 +00:00