2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-28 12:57:42 +00:00

1205 Commits

Author SHA1 Message Date
Shawn Routhier
7b85845662 Update docs as per ticket 28574 2012-04-02 22:39:38 +00:00
Shawn Routhier
b342f2e77c Use offsetof() instead of sizeof() to get the sizes for dhcpv6_relay_packet
and dhcpv6_packet in several more places.  Thanks to a report from
Bruno Verstuyft and Vincent Demaertelaere of Excentis.
[ISC-Bugs #27941]
2012-03-20 00:31:34 +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
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
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
Tomek Mrugalski
06fb929cbc Regenerated makefiles and scripts (using aclocal-1.10, autoheader-2.61,
automake-1.10 and autoconf-2.61 on docs.lab)
2012-01-31 16:06:53 +00:00
Tomek Mrugalski
a1a1503104 Existing server unittest migrated to ATF. 2012-01-31 15:44:16 +00:00
Shawn Routhier
de6c9af6dd Fixed the code that checks if an address the server is planning
to hand out is in a reserved range.  This would appear as
the server being out of addresses in pools with particular ranges.
[ISC-Bugs #26498]
2012-01-05 00:03:18 +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
727ac12b5b Update copyright 2011-10-14 19:48:49 +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
cf648f4174 Add FILES section tag 2011-09-19 00:24:50 +00:00
Shawn Routhier
086bd8f502 automake regeneration 2011-09-13 23:04:20 +00:00
Shawn Routhier
d208bb0431 Fix the code that checks for an existing DDNS transaction to cancel
when removing DDNS information, so that we will continue with the
processing if we have a lease even if it doesn't have an outstanding
transaction.  [ISC-Bugs #24682]
2011-08-22 20:39:19 +00:00
Shawn Routhier
8bd96ccb21 Two packets were found that cause a server to halt. The code
has been updated to properly process or reject the packets as
appropriate.  Thanks to David Zych at University of Illinois
for reporting this issue.  [ISC-Bugs #24960]
One CVE number for each class of packet.
CVE-2011-2748
CVE-2011-2749
2011-07-19 22:13:26 +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
Shawn Routhier
c850c0eec5 Restore common/discover.c, common/options.c and server/dhcp.c
as I mistakenly committed them to head instead of the ticket
branch.
2011-07-02 00:05:35 +00:00
Shawn Routhier
4e41a8d7e0 correct spelling of options 2011-07-01 23:16:37 +00:00
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
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
Shawn Routhier
786f2e79cc Enlarge the buffer size used by the Omshell code and some of the
print routines to allow for greater than 60 characters or, when
printing as hex strings, 20 characters.  [ISC-Bugs #22743]
2011-06-01 23:25:37 +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
Tomek Mrugalski
802fdea172 - Documentation cleanup
[ISC-Bugs #23326] Updated References document, several man page updates
2011-05-20 13:48:33 +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
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
fb30f3fc8b Minor code cleanups - but note port change for #23196
[ISC-Bugs #23470] - Modify when an ignore return macro is defined to
handle unsed error return warnings for more versions of gcc.
[ISC-Bugs #23196] - Modify the reply handling in the server code to
send to a specified port rather than to the source port for the incoming
message.  Sending to the source port was test code that should have
been removed.  The previous functionality may be restored by defining
REPLY_TO_SOURCE_PORT in the includes/site.h file.  We suggest you don't
enable this except for testing purposes.
[ISC-Bugs #22695] - Close a file descriptor in an error path.
[ISC-Bugs #19368] - Tidy up variable types in validate_port.
2011-05-11 00:38:56 +00:00
Shawn Routhier
fc06ee4f46 Documentation fixes
[ISC-Bugs #17959] add text to AIX section describing how to have it send
responses to the all-ones address.
[ISC-Bugs #19615] update the includes in dhcpctl/dhcpctl.3 to be more correct
[ISC-Bugs #20676] update dhcpd.conf.5 to include the RFC numbers for DDNS
2011-04-25 23:43:16 +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
Shawn Routhier
4a5bfeacbe Add the option "--no-pid" to the client, relay and server code,
to disable writing a pid file.  Add the option "-pf pidfile"
to the relay to allow the user to supply the pidfile name at
runtime.  Add the "with-relay6-pid-file" option to configure
to allow the user to supply the pidfile name for the relay
in v6 mode at configure time.
[ISC-Bugs #23351] [ISC-Bugs #17541]
2011-04-15 21:58:12 +00:00
Tomek Mrugalski
c7aa4dd4a4 DHCPv6 server now responds properly if client asks for a prefix that
is already assigned to a different client. [ISC-Bugs #23948]
2011-04-13 09:53:26 +00:00
Shawn Routhier
919f14071d Handle some DDNS corner cases better. Maintain the DDNS transaction
information when updating a lease and cancel any existing transactions
when removing the ddns information.
[ISC-Bugs #23103]
2011-02-18 18:18:20 +00:00
Mark Andrews
4176a7009d cast to int for * in $.*s 2011-02-16 03:22:56 +00:00
Shawn Routhier
c8b189f174 When processing a request in the DHCPv6 server code that specifies
an address that is tagged as abondened (meaning we received a
decline request for it previously) don't attempt to move it from
the inactive to active pool as doing so can result in the server
crshing on an assert failure.  Also retag the lease as active
and reset it's timeout value.
[ISC-Bugs #21921]
2011-01-20 19:13:41 +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
76f4993d6e automake regeneration 2010-11-03 23:25:20 +00:00
Shawn Routhier
4dc5a6b1fa Handle a relay forward message with an unspecified address in the
link address field.  Previously such a message would cause the
server to crash.  [ISC-Bugs #21992]
2010-10-22 19:50:24 +00:00
Shawn Routhier
ad59838e33 Update the code to parse dhcpv6 lease files to accept a semi-colon at
the end of the max-life and preferred-life clauses.  In order to be
backwards compatible with older lease files not finding a semi-colon
is also accepted.  [ISC-Bugs #22303].
2010-10-13 22:28:18 +00:00
Shawn Routhier
419ed83cb9 automake regeneration 2010-09-14 22:22:19 +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
David Hankins
8bd445a1c1 - Two identical log messages for commit_leases() have been disambiguated.
[ISC-Bugs #18915]
2010-09-10 22:04:19 +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
Shawn Routhier
d6645f56ff Put the options in the dhclient and dhcpd man pages into the standard form.
[ISC-Bugs #20264] and parts of [ISC-Bugs #17744] for dhclient.8 changes
2010-07-14 20:01:14 +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