Skip to content
GitLab
Menu
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
ee50101f
Commit
ee50101f
authored
Jan 12, 2017
by
Francis Dupont
Browse files
[5033] Some fixes (1,2,4 of review)
parent
d7114906
Changes
5
Hide whitespace changes
Inline
Side-by-side
doc/Makefile.am
View file @
ee50101f
...
@@ -20,6 +20,7 @@ nobase_dist_doc_DATA += examples/kea4/pgsql-reservations.json
...
@@ -20,6 +20,7 @@ nobase_dist_doc_DATA += examples/kea4/pgsql-reservations.json
nobase_dist_doc_DATA
+=
examples/kea4/reservations.json
nobase_dist_doc_DATA
+=
examples/kea4/reservations.json
nobase_dist_doc_DATA
+=
examples/kea4/several-subnets.json
nobase_dist_doc_DATA
+=
examples/kea4/several-subnets.json
nobase_dist_doc_DATA
+=
examples/kea4/single-subnet.json
nobase_dist_doc_DATA
+=
examples/kea4/single-subnet.json
nobase_dist_doc_DATA
+=
examples/kea4/with-ddns.json
nobase_dist_doc_DATA
+=
examples/kea6/advanced.json
nobase_dist_doc_DATA
+=
examples/kea6/advanced.json
nobase_dist_doc_DATA
+=
examples/kea6/backends.json
nobase_dist_doc_DATA
+=
examples/kea6/backends.json
nobase_dist_doc_DATA
+=
examples/kea6/classify.json
nobase_dist_doc_DATA
+=
examples/kea6/classify.json
...
@@ -35,6 +36,7 @@ nobase_dist_doc_DATA += examples/kea6/several-subnets.json
...
@@ -35,6 +36,7 @@ nobase_dist_doc_DATA += examples/kea6/several-subnets.json
nobase_dist_doc_DATA
+=
examples/kea6/simple.json
nobase_dist_doc_DATA
+=
examples/kea6/simple.json
nobase_dist_doc_DATA
+=
examples/kea6/softwire46.json
nobase_dist_doc_DATA
+=
examples/kea6/softwire46.json
nobase_dist_doc_DATA
+=
examples/kea6/stateless.json
nobase_dist_doc_DATA
+=
examples/kea6/stateless.json
nobase_dist_doc_DATA
+=
examples/kea6/with-ddns.json
devel
:
devel
:
mkdir
-p
html
mkdir
-p
html
...
...
src/bin/dhcp4/parser_context.h
View file @
ee50101f
...
@@ -187,6 +187,8 @@ public:
...
@@ -187,6 +187,8 @@ public:
///< Used while parsing content of Dhcp4.
///< Used while parsing content of Dhcp4.
DHCP4
,
DHCP4
,
// not yet DHCP6,
///< Used while parsing content of Logging
///< Used while parsing content of Logging
LOGGING
,
LOGGING
,
...
...
src/bin/dhcp4/simple_parser4.cc
View file @
ee50101f
...
@@ -123,17 +123,9 @@ size_t SimpleParser4::setAllDefaults(isc::data::ElementPtr global) {
...
@@ -123,17 +123,9 @@ size_t SimpleParser4::setAllDefaults(isc::data::ElementPtr global) {
ConstElementPtr
d2_client
=
global
->
get
(
"dhcp-ddns"
);
ConstElementPtr
d2_client
=
global
->
get
(
"dhcp-ddns"
);
/// @todo - what if it's not in global? should we add it?
/// @todo - what if it's not in global? should we add it?
if
(
d2_client
)
{
if
(
d2_client
)
{
// Because "dhcp-ddns" is a MapElement and global->get()
// Get the mutable form of d2 client config
// returns a ConstElementPtr, then we get a map we can't
ElementPtr
mutable_d2
=
boost
::
const_pointer_cast
<
Element
>
(
d2_client
);
// change. So go thru gyrations to create a non-const
cnt
+=
SimpleParser
::
setDefaults
(
mutable_d2
,
D2_CLIENT_CONFIG_DEFAULTS
);
// map, update it with default values and then replace
// the one in global with the new one. Ick.
std
::
map
<
std
::
string
,
ConstElementPtr
>
d2_map
;
d2_client
->
getValue
(
d2_map
);
ElementPtr
new_map
(
new
MapElement
());
new_map
->
setValue
(
d2_map
);
cnt
+=
SimpleParser
::
setDefaults
(
new_map
,
D2_CLIENT_CONFIG_DEFAULTS
);
global
->
set
(
"dhcp-ddns"
,
new_map
);
}
}
return
(
cnt
);
return
(
cnt
);
...
...
src/bin/dhcp6/parser_context.h
View file @
ee50101f
...
@@ -191,7 +191,6 @@ public:
...
@@ -191,7 +191,6 @@ public:
DHCP6
,
DHCP6
,
// not yet DHCP4,
// not yet DHCP4,
// not yet DHCP_DDNS,
///< Used while parsing content of Logging
///< Used while parsing content of Logging
LOGGING
,
LOGGING
,
...
...
src/bin/dhcp6/simple_parser6.cc
View file @
ee50101f
...
@@ -125,17 +125,9 @@ size_t SimpleParser6::setAllDefaults(isc::data::ElementPtr global) {
...
@@ -125,17 +125,9 @@ size_t SimpleParser6::setAllDefaults(isc::data::ElementPtr global) {
ConstElementPtr
d2_client
=
global
->
get
(
"dhcp-ddns"
);
ConstElementPtr
d2_client
=
global
->
get
(
"dhcp-ddns"
);
/// @todo - what if it's not in global? should we add it?
/// @todo - what if it's not in global? should we add it?
if
(
d2_client
)
{
if
(
d2_client
)
{
// Because "dhcp-ddns" is a MapElement and global->get()
// Get the mutable form of d2 client config
// returns a ConstElementPtr, then we get a map we can't
ElementPtr
mutable_d2
=
boost
::
const_pointer_cast
<
Element
>
(
d2_client
);
// change. So go thru gyrations to create a non-const
cnt
+=
SimpleParser
::
setDefaults
(
mutable_d2
,
D2_CLIENT_CONFIG_DEFAULTS
);
// map, update it with default values and then replace
// the one in global with the new one. Ick.
std
::
map
<
std
::
string
,
ConstElementPtr
>
d2_map
;
d2_client
->
getValue
(
d2_map
);
ElementPtr
new_map
(
new
MapElement
());
new_map
->
setValue
(
d2_map
);
cnt
+=
SimpleParser
::
setDefaults
(
new_map
,
D2_CLIENT_CONFIG_DEFAULTS
);
global
->
set
(
"dhcp-ddns"
,
new_map
);
}
}
return
(
cnt
);
return
(
cnt
);
...
...
Write
Preview
Supports
Markdown
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