2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-24 10:58:13 +00:00

77 Commits

Author SHA1 Message Date
Thomas Markwalder
a07d99bbef [master] Corrects medium impact issues reported by Coverity.
Merges in rt36933
2014-08-28 08:12:30 -04:00
Shawn Routhier
ad80055f72 [master] Add code to help clean up soft leases 2014-06-20 12:44:38 -07: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
388cba45bb [master] Remove the pre-errata code for handling no addresses available 2014-04-29 09:59:21 -07:00
Shawn Routhier
619304cd87 [master] Support using v6 relay options in server decicions. 2013-11-25 21:00:41 -08:00
Shawn Routhier
d9b5c150b7 [master]
Add log messages for when the addresses we assign.
2013-10-31 14:09:24 -07:00
Shawn Routhier
58cb5d861d [master]
Squashed commit of the following:

commit 9b0ea01f2afd1fb7ec1409166183a92731314ca7
Author: Shawn Routhier <sar@isc.org>
Date:   Tue Oct 22 12:02:41 2013 -0700

    -n [rt34924]
    Modify the on_commit code to use a reasonable scope as the reply->lease
    value may not be set, we should use the tmp->scope as we go through
    the iasubopts.
2013-10-30 13:34:22 -07:00
Mark Andrews
f1ef85cf1e address: dhcpv6.c: In function 'reply_process_ia_ta': dhcpv6.c:2784: warning: 'p' might be used uninitialized in this function 2013-08-28 12:25:33 +10: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
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
0b2ec8c99c [rt30281]
Modify the renew_lease6() code to properly handle a lease time
that is reduced rather than extended.
Fix the ATF tests for mdb6 and add a new test to check the
above condition.
2012-08-17 12:05:49 -07:00
Shawn Routhier
355db4b687 [rt30024]
Move the line that zeros the packet_oro variable to
be earlier so it is properly cleared if we exit early.
2012-07-12 22:55:19 -07:00
Shawn Routhier
3bedb11744 [rt30024] This is a commit message
Fix a pair of memory leaks.
2012-07-11 14:50:35 -07: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
cbbd2714d6 - Rotate the lease file when running in v6 mode.
[ISC-Bugs #24887]
2012-05-15 21:07:17 +00:00
Shawn Routhier
d19fa5a1b5 Fix the NA and PD allocation code to handle the case where a client
provides a preference and the server doesn't have any addresses or
prefixes available.  Previoulsy the server ignored the request with
this patch it replies with a NoAddrsAvail or NoPrefixAvai respone.
By default the code performs according to the errata of August 2010
for RFC 3315 section 17.2.2, to enable the previous style see the
seciton on RFC3315_PRE_ERRATA_2010_08 in includes/site.h.  This option
may be removed in the future.
Thanks to Jiri Popelka at Red Hat for the patch.
[ISC-Bugs #22676]
2012-04-10 22:13:46 +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
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
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
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
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
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
David Hankins
0d8c3d6eed - A bug was fixed that could cause the DHCPv6 server to advertise/assign a
previously allocated (active) lease to a client that has changed subnets,
  despite being on different shared networks.  Dynamic prefixes specifically
  allocated in shared networks also now are not offered if the client has
  moved.  [ISC-Bugs #21152]
2010-05-25 17:40:28 +00:00
David Hankins
7c7515b9bd Fix misspelled comment (infomation->information). Note that I do not actually
understand the rest of the comment, and that may be worth repairing...
2010-04-14 19:08:55 +00:00
Shawn Routhier
a35285748d Clean up some compiler warnings 2010-02-02 00:44:06 +00:00
Shawn Routhier
a47d63362f Update copyright years 2009-11-24 02:06:57 +00:00
Mark Andrews
fed0952fbb chaddr was not being set on all paths leading to a compiler warning 2009-11-23 21:19:25 +00:00
David Hankins
c900c5b249 - The 'hardware [ethernet|etc] ...;' parameter in host records has been
extended to attempt to match DHCPv6 clients by the last octets of a
  DUID-LL or DUID-LLT provided by the client.  [ISC-Bugs #19599]
2009-11-19 23:57:41 +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
2267da8477 - Both host and subnet6 configuration groups are now included whether a
fixed-address6 (DHCPv6) is in use or not.  Host scoped configuration takes
  precedence.  This fixes two bugs, one where host scoped configuration
  would not be included from a non-fixed-address6 host record, and the equal
  and opposite bug where subnet6 scoped configuration would not be used when
  over-riding vlaues were not present in a matching fixed-address6 host
  configuration.  [ISC-Bugs #20069]
2009-09-30 20:59:59 +00:00
David Hankins
1aa0fe5e3e - A bug was fixed that caused the server not to answer some valid Solicit
and Request packets, if the dynamic range covering any requested addresses
  had been deleted from configuration.  [ISC-Bugs #19134]
2009-01-07 20:12:03 +00:00
Francis Dupont
783259b1cc Improve IA_TA server support (17586) 2008-10-22 11:41:58 +00:00
David Hankins
7d6180be3e - A bug in subnet6 parsing where options contained in subnet6 clauses would
not be applied to clients addressed within that network was repaired.

- When configuring a "subnet {}" or "subnet6 {}" without an explicit
  shared-network enclosing it, the DHCP software would synthesize a
  shared-network to contain the subnet.  However, all configuration
  parameters within the subnet more intuitively belong "to any client
  on that interface", or rather the synthesized shared-network.  So,
  when a shared-network is synthesized, it is used to contain the
  configuration present inside the subnet {} clause.  This means that
  the configuration will be valid for all clients on that network, not
  just those addressed out of the stated subnet.  If you intended the
  opposite, the workaround is to explicitly configure an empty
  shared-network.

- A bug was fixed where Information-Request processing was not sourcing
  configured option values.

- A warning was added since the DHCPv6 processing software does not yet
  support class statements.

  [ISC-Bugs #17638b]
2008-08-19 17:55:57 +00:00
Francis Dupont
1d17db44a7 rename iaaddr structure & co 2008-03-31 13:49:45 +00:00
David Hankins
9ac4206a63 - DHCPv6 vendor-class options (VSIO) are now only sent when they appear
on the DHCPv6 ORO.  This resolves a bug where VSIO options were placed
  in IA_NA encapsulated options fields.  [ISC-Bugs #17852]
2008-03-24 17:55:45 +00:00
Francis Dupont
1acab09f0b Improve DHCPv6 leasequery 2008-03-17 15:45:05 +00:00
Francis Dupont
9322442f8a Merged IA_XXrelated structures 2008-03-17 15:35:37 +00:00
Francis Dupont
bd72740e3c Prefix pools are attached to shared network scopes 2008-03-17 15:25:49 +00:00
David Hankins
b445a411d9 - Shared network selection should be done from the innermost relay
valid link-address field, rather than the outermost.  [ISC-Bugs #17764]
2008-03-07 17:49:31 +00:00
Francis Dupont
93c769cef9 fix dhcpv6_relay_forw inits 2008-03-07 16:19:46 +00:00
Francis Dupont
37ec58458c Basic and partial DHCPv6 leasequery support 2008-02-26 23:45:05 +00:00
Francis Dupont
5d89d60f14 Soft binding side-effects 2008-02-21 10:31:25 +00:00
Francis Dupont
2b964ac0c7 ERO(RFC 4994) server support 2008-02-20 23:12:34 +00:00
Francis Dupont
80c9fdb0e7 Add IA_TA and IA_PD support in server 2008-02-20 12:45:53 +00:00
Francis Dupont
892379eca3 Improve NoAddrsAvail & co 2008-02-16 12:15:05 +00:00
Francis Dupont
7e9f7a1bcf fix DUID-LTT epoch 2008-02-15 18:18:54 +00:00
Francis Dupont
a8ac02a436 Fixed DHCPv6 rapid commit support 2008-01-24 10:55:34 +00:00
Evan Hunt
dccb6edf66 Updated copyright strings for 4.1.0a1 release 2008-01-24 02:43:06 +00:00