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

345 Commits

Author SHA1 Message Date
Thomas Markwalder
04daf4fe4b [master] Fixed concatenation of "Dc" formatted options such as domain-search
Merges in rt20558.
2014-11-25 15:22:52 -05:00
Thomas Markwalder
f3a44c1037 [master] Enabling dhcp-cache-threshold no longer causes unnecessary DNS updates
Merges in rt37368.
2014-11-24 07:36:13 -05:00
Thomas Markwalder
d9b2a590e8 [master] Host declaration name can now be used in DNS forward name
Merges in rt21323.
2014-11-19 10:56:17 -05: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
0a7e1a8ab0 [master] Add use-host-decl-names support to BOOTP
Merges in rt36233.
2014-10-27 14:51:20 -04:00
Thomas Markwalder
e046c82621 [master] Added echo-client-id server parameter
Merges in rt35958 which includes fix for rt32545
    Also updated dhcp/.gitignore
2014-10-17 07:56:01 -04:00
Thomas Markwalder
7ff6ae5aa8 [master] Checkum handling fixes
Merges in rt22806
2014-09-18 15:25:02 -04:00
Shawn Routhier
250f7134bb [master] Add support for pool thresholds
Add support to set high and low thresholds for pools for
v4 and v6.  A message will be emitted when the usage of
the pool first exceeds the high threshold.  More messages
will be skipped until the usage has gone below the low
threshold and then back above the high threshold.
2014-06-05 14:55:01 -07:00
Shawn Routhier
79818c9344 [master] Add -df option to client code to help share DUIDs
Add the "-df <duid file>" option to the client code in order
to make it easier to share DUIDs between a v4 instance and
a v6 instance.  This option instructs the client to search
the duid file for a DUID if it didn't find one in the main
lease file.

In addition add the infrastructure for running ATF tests
for the client and write some ATF tests for this patch.
2014-05-16 15:24:48 -07:00
Shawn Routhier
00e9af8ee0 [master] Add configure option to incude PID in syslog entries 2014-05-07 12:19:33 -07:00
Shawn Routhier
02b0bdc3cf [master] Some small client changes
18933 - add an extra server by name call
26735 - when requested via a command line option
        have client exit afer 1 failure per the docs
33098 - expose next-server option to dhclient script
2014-05-07 08:20:12 -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
38ee81bd80 [master] Patch to ignore UIDS
This patch adds an option to allow the administrator to tell the
server to ignore UIDS when choosing a lease.
2013-12-13 12:40:45 -08:00
Shawn Routhier
61ef216b8d [master] Add support for user selection of the from address for DDNS transactions 2013-12-11 08:08:42 -08:00
Shawn Routhier
e54ff84f08 -n master Patch for 30461 and update the auto generated files
Update the auto genrated files to add the required bind9
libraries

Fix up dhcpctl/Makefile.am to include the isccfg lib

Patch for 30461 to allow the DHCP server to find
the name server to update via the DNS
Conflicts:
2013-12-10 04:03:12 +00:00
Shawn Routhier
619304cd87 [master] Support using v6 relay options in server decicions. 2013-11-25 21:00:41 -08:00
Shawn Routhier
cde11a4cdb [master] Add option to suppress the use of fsync when writing lease files
The option is dont-use-async <flag> and it defaults to disabled.
2013-11-08 12:00:02 -08:00
Shawn Routhier
4b8251a0c0 -n [master]
Fix the socket handling for DHCPv6 clients to allow multiple instances
of a clinet on a single machine to work properly.
[ISC-Bugs #34784]
2013-10-21 14:59:41 -07:00
Shawn Routhier
d7d9c0c7c3 -n [master]
Add code to support the standards version of DDNS
2013-10-14 15:53:24 -07:00
Shawn Routhier
01fa619fab -n [master]
26510
 Add support for classes in the IPv6 code
2013-08-27 14:20:09 -07:00
Shawn Routhier
a7341359cc -n [master]
[rt27912]
    Add code to suppor on {commit expiry release} statements for DHCPv6.
    There are several pieces to this change
    1) Add space in the iasubopt structure to hold the statement pointers
    2) Update the execute code to fill in the structures as necessary
    3) Execute the statements when appropriate
    Many of the changes in the non-v6 code are to pass the v6 structures
    around to the execute code.
