[Kea-users] is there any way to force, kea-dhcp4-server/kea-dhcp-ddns-server to use option 12 instead of, option 81?

Darren Ankney darren.ankney at gmail.com
Mon Sep 11 10:18:47 UTC 2023


Hi Marc,

flex-option actions are performed last just before packet sending:
"These actions are carried out during the final stages of constructing
a query response packet, just before it is sent to the client."
https://kea.readthedocs.io/en/kea-2.4.0/arm/hooks.html#libdhcp-flex-option-so-flexible-option-actions-for-option-value-settings
It is meant to allow arbitrary manipulation of options and values sent
TO the client in a response.

So, DDNS updates have either already been sent or, at least, the
values to be used have, most likely, already been obtained.  In any
case, the values wouldn't be re-parsed.

Option 15 is meant to convey search domains TO the client and so
should not have any content FROM the client:
https://www.rfc-editor.org/rfc/rfc2132.html#section-3.17 and so would
not be suitable for use in DDNS.

Option 81 seems to contain the FQDN that will be used by Kea to update
DDNS.  Is the problem here that the client is not attaching option 81?

There are various parameters that can be used to control ddns
behavior:  https://kea.readthedocs.io/en/kea-2.4.0/arm/dhcp4-srv.html#ddns-for-dhcpv4
perhaps you can synthesize some values to use for clients that do not
send option 81?

Thank you,

Darren Ankney

On Fri, Sep 8, 2023 at 5:27 PM Marc Richman
<Marc.Richman at berkshiregrey.com> wrote:
>
> I got somewhere but not where I wanted to be....
>
> I managed to get option 81 to the correct value using the flex_option hook it is a bit ugly but wireshark confirms the values are correct
>
>
> BUT it is still handing off the original value to DDNS!  Does anybody have ideas as to why that would happen? (or how to fix it)
>
>
> (FWIW: I tried using option[15] instead of the string but it wasnt defined?!? even though it was being sent in the packet)
>
>
> {"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_flex_option.so",
>
>   "parameters": {
>     "options" : [
>       { "code"      : 81,
>      "supersede" : "0x03 + 0x00 + 0x00 + option[12].hex + '.bos.berkshiregrey.com'"
>       }    ] } }
>
>
>
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users


More information about the Kea-users mailing list