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

Mayank Tiwari mike.tiwari at gmail.com
Thu Sep 26 15:29:40 UTC 2019


Hi,

  In our software component I have the requirement to get the IP address
allocated to the host using kea dhcp server. In my original implementation
I was using lease6_select callback to get that information. However, while
testing figured out that lease6_select callback is not called at all times.

Working scenario log:
2019-09-26 02:58:32.003 INFO  [kea-dhcp6.event-handler/1] pkt6_receive
callback function called
2019-09-26 02:58:32.004 INFO  [kea-dhcp6.event-handler/1] subnet6_select
callback function called
2019-09-26 02:58:32.005 INFO  [kea-dhcp6.event-handler/1] lease6_select
callback function called
2019-09-26 02:58:32.009 INFO  [kea-dhcp6.leases/1] DHCP6_LEASE_ALLOC
duid=[00:03:00:01:00:20:a3:27:c4:7b], tid=0xd81ddb: lease for address
2001:xxx:yyyy:c1::2 and iaid=2737292411 has been allocated
2019-09-26 02:58:32.009 INFO  [kea-dhcp6.event-handler/1] pkt6_send
callback function called

Non working scenario:
2019-09-26 09:53:13.941 INFO  [kea-dhcp6.event-handler/1] pkt6_receive
callback function called
2019-09-26 09:53:13.946 INFO  [kea-dhcp6.event-handler/1] subnet6_select
callback function called
2019-09-26 09:53:13.946 INFO  [kea-dhcp6.leases/1] DHCP6_LEASE_ALLOC
duid=[00:03:00:01:f4:db:e6:b4:d3:ec], tid=0xca17c5: lease for address
2001:xxx:yyyy:c3::2 and iaid=1 has been allocated
2019-09-26 09:53:13.946 INFO  [kea-dhcp6.event-handler/1] pkt6_send
callback function called

  In either scenarios, pkt6_send is getting called. So I was planning to
move the implementation to pkt6_send. I have observed that the client IP is
available in the response structure under option 5. So was planning to
extract client IP information from there.

  However, in order to understand the issue in completeness. I wanted to
know under what scenarios lease6_select function does not get called. I
have referred
https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html . It
has other useful details but not the detail on the scenario when
lease6_select does not get called.

  Can you please give your inputs on it.

Thanks and Regards,
Mayank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20190926/24639177/attachment.htm>


More information about the Kea-users mailing list