diff --git a/RELNOTES b/RELNOTES index a82615a0..a31ead98 100644 --- a/RELNOTES +++ b/RELNOTES @@ -183,11 +183,14 @@ dhcp-users@lists.isc.org. Correct parsing of DUID from config file, previously the LL type was put in the wrong place in the DUID string. [ISC-Bugs #20962] + Add code to parse "do-forward-updates" as well as "do-forward-update" Thanks to Jiri Popelka at Red Hat. [ISC-Bugs #31328] + Remove log_priority as it isn't currently used. [ISC-Bugs #33397] + Increase the size of the buffer used for reading interface information. [ISC-Bugs #34858] @@ -1126,6 +1129,14 @@ dhcp-users@lists.isc.org. Thanks to Tim Dean for reporting this issue. [ISC-bugs #31573] +- Corrected an issue where the server would return a client's previously + released prefix lease even when the client provides a prefix length + hint that does not match the prior lease. Now the server will only + return the previous lease if it exactly matches the hint. If not + it will attempt to allocate a new prefix based on the hint and the + prefix-length-mode. + [ISC-bugs #45780] + Changes since 4.2.0 (new features) - If a client renews before 'dhcp-cache-threshold' percent of its lease diff --git a/server/dhcpv6.c b/server/dhcpv6.c index 2665d0e3..cc4b17d6 100644 --- a/server/dhcpv6.c +++ b/server/dhcpv6.c @@ -4664,6 +4664,19 @@ find_client_prefix(struct reply_state *reply) { best_prefix = prefix_compare(reply, prefix, best_prefix); } + + /* + * If we have prefix length hint and we're not igoring them, + * then toss the best match if it doesn't match the hint, + * unless this is in response to a rebind. In the latter + * case we're supposed to return it with zero lifetimes. + * (See rt45780) */ + if (best_prefix && (reply->preflen > 0) + && (prefix_length_mode != PLM_IGNORE) + && (reply->preflen != best_prefix->plen) + && (reply->packet->dhcpv6_msg_type != DHCPV6_REBIND)) { + best_prefix = NULL; + } } /* Try to pick a new prefix if we didn't find one, or if we found an