[Kea-users] DHCP reserved leases (infinite lease)

Marcin Siodelski marcin at isc.org
Mon Jun 2 11:57:08 UTC 2014


Igor,

Kea currently doesn't have any library to be used to open connections to
MySQL. The MySQL lease database backend
(src/lib/dhcpsrv/mysql_lease_mgr.cc) uses API provided by the MySQL dev
library directly. So, most likely you will need to open your own
connection to the database from the hook library.

In order to open connection to the MySQL database being used by the
lease database backend, you will need credentials. These credentials are
stored in the Kea configuration. But, hooks don't have a way to access
the configuration parameters at this point, so you'll probably have to
hard code credentials in the library or provide some text file with a
configuration that the hook can read when being loaded.

Also, please remember that the MySQL code we support currently (MySQL
lease database backend) compiles only if the --with-dhcp-mysql flag is
specified at configure time. Without it, the lease database backend will
not compile. I am not sure if it has any implications for your hook
library, but I just thought I should mention it.

Marcin

On 02/06/14 12:50, Igor Smitran wrote:
> Hi Marcin,
> 
> I have another table that i have some additional data about clients,
> modems etc.
> Hook will do some additional tasks based on that data.
> So, i will use kea database connection that is already established.
> 
> Igor
> 
> On 06/02/2014 12:30 PM, Marcin Siodelski wrote:
>> Hi Igor,
>>
>> What is scenario of using/accessing the MySQL database from the Hook? Do
>> you want to access the lease database or you have some other database of
>> customers where you are storing their configuration?
>>
>> Marcin
> 
> _______________________________________________
> 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