From 6f76de588439036a7a7a96c5f22d3417fc7dbd9e Mon Sep 17 00:00:00 2001 From: Shane Kerr Date: Sun, 2 Dec 2007 23:19:02 +0000 Subject: [PATCH] Properly ignore address hints if we cannot supply them. See RT ticket #17303 for details. --- RELNOTES | 5 +++++ server/dhcpv6.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RELNOTES b/RELNOTES index 59de2fa5..919f517b 100644 --- a/RELNOTES +++ b/RELNOTES @@ -55,6 +55,11 @@ suggested fixes to . Changes since 4.0.0b3 +- When addresses were passed as hints to the server in an IA, they were + incorrectly handled, sometimes being treated as an error. Now the + server will treat these as hints and ignore them if it cannot supply + a requested address. + - If the client had multiple addresses, and one expired (was not renewed by the server), the client would continue to attempt to renew the same old address over and over. Now, the client will omit any expired diff --git a/server/dhcpv6.c b/server/dhcpv6.c index 53df84a5..ca4a4954 100644 --- a/server/dhcpv6.c +++ b/server/dhcpv6.c @@ -1261,7 +1261,7 @@ reply_process_ia(struct reply_state *reply, struct option_cache *ia) { if (status == ISC_R_CANCELED) break; - if (status != ISC_R_SUCCESS) + if ((status != ISC_R_SUCCESS) && (status != ISC_R_ADDRINUSE)) goto cleanup; } @@ -1627,7 +1627,8 @@ reply_process_addr(struct reply_state *reply, struct option_cache *addr) { status = reply_process_try_addr(reply, &tmp_addr); /* Either error out or skip this address. */ - if (status != ISC_R_SUCCESS) + if ((status != ISC_R_SUCCESS) && + (status != ISC_R_ADDRINUSE)) goto cleanup; if (reply->lease == NULL) {