Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 579
    • Issues 579
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 59
    • Merge requests 59
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • KeaKea
  • Issues
  • #651
Closed
Open
Issue created Jun 04, 2019 by Cathy Almond@cathyaDeveloper

DHCPv6 lease updates failing for some clients (postgresql)

As reported to Support in ticket RT 14761

Describe the bug This is a possible bug inside the postgresql lease manager which makes ipv6 lease updates impossible for some clients.

The ipv6 ia_id is stored in a column called "iaid" in the "lease6" table. We noticed that sometimes there is a negative value inside this column, and this are exactly the hosts, for which ipv6 lease updates fail.

The dhcpv6 ia_id is a 32 bit unsigned integer, which is (for database compatibility) obviously casted to a 32 bit signed integer inside pgsql_lease_mgr.cc.

But when one of the functions

  • PgSqlLeaseMgr::getLeases6(Lease::Type lease_type, const DUID& duid, uint32_t iaid);
  • PgSqlLeaseMgr::getLeases6(Lease::Type lease_type, const DUID& duid, uint32_t iaid, SubnetID subnet_id); is called, inside the function the iaid is not being converted/casted to a signed int, which leads to a wrong database query. As a result the dhcp lease with the searched iaid is not found and a new ipv6 lease is created for this client with every dhcpv6 request.

As a (temporary) fix we created a simple patch for the pgsql_lease_mgr.cc, which is attached to this ticket. With this patch the dhcpv6 lease update works as expected.

Environment: We are using kea 1.4.0-P1 with postgresql as database backend.

The bug seems to be present also in version 1.5.0/1.6.0, although we didn't test it.

Additional Information This looks like it might be similar to #181 ?

kea-1.4.0-P1-iaid-postgresql.patch

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking