2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 06:25:34 +00:00

[5351] Added global and option def

This commit is contained in:
Francis Dupont
2017-11-29 08:09:49 +01:00
parent b6a202af89
commit bc3ea9d7d1
22 changed files with 161 additions and 29 deletions

View File

@@ -69,6 +69,7 @@ public:
/// - echo-client-id
/// - decline-probation-period
/// - dhcp4o6-port
/// - user-context
///
/// @throw DhcpConfigError if parameters are missing or
/// or having incorrect values.
@@ -87,6 +88,12 @@ public:
// Set the DHCPv4-over-DHCPv6 interserver port.
uint16_t dhcp4o6_port = getUint16(global, "dhcp4o6-port");
cfg->setDhcp4o6Port(dhcp4o6_port);
// Set the global user context.
ConstElementPtr user_context = global->get("user-context");
if (user_context) {
cfg->setContext(user_context);
}
}
/// @brief Copies subnets from shared networks to regular subnets container
@@ -445,8 +452,9 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set,
// Timers are not used in the global scope. Their values are derived
// to specific subnets (see SimpleParser6::deriveParameters).
// decline-probation-period, dhcp4o6-port, echo-client-id are
// handled in global_parser.parse() which sets global parameters.
// decline-probation-period, dhcp4o6-port, echo-client-id,
// user-context are handled in global_parser.parse() which
// sets global parameters.
// match-client-id is derived to subnet scope level.
if ( (config_pair.first == "renew-timer") ||
(config_pair.first == "rebind-timer") ||
@@ -454,6 +462,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set,
(config_pair.first == "decline-probation-period") ||
(config_pair.first == "dhcp4o6-port") ||
(config_pair.first == "echo-client-id") ||
(config_pair.first == "user-context") ||
(config_pair.first == "match-client-id") ||
(config_pair.first == "next-server") ||
(config_pair.first == "server-hostname") ||