2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 18:07:25 +00:00

127 Commits

Author SHA1 Message Date
Wlodek Wencel
49a7fb582d copy rights update 2022-01-25 16:24:16 +01:00
Tomek Mrugalski
f6b8f48d16 [#189] Whitespace fixes in opened files 2022-01-20 12:04:28 +01:00
Tomek Mrugalski
429a56d73c [#189] ISC address updated 2022-01-20 12:04:28 +01:00
Thomas Markwalder
109fa1d093 [master] Pre-release tag prep for 4.4.2: version #, copyright etc...
Changes to be committed:
	modified:   LICENSE
	modified:   README
	modified:   RELNOTES
	modified:   client/dhclient.c
	modified:   common/discover.c
	modified:   configure
	modified:   configure.ac
	modified:   configure.ac+lt
	modified:   configure.ac-base
	modified:   configure.ac-lt
	modified:   relay/dhcrelay.c
	modified:   relay/tests/relay_unittests.c
	modified:   server/dhcpd.c
	modified:   server/failover.c
	modified:   util/bind.sh
2020-01-17 15:38:12 -05:00
Thomas Markwalder
5c23b618b2 [#72] Conditional compile out lease scrub log message
added a release note

server/failover.c
    scrub_lease() - wrap log message with DEBUG_FAILOVER_MESSAGES
2020-01-14 12:27:09 +00:00
Thomas Markwalder
3059324199 [45364] Replaced --enable-secs-byteorder with runtime check-secs-byte-order
configure.ac
   removed --enable-secs-byteorder support

includes/dhcpd.h
    added SV_CHECK_SECS_BYTE_ORDER

includes/failover.h
    added extern int check_secs_byte_order

server/dhcpd.c
    postconf_initialization() - added logic to
    set check_secs_byte_order

server/failover.c
    load_balance_mine() - replaced conditional comp
    directives with runtime test of check_secs_byte_order

Added release note and updated man page.
2017-11-29 07:51:50 -05:00
Thomas Markwalder
3e985dbf1f [master] Disable load balancing when load balance max secs is 0
Merges in rt39669.
2017-11-27 07:18:48 -05:00
Thomas Markwalder
7512d88b9f [master] Replaced licensing text with MPL licensing text throughout 2017-07-12 09:23:23 -04:00
Thomas Markwalder
6ec59010ef [master] Check failover pools per peer in test mode
Merges in rt29892
2017-06-27 10:10:26 -04:00
Thomas Markwalder
09dccd0331 [master] Scrub leases when they are re-balanced
Merges in 42008.
2016-06-13 10:01:48 -04:00
Thomas Markwalder
45086eef45 [master] Fixed several minor Coverity issues
Merges in rt35144.
2016-02-18 11:21:42 -05:00
Thomas Markwalder
3e3b525736 [master] Failover primary now accepts secondary updates from active to abandoned
Merges in rt25189.
2016-01-18 09:21:15 -05:00
Shawn Routhier
3933e2aa51 [master] Add support for manipulating lease queues via a binary search.
Add support for manipluating the queues holding leaes for time
based events (free, backup, active, expired, abandoned and reserved)
via a binary search instead of walking through the linked list.
2015-05-27 13:17:46 -07:00
Shawn Routhier
491bf4a27f [master] Don't call pool_timer recusively
Add a flag to avoid supersede_lease calling pool_timer
recursively when pool_timer can't handle that.
rt38002
2014-12-10 19:08:05 -08:00
Shawn Routhier
21d3034757 [master] Patch the failover code to avoid deadlocks
Patch for 36810 & 20352
This coves several related problems
1) When the primary is in conflict done it allows the secondary to
transition around resolution interrupted and potentical conflict previously
the primary would die on an illegal state.

2) It allows the servers to restart a bind update request.  Previously if
one of the servers sent an udpate request and there died (or had the communications
interrupted) in some states the first server wouldn't retransmit a new
update request and the other server wouldn't send any bind updates. This
was noticed in potential conflict.

3) Updated the state transitions to move the leases on the ack queue
back to the update queue in case of conflict-done as we might need to
retransmit them all.

4) Updated a transition from startup to potentical conflict instead
of resolution interrupted when the servers reconnect during the startup
phase in order to avoid a diffferent dead lock.
2014-11-10 19:04:13 -08:00
Thomas Markwalder
e1b18c6960 [master] Added check for invalid failover message type.
Merges in rt36653
2014-09-08 16:05:23 -04:00
Thomas Markwalder
a07d99bbef [master] Corrects medium impact issues reported by Coverity.
Merges in rt36933
2014-08-28 08:12:30 -04:00
Shawn Routhier
dceef8736e [master] Update partner's stos field when processing an update 2014-04-28 16:02:22 -07:00
Shawn Routhier
158a34fb68 [master] Add #ifdefs to allow code to compile if NSUPDATE isn't defined 2014-04-28 15:27:02 -07:00
Shawn Routhier
edad9be5cd [master] Remove vix.com and nominum.com
Remove old information from copyrights and
    man pages.
