Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
Kea
Commits
378a6d52
Commit
378a6d52
authored
Apr 12, 2018
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[5458a] Reported dhcp6 srv configured patch from Radius
parent
5bb69e0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc
+36
-0
No files found.
src/bin/dhcp6/ctrl_dhcp6_srv.cc
View file @
378a6d52
...
...
@@ -32,6 +32,23 @@ using namespace std;
namespace
{
/// Structure that holds registered hook indexes.
struct
CtrlDhcp6Hooks
{
int
hooks_index_dhcp6_srv_configured_
;
/// Constructor that registers hook points for the DHCPv6 server.
CtrlDhcp6Hooks
()
{
hooks_index_dhcp6_srv_configured_
=
HooksManager
::
registerHook
(
"dhcp6_srv_configured"
);
}
};
// Declare a Hooks object. As this is outside any function or method, it
// will be instantiated (and the constructor run) when the module is loaded.
// As a result, the hook indexes will be defined before any method in this
// module is called.
CtrlDhcp6Hooks
Hooks
;
// Name of the file holding server identifier.
static
const
char
*
SERVER_DUID_FILE
=
"kea-dhcp6-serverid"
;
...
...
@@ -663,6 +680,25 @@ ControlledDhcpv6Srv::processConfig(isc::data::ConstElementPtr config) {
// exception free.
LibDHCP
::
commitRuntimeOptionDefs
();
// This hook point notifies hooks libraries that the configuration of the
// DHCPv6 server has completed. It provides the hook library with the pointer
// to the common IO service object, new server configuration in the JSON
// format and with the pointer to the configuration storage where the
// parsed configuration is stored.
if
(
HooksManager
::
calloutsPresent
(
Hooks
.
hooks_index_dhcp6_srv_configured_
))
{
CalloutHandlePtr
callout_handle
=
HooksManager
::
createCalloutHandle
();
callout_handle
->
setArgument
(
"io_context"
,
srv
->
getIOService
());
callout_handle
->
setArgument
(
"json_config"
,
config
);
callout_handle
->
setArgument
(
"server_config"
,
CfgMgr
::
instance
().
getStagingCfg
());
HooksManager
::
callCallouts
(
Hooks
.
hooks_index_dhcp6_srv_configured_
,
*
callout_handle
);
// Ignore status code as none of them would have an effect on further
// operation.
}
return
(
answer
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment