Send kea-dev mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/kea-dev
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of kea-dev digest..."
Today's Topics:
1. Re: [PATCH] [master] Fix: Release the reference of hook
library (Tomek Mrugalski)
----------------------------------------------------------------------
Message: 1
Date: Thu, 8 Mar 2018 08:51:35 +0100
From: Tomek Mrugalski <[email protected]>
To: [email protected]
Subject: Re: [kea-dev] [PATCH] [master] Fix: Release the reference of
hook library
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Hi,
I was going through old mails and it seems nobody responded this.
Thanks for reporting the issue and for sending the patch. I've created
#5564 to deal with this problem (http://kea.isc.org/ticket/5564).
Tomek
On 11/12/2017 03:50, Yahu Gao wrote:
> Problem: Kea unload the hook library when handing the first incoming
> message after reload by using command "keactrl reload -c configfile".
> This cause hook library function cannot be called and message handling
> stop.
>
> Reason: Kea hold the hook library reference by using shared_ptr in
> several place. Hook library is not correctly released when reload the
> kea, But released when handing the first incoming message.
>
> Fix: Release the reference of hook library in correct place when reload
> the kea. After reload the hook library, shared_ptr hold the correct
> reference to it.
>
> Signed-off-by: Anders Wallin <[email protected]>
> Signed-off-by: Yahu Gao <[email protected]>
> ---
> src/lib/hooks/hooks_manager.cc | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/lib/hooks/hooks_manager.cc b/src/lib/hooks/hooks_manager.cc
> index b4702ba..73ee637 100644
> --- a/src/lib/hooks/hooks_manager.cc
> +++ b/src/lib/hooks/hooks_manager.cc
> @@ -12,6 +12,9 @@
> #include <hooks/hooks_manager.h>
> #include <hooks/server_hooks.h>
>
> +#include <dhcp/pkt6.h>
> +#include <dhcpsrv/callout_handle_store.h>
> +
> #include <boost/shared_ptr.hpp>
>
> #include <string>
> @@ -121,6 +124,10 @@ HooksManager::loadLibraries(const HookLibsCollection&
> libraries) {
>
> void
> HooksManager::unloadLibrariesInternal() {
> + // Clean callout_handle_store for static CalloutHandlePtr.
> + // fix the Kea reload cause the hook library unload.
> + isc::dhcp::Pkt6Ptr pkt6ptr_empty;
> + isc::dhcp::getCalloutHandle(pkt6ptr_empty);
> // The order of deletion does not matter here, as each library manager
> // holds its own pointer to the callout manager. However, we may as
> // well delete the library managers first: if there are no other
> references
>
------------------------------
Subject: Digest Footer
_______________________________________________
kea-dev mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-dev
------------------------------
End of kea-dev Digest, Vol 48, Issue 1
**************************************