From: Francis Dupont Date: Sat, 1 Aug 2020 11:37:30 +0000 (+0200) Subject: [#1329] Added allocating subnet change X-Git-Tag: Kea-1.8.0~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4deea1b9451bac35829433fa333c7b838451f40c;p=thirdparty%2Fkea.git [#1329] Added allocating subnet change --- diff --git a/doc/devel/images/currentHost4.png b/doc/devel/images/currentHost4.png index 1e6e379f77..577e61b3d8 100644 Binary files a/doc/devel/images/currentHost4.png and b/doc/devel/images/currentHost4.png differ diff --git a/doc/devel/images/currentHost4.svg b/doc/devel/images/currentHost4.svg index f41db828d7..ec300489ec 100644 --- a/doc/devel/images/currentHost4.svg +++ b/doc/devel/images/currentHost4.svg @@ -1,22 +1,25 @@ -currentHost DHCPv4 (Kea 1.7.11)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 subnetGet subnet host reservation modeIs subnet host reservation mode global?Get global host reservationGet subnet host reservationReturn current host reservationSubnet 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 optionnot foundyesnono or not check in the taken branchpool check is not in all branchespool check is not in all branchesaddress not in an allowed pooladdress in an allowed poolno allowed poolyesnoreturn global host reservationreturn subnet host reservationaddress 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 found_hwaddr : found a lease found_hwaddr ----> hasAddressReservation hwaddr_iterate --> hasAddressReservation : not found hasAddressReservation --> setAddressReservation : yes -hasAddressReservation --> pool : no +hasAddressReservation --> pool : no or not check in the taken branch setAddressReservation --> pool pool --> pool_iterate -pool ---> getHRmode : pool check is not in all branches +pool ---> allocate : pool check is not in all branches pool_iterate -> pool_iterate : address not in an allowed pool pool_iterate --> inAllowedPool : address in an allowed pool -pool_iterate ---> getHRmode : no allowed pool -inAllowedPool --> getHRmode +pool_iterate ---> allocate : no allowed pool +inAllowedPool --> allocate +allocate --> allocate_iterate : start from preferred (last used) subnet +allocate ---> getHRmode : allocation is not in all branches +allocate_iterate -> allocate_iterate : no free address +allocate_iterate --> allocated : found a free address +allocated --> getHRmode getHRmode --> checkHRmode checkHRmode --> global : yes checkHRmode --> bySubnet : no global --> return : return global host reservation bySubnet --> return : return subnet host reservation +footer Only the initial lookup is always performed: other occasions to change the subnet so the current host are only in some branches + @enduml \ No newline at end of file