After some thinking, I believe the issue is that kea is "re-using" the packet-data for each reply, and not creating a copy of the initial packet-info read from the config. That way - when I rewrite an option that is not set by other internal functions in Kea - such as the Option43-values - it is tracked to all new DHCP-replies.

I have managed to work around the problem by caching and resetting the initial values inside the hook (by abusing buffer4_send). It's ugly, but it works. I would really prefer if Kea started each "response4" with a new packet - with all options directly from the config-file though.

I have now also updated the github-repo with proper logging, makefiles and some other fixes.

I would still love some proper review of the code, as this is really not my field, but at least it compiles and seems to do what I need it to do.



Rgds.

Ola Thoresen

_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to