requestLease4 algorithm (Kea 1.8.0)get lease for the clientreserved addressyesnorequested addressnoyesrequested address = reserved addressreturn no leaseyesrequested address is reserved for another clientnoreturn no leaseyesactive and owned by another clientnoyeslease for requested addressnoreturn no leaseyesactivenoyeslease for requested addressnoreturn no leasenorequested address in allowed poolyesnorequested address == reserved addressyesrequested addressyesnoreturn no leaseyesrequested address is reserved for another clientnoreturn no leaseyesactive and owned by another clientnoyeslease for requested addressnoreturn no leasenorequested address in allowed poolyespick candidate addresslease for candidatenoyescreate and return new leasereclaim expired leaseupdate lease informationcallout lease4_selectcallout returnSKIPCONTINUEreturn no leaseupdate leasereturn reused leaseyesexpirednonocandidate is used by another threadyesnocandidate is reserved for another clientyesiterate over pools and subnetsmaximum attemptsreturn no leasenoclient lease and lease address in allowed poolyesupdate lease informationreclaim expired leaseyesold lease expirednocallout lease4_renewcallout returnSKIPCONTINUEreturn old client leaseupdate leasereturn renewed client leaseyeshas reserved address or client lease address in allowed poolnoyesno requested address or requested address == client lease addressnoyesclient leasenoget lease for requested addressrequested leaseyesnoexpirednoyesreturn no leasereclaim expired leaseupdate lease informationcallout lease4_selectcallout returnSKIPCONTINUEreturn no leaseupdate leasereturn reused leasecreate and return new lease