From 92e514ebd7768f06245eceb82dc55f15c3301f1d Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Wed, 27 Mar 2019 19:31:17 +0100 Subject: [PATCH] [#490,!284] Addressed review comments. --- src/bin/dhcp4/json_config_parser.cc | 3 --- src/bin/dhcp6/json_config_parser.cc | 3 --- src/lib/dhcpsrv/network.h | 6 ++++-- src/lib/dhcpsrv/shared_network.h | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc index f3f32e0454..05f10d1cbd 100644 --- a/src/bin/dhcp4/json_config_parser.cc +++ b/src/bin/dhcp4/json_config_parser.cc @@ -343,9 +343,6 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set, // Get the staging configuration srv_cfg = CfgMgr::instance().getStagingCfg(); - // Preserve all scalar global parameters - srv_cfg->extractConfiguredGlobals(config_set); - // This is a way to convert ConstElementPtr to ElementPtr. // We need a config that can be edited, because we will insert // default values and will insert derived values as well. diff --git a/src/bin/dhcp6/json_config_parser.cc b/src/bin/dhcp6/json_config_parser.cc index 2f9a07c960..c3b1562e0f 100644 --- a/src/bin/dhcp6/json_config_parser.cc +++ b/src/bin/dhcp6/json_config_parser.cc @@ -451,9 +451,6 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set, // Get the staging configuration. srv_config = CfgMgr::instance().getStagingCfg(); - // Preserve all scalar global parameters - srv_config->extractConfiguredGlobals(config_set); - // Set all default values if not specified by the user. SimpleParser6::setAllDefaults(mutable_cfg); diff --git a/src/lib/dhcpsrv/network.h b/src/lib/dhcpsrv/network.h index 39646c8929..9a0f8701be 100644 --- a/src/lib/dhcpsrv/network.h +++ b/src/lib/dhcpsrv/network.h @@ -106,8 +106,10 @@ typedef std::function FetchNetworkGlobalsFn; /// change the existing server logic. /// /// The @c Network object now holds the pointer to the "parent" @c Network -/// object. The parent network is a shared network. The object having -/// a parent is a subnet. The subnet may or may not have a parent. +/// object. Thus subnets which belong to a shared network will have +/// that shared network as its parent. Stand-alone subnets, will have +/// no parent. +/// /// The general idea is that the accessor functions of the network /// will first check if the accessed value is specified or not (that /// is handled by @c util::Optional object). If the value is specified diff --git a/src/lib/dhcpsrv/shared_network.h b/src/lib/dhcpsrv/shared_network.h index 185c27f01e..c73588ec2a 100644 --- a/src/lib/dhcpsrv/shared_network.h +++ b/src/lib/dhcpsrv/shared_network.h @@ -39,8 +39,8 @@ struct SharedNetworkModificationTimeIndexTag { }; /// @brief Shared network holding IPv4 subnets. /// /// Specialization of the @ref Network4 class for IPv4 shared networks. - class SharedNetwork4 : public virtual Network4, - public boost::enable_shared_from_this { +class SharedNetwork4 : public virtual Network4, + public boost::enable_shared_from_this { public: /// @brief Constructor. -- 2.47.2