[Kea-users] Flex options hook library

Christoph Pleger Christoph.Pleger at cs.tu-dortmund.de
Wed Jun 4 08:16:04 UTC 2025


Hello,

In https://kea.readthedocs.io/en/latest/arm/hooks.html , the following example is given for libdhcp_flex_option.so:


{
   "Dhcp4": {
       "hooks-libraries": [
           {
               "library": "/usr/local/lib/libdhcp_flex_option.so",
               "parameters": {
                   "options": [
                       {
                           "code": 67,
                           "add": "ifelse(option[host-
name].exists,concat(option[host-name].text,'.boot'),'')"
                       }
                   ]
               }
           }
       ]
   }
}


I have tried almost exactly that, only adjusted the library location,
and the result was that this only works when the host name is already
part of the client request (does this even make sense, as option 67 is
the boot-file-name, probably used for PXE boot and BIOS/UEFI PXE does
not know the host name?). Is it possible to make (almost) the above 
work when host-name is part of the server answer?

Regards
  Christoph  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250604/67ccb9a9/attachment.sig>


More information about the Kea-users mailing list