2014-01-26 10:52:15 -08:00
Shawn Routhier
f88446f16b [master] Emit log messages when the server is stable
Emit a log message when the server had completed initialization
and is about to start dispatching.  And emit log messages when
both peers in a failover pair have reached the normal state.
2013-11-08 12:29:20 -08:00
Mark Andrews
dc9d7b08aa - Silence benign static analysis warnings.
[ISC-Bugs #33428]
2013-05-15 10:49:54 +10:00
Shawn Routhier
0f750c4fb1 [master]
[rt23833]
Clean up a number of items identified by the Coverity
static analysis tool.  Runs courtesy of Red Hat.
2012-10-16 15:05:24 -07:00
Shawn Routhier
dbd6551769 [master]
[ISC-Bugs #26108]
Add a compile time option, enable-secs-byteorder, to deal with
clients that do the byte ordering on the secs field incorrectly.
This field should be in network byte order but some clients
get it wrong.  When this option is enabled the server will examine
the secs field and if it looks wrong (high byte non zero and low
byte zero) swap the bytes.  The default is disabled.  This option
is only useful when doing load balancing within failover.
2012-10-11 14:30:24 -07:00
Shawn Routhier
30e4232753 [master]
[rt30320]
When processing a failover request with an unexpected name
create an option block the relationship_name instead of using
the one from the incoming message.  This avoids problems when
the option is freed.

Also add code to free the relationship_name from the incoming
mesasage when we free the message.
2012-10-09 14:08:26 -07:00
Shawn Routhier
d13db163c7 Modify the code that determines if an outstanding DDNS request
should be cancelled.  This patch results in cancelling the
outstanding request less often.  It fixes the problem caused
by a client doing a release where  the  txt and ptr records
weren't removed from the DNS.
[ISC-BUGS #27858]
2012-03-19 22:29:06 +00:00
Tomek Mrugalski
dd9237c309 Fixed many compilation problems ("set, but not used" warnings) for
gcc 4.6 that may affect Ubuntu 11.10 users. [ISC-Bugs #27588]
2012-03-09 11:18:14 +00:00
Shawn Routhier
0ef9a46e33 Modify the DDNS handling code. In a previous patch we added logging
code to the DDNS handling.  This code included a bug that caused it
to attempt to dereference a NULL pointer and eventually segfault.
While reviewing the code as we addressed this problem, we determined
that some of the updates to the lease structures would not work as
planned since the structures being updated were in the process of
being freed: these updates were removed.  In addition we removed an
incorrect call to the DDNS removal function that could cause a failure
during the removal of DDNS information from the DNS server.
Thanks to Jasper Jongmans for reporting this issue.
[ISC-Bugs #27078]
CVE: CVE-2011-4868
2011-12-30 23:08:41 +00:00
Tomek Mrugalski
a34feb7d81 - Code cleanup: remove obsolete PROTO, KandR, INLINE and ANSI_DECL macros
[ISC-Bugs #13151]
2011-05-11 14:01:25 +00:00
Shawn Routhier
9d97e6445e Fix the handling of connection requests on the failover port.
Previously a connection request from a source that wasn't
listed as a failover peer would cause the server to become
non-responsive.  [ISC-Bugs #22679]
CERT: VU#159528 CVE: CVE-2010-3616
2010-12-13 20:31:08 +00:00
David Hankins
fdfebedf3e - An optimization described in the failover protocol draft is now included,
which permits a DHCP server operating in communications-interrupted state
  to 'rewind' a lease to the state most recently transmitted to its peer,
  greatly increasing a server's endurance in communications-interrupted.
  This is supported using a new 'rewind state' record on the dhcpd.leases
  entry for each lease.  [ISC-Bugs #19601]
2010-02-03 23:25:25 +00:00
Shawn Routhier
98bf16077d Support for asynchronous ddns per ticket 19216 - convert to using isclib and
dnslib.
2009-10-28 04:12:30 +00:00
David Hankins
f02c8db4da - s/%ul/%lu/ in failover timing debug logs. This bug was introduced in
4.2 feature development, so no RELNOTES entry has been made.
  [ISC-Bugs #20161]
2009-09-08 17:37:31 +00:00
Shawn Routhier
2c85ac9b24 Switch isc urls from http to https and correct sw to services or software
for new web site as appropirate.
2009-07-23 18:52:21 +00:00
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