[Kea-users] Hook failed to validate?

DDFR | Ronald Blaas ronald.blaas at ddfr.nl
Mon Jun 26 07:55:43 UTC 2023


hi all

I am trying to understand why my hook will not work.

I am reading the tutorial that is given on the development pages but still no luck.

So now I am trying to make a real small hook (which does not do anything)

Here is my test file

#include <config.h>
#include <hooks/hooks.h>

extern "C" {

/// @brief returns Kea hooks version.
int version() {
    return (KEA_HOOKS_VERSION);
}

}

I compiled this using:
g++ -I /usr/include/kea -L /usr/lib -fpic -shared -lkea-dhcpsrv -lkea-dhcp++ -lkea-hooks -lkea-log -lkea-util -lkea-exceptions -o circuit_id.so version.cc

after loading this hook kea-dhcp does not start.
error:
 kea-dhcp4[22322]: 2023-06-26 07:50:35.752 ERROR [kea-dhcp4.dhcp4/22322.140007709609600] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/etc/kea/kea-dhcp4.conf': hooks libraries failed to validate - library or libraries in error are: /usr/lib/x86_64-linux-gnu/kea/hooks/circuit_id.so (/etc/kea/kea-dhcp4.conf:25:5)

My kea-dhcp4.conf:
 "hooks-libraries": [
        {
            "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/circuit_id.so"
        }
    ],


Any insights are appreciated.

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230626/7acc3405/attachment.htm>


More information about the Kea-users mailing list