2013-08-27 13:40:47 -07:00
Mark Andrews
dc9d7b08aa - Silence benign static analysis warnings.
[ISC-Bugs #33428]
2013-05-15 10:49:54 +10:00
Shawn Routhier
f8380d3ff2 [master]
+- Add support for a simple check that the server id in a request message
+  to a failover peer matches the server id of the server.  This support
+  is enabled by editing the file includes/site.h and uncommenting the
+  definition for SERVER_ID_CHECK.  The option has several restrictions
+  and issues - please read the comment in the site.h file before
+  enabling it.
+  [ISC-Bugs #31463]
2012-11-16 15:02:13 -08:00
Shawn Routhier
10613724a9 [master]
The client now passes information about the options it requested
from the server to the script code via environment variables.
These variables are of the form requested_<option_name>=1 with
the option name being the same as used in the new_* and old_*
variables. [ISC-Bugs #29068]
2012-11-13 12:56:02 -08:00
Shawn Routhier
e563ec2e58 When attempting to convert a DUID from a client id option
into a hardware address handle unexpected client ids properly.
Thanks to Markus Hietava of Codenomicon CROSS project for the
finding this issue and CERT-FI for vulnerability coordination.
[ISC-Bugs #29852]
CVE: CVE-2012-3570
2012-06-27 21:33:25 +00:00
Shawn Routhier
de87ffe336 Previously the server code was relaxed to allow packets with zero
length client ids to be processed.  Under some situations use of
zero length client ids can cause the server to go into an infinite
loop.  As such ids are not valid according to RFC 2132 section 9.14
the server no longer accepts them.  Client ids with a length of 1
are also invalid but the server still accepts them in order to
minimize disruption.  The restriction will likely be tightened in
the future to disallow ids with a length of 1.
Thanks to Markus Hietava of Codenomicon CROSS project for the
finding this issue and CERT-FI for vulnerability coordination.
[ISC-Bugs #29851]
CVE: CVE-2012-3571
2012-06-27 21:20:19 +00:00
Shawn Routhier
cbbd2714d6 - Rotate the lease file when running in v6 mode.
[ISC-Bugs #24887]
2012-05-15 21:07:17 +00:00
Shawn Routhier
bc7f8b8e39 Multiple items to clean up IPv6 address processing.
When processing an IA that we've seen check to see if the
addresses are usable (not in use by somebody else) before
handing it out.
When reading in leases from the file discard expired addresses.
When picking an address for a client include the IA ID in
addition to the client ID to generally pick different addresses
for different IAs.
[ISC-Bugs #23138] [ISC-Bugs #27945] [ISC-Bugs #25586]
[ISC-Bugs #27684]
2012-04-10 00:54:35 +00: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
Shawn Routhier
b047bd385b Add support for Infiniband over sockets to the server and
relay code.  We've tested this on Solaris and hope to expand
support for Infiniband in the future.  This patch also corrects
some issues we found in the socket code.  [ISC-Bugs #24245]
2012-02-16 21:05:28 +00:00
Shawn Routhier
87132514a0 In the DDNS code handle error conditions more gracefully and add more
logging code.  The major change is to handle unexpected cancel events
from the DNS client code.
[ISC-Bugs 26287].
2012-02-03 22:47:43 +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
Shawn Routhier
3221151b74 Enhanced patch for 23595 to handle IPv4 fixed addresses more
cleanly.
2011-10-04 19:36:15 +00:00
Shawn Routhier
d424157d63 Add support for passing DDNS information to a DNS server over
an IPv6 address.  [ISC-Bugs #22647]
2011-09-21 20:36:55 +00:00
Shawn Routhier
beaed73f00 DNS Update fix. A misconfigured server could crash during DNS update
processing if the configuration included overlapping pools or
multiple fixed-address entries for a single address.  This issue
affected both IPv4 and IPv6. The fix allows a server to detect such
conditions, provides the user with extra information and recommended
steps to fix the problem.  If the user enables the appropriate option
in site.h then server will be terminated
2011-07-08 22:49:11 +00:00
Tomek Mrugalski
d15aa96419 - Strict checks for content of domain-name DHCPv4 option can now be
configured during compilation time. Even though RFC2132 does not allow
  to store more than one domain in domain-name option, such behavior is
  now enabled by default, but this may change some time in the future.
  See ACCEPT_LIST_IN_DOMAIN_NAME define in includes/site.h.
  [ISC-Bugs #24167]
2011-07-01 12:07:09 +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
a34feb7d81 - Code cleanup: remove obsolete PROTO, KandR, INLINE and ANSI_DECL macros
[ISC-Bugs #13151]
2011-05-11 14:01:25 +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
Shawn Routhier
391965129d Restore printing of values in omshell to the style pre 21518. For
21518 we changed the print routines to always display time values
as a hex list.  This had a side effect of printing all data strings
as a hex list.  We shall investigate other ways of displaying time
values more usefully.  [ISC-Bugs #22626]
2010-12-03 20:27:51 +00:00
Shawn Routhier
6aaaf6a460 Fixes to lease input and output.
[ISC-Bugs #20418] - Some systems don't support the "%s" argument to
strftime, paste together the same string using mktime instead.
[ISC-Bugs #19596] - When parsing iaid values accept printable
characters.
[ISC-Bugs #21585] - Always print time values in omshell as hex
instead of ascii if the values happen to be printable characters.
2010-09-13 22:06:37 +00:00
Shawn Routhier
2b58b8650e Modify determination of ttl to use for DDNS update [ISC-Bugs #21126] 2010-05-27 17:19:26 +00:00
Shawn Routhier
590298e746 Add some debugging output for use with the DDNS code. [ISC-Bugs 20916] 2010-05-26 22:25:10 +00:00
David Hankins
33692791d7 - "The LDAP Patch" that has been circulating for some time, written by
Brian Masney and S.Kalyanasundraram and maintained for application to
  the DHCP-4 sources by David Cantrell has been included.  Please be
  advised that these sources were contributed, and do not yet meet the
  high standards we place on production sources we include by default.
  As a result, the LDAP features are only included by using a compile-time
  option which defaults off, and if you enable it you do so under your
  own recognizance.  We will be improving this software over time.
  [ISC-Bugs #17741]
2010-03-24 21:49:03 +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
Shawn Routhier
7aa153b882 Primarly fix the trace code. This was broken during the modfictions of the
DDNS code to use the bind libraries.  This patch fixes that breakage and
includes support for the new DDNS code.  This patch also deletes some dead
code and neatens up some log messages.
2010-02-11 23:55:36 +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
176c2a7d2d Continuing update for 20697 - update sys/stddef.h to stddef.h 2010-02-02 23:32:07 +00:00
Shawn Routhier
69c1bf48d3 Add include for stddef.h and remove an extra space from dhcrelay.c 2010-02-02 19:58:18 +00:00
Shawn Routhier
a47d63362f Update copyright years 2009-11-24 02:06:57 +00:00