Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Adam Osuchowski
Kea
Commits
a397cb9b
Commit
a397cb9b
authored
Mar 13, 2015
by
Marcin Siodelski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[3688] Reverted change for the optional run of hooks for selectSubnet.
parent
833f3485
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp4/dhcp4_srv.cc
+3
-3
src/bin/dhcp4/dhcp4_srv.h
src/bin/dhcp4/dhcp4_srv.h
+1
-11
No files found.
src/bin/dhcp4/dhcp4_srv.cc
View file @
a397cb9b
...
...
@@ -240,7 +240,7 @@ Dhcpv4Srv::shutdown() {
}
isc
::
dhcp
::
Subnet4Ptr
Dhcpv4Srv
::
selectSubnet
(
const
Pkt4Ptr
&
query
,
const
bool
run_hooks
)
const
{
Dhcpv4Srv
::
selectSubnet
(
const
Pkt4Ptr
&
query
)
const
{
Subnet4Ptr
subnet
;
...
...
@@ -256,7 +256,7 @@ Dhcpv4Srv::selectSubnet(const Pkt4Ptr& query, const bool run_hooks) const {
subnet
=
cfgmgr
.
getCurrentCfg
()
->
getCfgSubnets4
()
->
selectSubnet
(
selector
);
// Let's execute all callouts registered for subnet4_select
if
(
run_hooks
&&
HooksManager
::
calloutsPresent
(
hook_index_subnet4_select_
))
{
if
(
HooksManager
::
calloutsPresent
(
hook_index_subnet4_select_
))
{
CalloutHandlePtr
callout_handle
=
getCalloutHandle
(
query
);
// We're reusing callout_handle from previous calls
...
...
@@ -1805,7 +1805,7 @@ Dhcpv4Srv::acceptDirectRequest(const Pkt4Ptr& pkt) const {
return
(
false
);
}
return
((
pkt
->
getLocalAddr
()
!=
IOAddress
::
IPV4_BCAST_ADDRESS
()
||
selectSubnet
(
pkt
,
false
)));
||
selectSubnet
(
pkt
)));
}
bool
...
...
src/bin/dhcp4/dhcp4_srv.h
View file @
a397cb9b
...
...
@@ -687,19 +687,9 @@ protected:
/// @brief Selects a subnet for a given client's packet.
///
/// The @c run_hooks parameters controls whether the method should run
/// installed hooks for subnet selection. Disabling it is useful in
/// cases when the server should sanity check the client's packet before
/// the actual processing. If the sanity check fails, the packet can
/// be discarded.
///
/// @param query client's message
/// @param run_hooks A boolean value which specifies if the method should
/// run installed hooks after selecting the subnet (if true). The default
/// value is true.
/// @return selected subnet (or NULL if no suitable subnet was found)
isc
::
dhcp
::
Subnet4Ptr
selectSubnet
(
const
Pkt4Ptr
&
query
,
const
bool
run_hooks
=
true
)
const
;
isc
::
dhcp
::
Subnet4Ptr
selectSubnet
(
const
Pkt4Ptr
&
query
)
const
;
/// indicates if shutdown is in progress. Setting it to true will
/// initiate server shutdown procedure.
...
...
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