currentHost DHCPv4 (Kea 1.8.0)Subnet SelectionSet subnet to the selected subnetHas client a lease for its client id?Iterate on allowed subnets for client idSet subnet to the by client id leaseHas client a matching lease?Iterate on allowed subnets for hardware addressSet subnet to the matching leaseHas an address reservation?Set subnet to address reservation subnetIs the address in an allowed pool?Iterate on allowed subnets with poolSet subnet to address pool subnetAllocate a new leaseIterate on allowed subnetsSet subnet to allocated lease subnetGet subnet host reservation modeIs subnet host reservation mode global?Get global host reservationGet subnet host reservationReturn current host reservationno client id optionmatch-client-id is false or no leasefound a leasenot found by client id, try by hardware addressno hardware addressno lease or client id mismatchfound a leasenot foundyesno or not check in the taken branchpool check is not in all branchesaddress not in an allowed pooladdress in an allowed poolno allowed poolstart from preferred (last used) subnetallocation is not in all branchesno free addressfound a free addressyesnoreturn global host reservationreturn subnet host reservationOnly the initial lookup is always performed: other occasions to change the subnet so the current host are only in some branches