mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#1790] add support for top level maps in global CB parameters
This commit is contained in:
@@ -459,7 +459,7 @@ processDhcp4Config(isc::data::ConstElementPtr config_set) {
|
||||
if (expiration_cfg) {
|
||||
parameter_name = "expired-leases-processing";
|
||||
ExpirationConfigParser parser;
|
||||
parser.parse(expiration_cfg);
|
||||
parser.parse(expiration_cfg, CfgMgr::instance().getStagingCfg()->getCfgExpiration());
|
||||
}
|
||||
|
||||
// The hooks-libraries configuration must be parsed after parsing
|
||||
@@ -577,32 +577,8 @@ processDhcp4Config(isc::data::ConstElementPtr config_set) {
|
||||
|
||||
ConstElementPtr compatibility = mutable_cfg->get("compatibility");
|
||||
if (compatibility) {
|
||||
for (auto const& kv : compatibility->mapValue()) {
|
||||
if (!kv.second || (kv.second->getType() != Element::boolean)) {
|
||||
isc_throw(DhcpConfigError,
|
||||
"compatibility parameter values must be "
|
||||
<< "boolean (" << kv.first << " at "
|
||||
<< kv.second->getPosition() << ")");
|
||||
}
|
||||
if (kv.first == "lenient-option-parsing") {
|
||||
CfgMgr::instance().getStagingCfg()->setLenientOptionParsing(
|
||||
kv.second->boolValue());
|
||||
} else if (kv.first == "ignore-dhcp-server-identifier") {
|
||||
CfgMgr::instance().getStagingCfg()->setIgnoreServerIdentifier(
|
||||
kv.second->boolValue());
|
||||
} else if (kv.first == "ignore-rai-link-selection") {
|
||||
CfgMgr::instance().getStagingCfg()->setIgnoreRAILinkSelection(
|
||||
kv.second->boolValue());
|
||||
} else if (kv.first == "exclude-first-last-24") {
|
||||
CfgMgr::instance().getStagingCfg()->setExcludeFirstLast24(
|
||||
kv.second->boolValue());
|
||||
} else {
|
||||
isc_throw(DhcpConfigError,
|
||||
"unsupported compatibility parameter: "
|
||||
<< kv.first << " (" << kv.second->getPosition()
|
||||
<< ")");
|
||||
}
|
||||
}
|
||||
CompatibilityParser parser;
|
||||
parser.parse(compatibility, *CfgMgr::instance().getStagingCfg());
|
||||
}
|
||||
|
||||
// Make parsers grouping.
|
||||
|
Reference in New Issue
Block a user