From: Marcin Siodelski Date: Thu, 5 Mar 2015 20:14:49 +0000 (+0100) Subject: [3694] Swap in-pool checks with the host reservation checks in alloc engine. X-Git-Tag: trac3713_base~1^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f86883c8ea01d534293b140ff02bfc2cd5648e0e;p=thirdparty%2Fkea.git [3694] Swap in-pool checks with the host reservation checks in alloc engine. --- diff --git a/src/lib/dhcpsrv/alloc_engine.cc b/src/lib/dhcpsrv/alloc_engine.cc index 193251e86c..781694aaa2 100644 --- a/src/lib/dhcpsrv/alloc_engine.cc +++ b/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); }