]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3694] Swap in-pool checks with the host reservation checks in alloc engine.
authorMarcin Siodelski <marcin@isc.org>
Thu, 5 Mar 2015 20:14:49 +0000 (21:14 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 5 Mar 2015 20:14:49 +0000 (21:14 +0100)
src/lib/dhcpsrv/alloc_engine.cc

index 193251e86c564ef8a60311dbf71013eabe3c9a99..781694aaa252a7fb9af525719d201245e602aa06 100644 (file)
@@ -1384,8 +1384,8 @@ AllocEngine::discoverLease4(AllocEngine::ClientContext4& ctx) {
     // reserved for another client, and must be in the range of the
     // dynamic pool.
     if (!new_lease && !ctx.requested_address_.isV4Zero() &&
-        !addressReserved(ctx.requested_address_, ctx) &&
-        ctx.subnet_->inPool(Lease::TYPE_V4, ctx.requested_address_)) {
+        ctx.subnet_->inPool(Lease::TYPE_V4, ctx.requested_address_) &&
+        !addressReserved(ctx.requested_address_, ctx)) {
 
         new_lease = allocateOrReuseLease4(ctx.requested_address_, ctx);
     }