Browse Source

[3694] Swap in-pool checks with the host reservation checks in alloc engine.

Marcin Siodelski 10 years ago
parent
commit
f86883c8ea
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/dhcpsrv/alloc_engine.cc

+ 2 - 2
src/lib/dhcpsrv/alloc_engine.cc

@@ -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);
     }