]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- A bug was fixed that caused the server not to answer some valid Solicit
authorDavid Hankins <dhankins@isc.org>
Wed, 7 Jan 2009 20:12:03 +0000 (20:12 +0000)
committerDavid Hankins <dhankins@isc.org>
Wed, 7 Jan 2009 20:12:03 +0000 (20:12 +0000)
  and Request packets, if the dynamic range covering any requested addresses
  had been deleted from configuration.  [ISC-Bugs #19134]

RELNOTES
server/dhcpv6.c

index 039b6a3d75b55de065965d8b7bf5efc341e0bde2..ee4034fac102c01df5db802a52c053d917b64f94 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -52,6 +52,10 @@ work on other platforms. Please report any problems and suggested fixes to
 
 - Suppress spurious warnings from configure about --datarootdir
 
+- 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.
+
                        Changes since 4.1.0b1
 
 - A missing "else" in dhcrelay.c could have caused an interface not to
index 054e5c1dcefcbbe6a1f8fd295610298624924040..b5472b0f13ae9e857485b996fb1b1c772825a972 100644 (file)
@@ -955,8 +955,12 @@ try_client_v6_address(struct iasubopt **addr,
                return ISC_R_FAILURE;
        }
 
+       /*
+        * The address is not covered by this (or possibly any) dynamic
+        * range.
+        */
        if (!ipv6_in_pool(&tmp_addr, pool)) {
-               return ISC_R_FAILURE;
+               return ISC_R_ADDRNOTAVAIL;
        }
 
        if (lease6_exists(pool, &tmp_addr)) {
@@ -1643,7 +1647,9 @@ reply_process_ia_na(struct reply_state *reply, struct option_cache *ia) {
                if (status == ISC_R_CANCELED)
                        break;
 
-               if ((status != ISC_R_SUCCESS) && (status != ISC_R_ADDRINUSE))
+               if ((status != ISC_R_SUCCESS) &&
+                   (status != ISC_R_ADDRINUSE) &&
+                   (status != ISC_R_ADDRNOTAVAIL))
                        goto cleanup;
        }
 
@@ -2032,11 +2038,21 @@ reply_process_addr(struct reply_state *reply, struct option_cache *addr) {
                    (reply->packet->dhcpv6_msg_type == DHCPV6_REBIND)) {
                        status = reply_process_try_addr(reply, &tmp_addr);
 
-                       /* Either error out or skip this address. */
+                       /*
+                        * If the address is in use, or isn't in any dynamic
+                        * range, continue as normal.  If any other error was
+                        * found, error out.
+                        */
                        if ((status != ISC_R_SUCCESS) && 
-                           (status != ISC_R_ADDRINUSE)) 
+                           (status != ISC_R_ADDRINUSE) &&
+                           (status != ISC_R_ADDRNOTAVAIL))
                                goto cleanup;
 
+                       /*
+                        * If we didn't honor this lease, for solicit and
+                        * request we simply omit it from our answer.  For
+                        * rebind, we send it with zeroed lifetimes.
+                        */
                        if (reply->lease == NULL) {
                                if (reply->packet->dhcpv6_msg_type ==
                                                        DHCPV6_REBIND) {