Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sebastian Schrader
Kea
Commits
78c7a4f5
Commit
78c7a4f5
authored
May 07, 2018
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[5605a] Minor changes after review:
- comments added
parent
cfc7596f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/dhcp4_srv.cc
+3
-1
src/bin/dhcp4/dhcp4_srv.h
src/bin/dhcp4/dhcp4_srv.h
+10
-0
No files found.
src/bin/dhcp4/dhcp4_srv.cc
View file @
78c7a4f5
...
...
@@ -547,6 +547,7 @@ Dhcpv4Srv::selectSubnet(const Pkt4Ptr& query, bool& drop,
subnet
=
cfgmgr
.
getCurrentCfg
()
->
getCfgSubnets4
()
->
selectSubnet
(
selector
);
// Let's execute all callouts registered for subnet4_select
// (skip callouts if the selectSubnet was called to do sanity checks only)
if
(
!
sanity_only
&&
HooksManager
::
calloutsPresent
(
Hooks
.
hook_index_subnet4_select_
))
{
CalloutHandlePtr
callout_handle
=
getCalloutHandle
(
query
);
...
...
@@ -663,7 +664,8 @@ Dhcpv4Srv::selectSubnet4o6(const Pkt4Ptr& query, bool& drop,
CfgMgr
&
cfgmgr
=
CfgMgr
::
instance
();
subnet
=
cfgmgr
.
getCurrentCfg
()
->
getCfgSubnets4
()
->
selectSubnet4o6
(
selector
);
// Let's execute all callouts registered for subnet4_select
// Let's execute all callouts registered for subnet4_select.
// (skip callouts if the selectSubnet was called to do sanity checks only)
if
(
!
sanity_only
&&
HooksManager
::
calloutsPresent
(
Hooks
.
hook_index_subnet4_select_
))
{
CalloutHandlePtr
callout_handle
=
getCalloutHandle
(
query
);
...
...
src/bin/dhcp4/dhcp4_srv.h
View file @
78c7a4f5
...
...
@@ -790,6 +790,11 @@ protected:
/// @brief Selects a subnet for a given client's packet.
///
/// If selectSubnet is called to simply do sanity checks (check if a
/// subnet would be selected), then there is no need to call hooks,
/// as this will happen later (when selectSubnet is called again).
/// In such case the sanity_only should be set to true.
///
/// @param query client's message
/// @param drop if it is true the packet will be dropped
/// @param sanity_only if it is true the callout won't be called
...
...
@@ -800,6 +805,11 @@ protected:
/// @brief Selects a subnet for a given client's DHCP4o6 packet.
///
/// If selectSubnet is called to simply do sanity checks (check if a
/// subnet would be selected), then there is no need to call hooks,
/// as this will happen later (when selectSubnet is called again).
/// In such case the sanity_only should be set to true.
///
/// @param query client's message
/// @param drop if it is true the packet will be dropped
/// @param sanity_only if it is true the callout won't be called
...
...
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