2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-28 04:47:40 +00:00

312 Commits

Author SHA1 Message Date
Shawn Routhier
640101e3d3 Correct an unsigned math operation when calculating the options
buffer space for bootp and use a better constant - DHCP packet
size instead of DHCP packet size + udp and iP headers.
Check that we have a packet->options structure before using it.
Only process packets that are longer than a bootp fixed packet
including server and file names.  Previously we allowed for
shorter packets but that wasn't working and nobody noticed.
2011-07-01 23:11:53 +00:00
Tomek Mrugalski
f6a13c3259 Copyright year updated. 2011-05-23 11:04:12 +00:00
Tomek Mrugalski
1b601efa2c Server no longer complains about NULL pointer when configured
server-identifier expression fails to evaluate. [ISC-Bugs #24547]
2011-05-23 10:34:10 +00:00
Mark Andrews
5c09391c07 remove redundant test, unsigned is always >= 0 2011-05-13 01:57:38 +00:00
Tomek Mrugalski
929a236497 - If a client renews before 'dhcp-cache-threshold' percent of its lease
has elapsed (default 25%), the server will reuse the allocated lease
  (provide a lease within the currently allocated lease-time) rather
  than extend or renew the lease.  This absolves the server of needing
  to perform an fsync() operation on the lease database before reply,
  which improves performance. [ISC-Bugs #22228]
2011-05-12 13:26:55 +00:00
Tomek Mrugalski
656b1ecebe The DHCP server now responds to DHCPLEASEQUERY messages from agents using
IP addresses not covered by a subnet in configuration. Server also returns
vendor-class-id option, if client sent it. [ISC-Bugs #21094]
2011-04-22 13:21:35 +00:00
Tomek Mrugalski
5d082abd92 Several time related improvements:
- set initial delay to 0 to speed up client start
- added 'initial-delay' parameter to possibly revert to old behavior
- better handling of very short (1 or 2s) leases
- client lease records are recorded at most once every 15 seconds
- ICMP ping-check is now timed more precisely
- Servers that don't offer lease-time are now black-listed
[ISC-Bugs #19660]
2011-04-21 13:24:24 +00:00
Mark Andrews
4176a7009d cast to int for * in $.*s 2011-02-16 03:22:56 +00:00
Mark Andrews
228e444722 address builds where sizeof != int 2010-09-09 06:48:52 +00:00
Shawn Routhier
66be0ad13f Minor code fixes
[ISC-Bugs #19566] When trying to find the zone for a name for ddns allow
 the name to be at the apex of the zone.
 [ISC-Bugs #19617] Restrict length of interface name read from command line
 in dhcpd - based on a patch from David Cantrell at Red Hat.
 [ISC-Bugs #20039] Correct some error messages in dhcpd.c
 [ISC-Bugs #20070] Better range check on values when creating a DHCID.
 [ISC-Bugs #20198] Avoid writing past the end of the field when adding
 overly long file or server names to a packet and add a log message
 if the configuration supplied overly long names for these fields.
 [ISC-Bugs #21497] Add a little more randomness to rng seed in client
2010-09-08 22:13:05 +00:00
David Hankins
ea75d5443c - Fixed a bug that leaks host record references onto lease structures,
causing the server to apply configuration intended for one host to any
  other innocent clients that come along later.  [ISC-Bugs #22018]
2010-09-07 23:55:24 +00:00
David Hankins
524705e54a - 'get-host-names true;' now also works even if 'use-host-decl-names true;'
was also configured.  The nature of this repair also fixes another
  error; the host-name supplied by a client is no longer overridden by a
  reverse lookup of the lease address.  Thanks to a patch from Wilco Baan
  Hofman supplied to us by the Debian package maintenance team.
  [ISC-Bugs #21691] {Debian Bug#509445}
2010-07-13 18:43:41 +00:00
Shawn Routhier
1e05d095c2 Don't include lease time information in the response to a DHCPINFORM
request.  We do this by removing any time information from the option
cache before building the reponse packet.  Bug ticket 21092.
2010-04-20 23:20:20 +00:00
Shawn Routhier
0585235c45 Update the fsync batching patch to work with the isc libraries - 21044 2010-03-12 01:36:57 +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
a35285748d Clean up some compiler warnings 2010-02-02 00:44:06 +00:00
David Hankins
3c941d426d - Cleaned up an unused hardware address variable in nak_lease().
[ISC-Bugs #15382]
2010-02-01 22:03:15 +00:00
Shawn Routhier
a47d63362f Update copyright years 2009-11-24 02:06:57 +00:00
Shawn Routhier
bd0b98c170 Ticket 19830 - enhancment to allow use of host-identifier syntax for DHCPv4
as well as for DHCPv6
2009-11-10 21:12:23 +00:00
David Hankins
5a671e8715 *** empty log message *** 2009-09-11 18:13:12 +00:00
David Hankins
95f5d38cb3 - Fixed a fenceposting bug when a client had two host records configured,
one using 'uid' and the other using 'hardware ethernet'.  [ISC-Bugs #19895]
2009-07-24 17:21:52 +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
a1308b646d - Fixed a bug where relay agent options would never be returned when
processing a DHCPINFORM.  [ISC-Bugs #19303]
2009-07-06 23:33:23 +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
fbcee149f8 - Delayed-ack is now a compile-time option, compiled out by default.
This feature is simply too experimental for right now, and causes
  some problems to some failover installations.  We will revisit this
  in future releases.  [ISC-Bugs #18832]
2008-11-03 18:13:58 +00:00
David Hankins
a4ffedd162 - A cosmetic bug in DHCPDECLINE processing was fixed which caused all
successful DHCPDECLINEs to be logged as "not found" rather than
  "abandoned".  [ISC-Bugs #18605]
2008-09-11 16:11:46 +00:00
David Hankins
8fbb55ff3f - A partner-down failover server no longer emits 'peer holds all free leases'
if it is able to newly-allocate one of the peer's leases.  [ISC-Bugs #18437]
2008-08-19 18:00:24 +00:00
Evan Hunt
51e7687feb Fixed a bug that caused some request types to be logged incorrectly [rt17987] 2008-07-18 01:04:58 +00:00
David Hankins
f8cbf390af - There is now a default 1/4 of a second scheduled delay between delayed
fsync()'s, it can be configured by the max-ack-delay configuration
  parameter.  [ISC-Bugs #17679]
2008-02-28 23:40:45 +00:00
David Hankins
66cebfcb89 - ./configure was extended to cover many optional build features, such
as failover, server tracing, debugging, and the execute() command.
  [ISC-Bugs #17678]
2008-02-28 21:21:56 +00:00
David Hankins
087b8f18ad - Do not delay-ack STATIC leases.
- Use lease referencers to maintain reference count on the lease structure.
- Log an error if you encounter a lease with no transmit-state.
o These changes were to a feature that has not yet been publically released,
  so there is no RELNOTES entry.
2008-01-28 18:21:06 +00:00
Evan Hunt
dccb6edf66 Updated copyright strings for 4.1.0a1 release 2008-01-24 02:43:06 +00:00
David Hankins
6368a1bd72 - Multiple (up to "delayed-ack x;" maximum) DHCPv4 packets are now queued and
released in bursts after single fsync() events when the upper limit is
  reached or if the receiving sockets go dry.  The practical upshot is
  that fsync-coupled server performance is now multiplicitively increased.
  The default delayed ack limit is 28.  Thanks entirely to a patch from
  Christof Chen.
2008-01-21 19:53:21 +00:00
Shane Kerr
57fcb8d97a Move warning about dhcp-renewal-time to config parsing rather
than runtime.
See RT ticket #17382 for more.
2008-01-14 14:26:10 +00:00
David Hankins
2c9bf1f4bf - The minimum site code value was set to 224 in 3.1.0 to track RFC3942. This
broke a lot of legacy site local configurations.  The new code in place will
  track site local space minimum option codes and logs a warning to encourage
  updates and exploration of site local code migration problems.  Option
  codes less than 128 in site local spaces remain inaccessible.
  [ISC-Bugs #17203]
- A possible relay agent option bug was repaired where random server
  initialization state may have been used to signal the relay agent
  information options sub-option code for the 'END' of the option space.
  [ISC-Bugs #17203]
2008-01-09 17:13:16 +00:00
David Hankins
a16d908beb mistake in merging 2008-01-08 16:12:07 +00:00
David Hankins
49f61135b3 - A bug was fixed where the 'giaddr' may be used to find the client's subnet
rather than its own 'ciaddr'.  [ISC-Bugs #16627]
2008-01-08 16:09:32 +00:00
Francis Dupont
be62cf0675 finer granularity timers 2008-01-03 00:30:14 +00:00
David Hankins
00638355f1 - The 'min-secs' configuration parameter's log message has been updated to
be more helpful.  [ISC-Bugs #17299]
2007-12-13 16:56:24 +00:00
Evan Hunt
65cf86d7ab Clarify error message when lease limit reached. [rt17010] 2007-11-02 22:09:02 +00:00
David Hankins
b1d3778ce8 - Relative time may now be used as a qualifier for 'allow' and 'deny' access
control lists.  These directives may be used to assist in re-addressing
  address pools without having to constantly reconfigure the server.  Please
  see 'man dhcpd.conf' for more information on allow/deny 'after time' syntax.
  Thanks to a patch from Christof Chen.  [ISC-Bugs #17110]
2007-10-31 19:13:33 +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
e889ded168 - 'dhcp.c(3953): non-null pointer' has been repaired. This fixes a flaw
wherein the DHCPv4 server may use seemingly random source addresses.
  [ISC-Bugs #16897]
2007-05-21 22:09:07 +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
David Hankins
98bd7ca099 DHCPv6 branch merged to HEAD. 2007-05-08 23:05:22 +00:00
David Hankins
d5b6835f89 - The server's "by client-id" and "by hardware address" hash table lists
are now sorted according to the preference to re-allocate that lease to
  returning clients.  This should eliminate pool starvation problems
  arising when "INIT" clients were given new leases rather than presently
  active ones. [ISC-Bugs #16831]
2007-04-26 20:06:25 +00:00
David Hankins
9aa3f3a55d - Some bugs were fixed in the 'emergency relay agent options hologram'
which is used to retain relay agent option contents from when the
  client was in INIT or REBIND states.  This should solve problems where
  relay agent options were not echoed from the server, even when giaddr
  was set.  [ISC-Bugs #16787]
2007-04-20 15:25:26 +00:00
David Hankins
02428754a3 - In the case where an "L2" DHCP Relay Agent (one that does not set giaddr)
was directly attached to the same broadcast domain as the DHCP server,
  the RFC3046 relay agent information option was not being returned to the
  relay in the server's replies.  This was fixed; the dhcp server no longer
  requires the giaddr to reply with relay agent information.  Note that
  this also improves compatibility with L2 devices that "intercept" DHCP
  packets and expect relay agent information even in unicast (renewal)
  replies. [ISC-Bugs #16762]
2007-03-27 03:48:06 +00:00
David Hankins
66c8f7347a - An option definition referencing leak was fixed, which resulted in early
termination of dhclient upon the renewal event. [ISC-Bugs #16423]
2006-10-17 20:45:59 +00:00