[Kea-users] Kea hook lease6_select callback not getting called at times

Mayank Tiwari mike.tiwari at gmail.com
Sun Sep 29 12:39:20 UTC 2019


Thanks Francis for your response. I have also checked the code and found
the following code logic:
File: alloc_engine.cc
Function:
void
AllocEngine::allocateReservedLeases6(ClientContext6& ctx,
                                     Lease6Collection& existing_leases)

If there is existing lease for the client then the client lease time is
extended
Else we create a new entry of the lease for the client. It is during new
entry creation lease6_select callback gets called.

Usually in our testing we were doing reboot of the host causing the lease
release and then lease select. But it seems that there could be few
scenarios where the lease allocation can happen without the previous
release. Few scenarios which I can think of is hard reboot of the host or
plug out the cable of the host causing no lease release. Hence, I have
decided to move my logic from lease6_select callback to ptk6_send callback
as I have seen pkt6_send callback getting called consistently. Then I am
planning to extract the host IP address allocated to client from Option 3
suboption 5 from the response.

Thanks for your inputs.

Regards,
Mayank

On Fri, Sep 27, 2019 at 12:03 PM Francis Dupont <fdupont at isc.org> wrote:

> Explaination: the DHCP6_LEASE_ALLOC log message is from the server code,
> lease6_select callout point is in the allocation engine library.
> The server calls allocateLeases6 in the library, this method has at least
> 4 main cases so I am not very surprised that not all branches call
> the callout (it is called only by 2 internal methods).
> We'll revisit the definition of the callout point to see if it is a bug
> and if it is we'll fix it.
>
> Thanks
>
> Francis Dupont <fdupont at isc.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20190929/2fc2bd06/attachment.htm>


More information about the Kea-users mailing list