[kea-dev] Hook "subnet4_select" called 5 times for one request

Tomek Mrugalski tomasz at isc.org
Tue Feb 10 15:14:43 UTC 2015


On 10.02.2015 14:55, Chaigneau, Nicolas wrote:
> Hello,
> 
> Whenever a Discover a Request is processed, I noticed that the hook "subnet4_select" is called 5 times.
> 
> More precisely, hooks are called in the following order:
> - pkt4_receive
> - subnet4_select
> - lease4_select
> - subnet4_select (4 times)
> - pkt4_send
> 
> I suppose this is not the expected behavior ?
We are aware of this inefficiency, just never got to address it. The
Dhcpv4Srv::selectSubnet method well predates the concept of hooks.
Fortunately, that's one of the optimisations that is easy to do.

I just created #3707 to address this inefficiency.

Tomek



More information about the kea-dev mailing list