From: Shane Kerr Date: Sun, 2 Dec 2007 23:19:02 +0000 (+0000) Subject: Properly ignore address hints if we cannot supply them. X-Git-Tag: v4_0_0rc1~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f76de588439036a7a7a96c5f22d3417fc7dbd9e;p=thirdparty%2Fdhcp.git Properly ignore address hints if we cannot supply them. See RT ticket #17303 for details. --- diff --git a/RELNOTES b/RELNOTES index 59de2fa5d..919f517bb 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 53df84a5c..ca4a49549 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) {