Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
200a1b96
Commit
200a1b96
authored
Aug 08, 2014
by
Tomek Mrugalski
🛰
Browse files
[3464] PoolsListParser logic improved
parent
eef93810
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/guide/dhcp4-srv.xml
View file @
200a1b96
...
...
@@ -401,6 +401,12 @@ temporarily override a list of interface names and listen on all interfaces.
in square brackets, even though only one range of addresses is
specified in this example.
</para>
<para>
Each
<command>
pool
</command>
is a structure that describes
the pool parameters. Currently there is only one parameter,
<command>
pool
</command>
, which gives the range of addresses
in the pool. Additional parameters will be added in future
releases of Kea.
</para>
<para>
It is possible to define more than one pool in a subnet: continuing
the previous example, further assume that 192.0.2.64/26 should be also be
managed by the server. It could be written as 192.0.2.64 to
...
...
src/lib/dhcpsrv/dhcp_parsers.cc
View file @
200a1b96
...
...
@@ -962,13 +962,19 @@ PoolsListParser::build(ConstElementPtr pools) {
parser
->
build
(
pool
);
// Before we can create a pool, we need to ask the pool parser
// to create it.
parser
->
commit
();
// Let's store the parser, but do not commit anything yet
parsers_
.
push_back
(
parser
);
}
}
void
PoolsListParser
::
commit
()
{
// Commit each parser first. It will store the pool structure
// in pools_.
BOOST_FOREACH
(
ParserPtr
parser
,
parsers_
)
{
parser
->
commit
();
}
if
(
pools_
)
{
// local_pools_ holds the values produced by the build function.
// At this point parsing should have completed successfuly so
...
...
src/lib/dhcpsrv/dhcp_parsers.h
View file @
200a1b96
...
...
@@ -902,6 +902,9 @@ protected:
/// A temporary storage for pools configuration. It is the
/// storage where pools are stored by the build function.
PoolStoragePtr
local_pools_
;
/// Collection of parsers;
ParserCollection
parsers_
;
};
/// @brief parser for additional relay information
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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