]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- A bug was fixed that could cause the DHCPv6 server to advertise/assign a
authorDavid Hankins <dhankins@isc.org>
Tue, 25 May 2010 17:41:15 +0000 (17:41 +0000)
committerDavid Hankins <dhankins@isc.org>
Tue, 25 May 2010 17:41:15 +0000 (17:41 +0000)
  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]

RELNOTES
server/dhcpv6.c

index 9abf41f111e63ce5ea12c4d0ef69bf203ee6b2c6..4e4054c1b901e7445b7743d10077219dd6c7f98c 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -39,6 +39,7 @@ The system has only been tested on Linux, FreeBSD, and Solaris, and may not
 work on other platforms. Please report any problems and suggested fixes to
 <dhcp-users@isc.org>.
 
+
                        Changes since 4.2.0b1
 
 - Prohibit including lease time information in a response to a DHCP INFORM.
@@ -56,6 +57,12 @@ work on other platforms. Please report any problems and suggested fixes to
   also didn't do much as we exited afterwards anyway.   Now we simply log
   the error and exit. [ISC-Bugs #21093]
 
+- 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]
+
                        Changes since 4.2.0a2
 
 - Update the fsync code to work with the changes to the DDNS code.  It now
index de812fa7f93662d84cc99674d8297363a67a3b40..24118052528a76db783e3130500ac1ec04f9829b 100644 (file)
@@ -2760,9 +2760,18 @@ find_client_address(struct reply_state *reply) {
 
        if (reply->old_ia != NULL)  {
                for (i = 0 ; i < reply->old_ia->num_iasubopt ; i++) {
+                       struct shared_network *candidate_shared;
+
                        lease = reply->old_ia->iasubopt[i];
+                       candidate_shared = lease->ipv6_pool->shared_network;
 
-                       best_lease = lease_compare(lease, best_lease);
+                       /*
+                        * Look for the best lease on the client's shared
+                        * network.
+                        */
+                       if (candidate_shared == reply->shared) {
+                               best_lease = lease_compare(lease, best_lease);
+                       }
                }
        }
 
@@ -3746,10 +3755,21 @@ find_client_prefix(struct reply_state *reply) {
 
        if (reply->old_ia != NULL)  {
                for (i = 0 ; i < reply->old_ia->num_iasubopt ; i++) {
+                       struct shared_network *candidate_shared;
+
                        prefix = reply->old_ia->iasubopt[i];
+                       candidate_shared = prefix->ipv6_pool->shared_network;
 
-                       best_prefix = prefix_compare(reply, prefix,
-                                                    best_prefix);
+                       /*
+                        * Consider this prefix if it is in a global pool or
+                        * if it is scoped in a pool under the client's shared
+                        * network.
+                        */
+                       if (candidate_shared == NULL ||
+                           candidate_shared == reply->shared) {
+                               best_prefix = prefix_compare(reply, prefix,
+                                                            best_prefix);
+                       }
                }
        }