2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 09:57:20 +00:00

- 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]
This commit is contained in:
David Hankins 2009-01-07 20:12:03 +00:00
parent 4260dd9fee
commit 1aa0fe5e3e
2 changed files with 24 additions and 4 deletions

View File

@ -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

View 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) {