Commit a43f9155 authored by Marcin Siodelski's avatar Marcin Siodelski Committed by Tomek Mrugalski
Browse files

[5315] Option data parser checks for runtime definitions in LibDHCP.

Previously, it checked for them in the staging configuration but this is
not going to work for control commands which bypass the staging
configuration step.
parent 6094638e
...@@ -180,9 +180,16 @@ OptionDataParser::findOptionDefinition(const std::string& option_space, ...@@ -180,9 +180,16 @@ OptionDataParser::findOptionDefinition(const std::string& option_space,
} }
if (!def) { if (!def) {
// Check if this is an option specified by a user. // Check if this is an option specified by a user. We used to
def = CfgMgr::instance().getStagingCfg()->getCfgOptionDef() // check that in the staging configuration, but when the configuration
->get(option_space, search_key); // changes are caused by a command the staging configuration doesn't
// exist. What is always available is the container holding runtime
// option definitions in LibDHCP. It holds option definitions from
// the staging configuration in case of the full reconfiguration or
// the definitions from the current configuration in case there is
// no staging configuration (after configuration commit). In other
// words, runtime options are always the ones that we need here.
def = LibDHCP::getRuntimeOptionDef(option_space, search_key);
} }
return (def); return (def);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment