Opened 2 years ago

Last modified 2 years ago

#5523 new enhancement

Add support for interdependent DSOs

Reported by: fdupont Owned by:
Priority: low Milestone: Kea1.x
Component: hooks Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


The issue is dlopen() is called with RTLD_LOCAL when in some cases it should be with RTLD_GLOBAL which allows DSOs to refer to symbols of already loaded DSOs.
I suggest a new flag with a global effect.
Note cases where it is required are still rare but we don't know if this won't become a blocking point as HA for instance should make heavy use of hooks.


Change History (2)

comment:1 Changed 2 years ago by fdupont

I don't believe there is some code to right, at least not in Kea core.
My idea is to use the fact that dlopen() can be called multiple times for the same DSO (it uses a reference count) and it is enough to call it once (the first time to be sure) with RTLD_GLOBAL to get the DSO symbols exported.
So a very simple hook/DSO which takes a list of DSOs to load and calls dlopen() on load entry point (and dlclose() on unload) allows to overwrite flags.
If time permits I'll add something about this and a proof of concept to my fdxhook branch.

comment:2 Changed 2 years ago by tomek

  • Milestone changed from Kea-proposed to Kea1.x

As discussed on 2018-02-22 call, moving to 1.x.

Note: See TracTickets for help on using tickets.