From 3ddfc47f128af1a5439a298b0a0dcdb279699656 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Mon, 23 Jan 2017 14:49:01 +0100 Subject: [PATCH] [master] Initialized more variables in D2ClientConfigParser::parse --- src/lib/dhcpsrv/d2_client_cfg.h | 2 +- src/lib/dhcpsrv/parsers/dhcp_parsers.cc | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib/dhcpsrv/d2_client_cfg.h b/src/lib/dhcpsrv/d2_client_cfg.h index b43327cd7f..82345e9d2c 100644 --- a/src/lib/dhcpsrv/d2_client_cfg.h +++ b/src/lib/dhcpsrv/d2_client_cfg.h @@ -254,7 +254,7 @@ private: /// @brief IP port on which the client should send size_t sender_port_; - /// @brief Maxium number of NCRs allowed to queue waiting to send + /// @brief Maximum number of NCRs allowed to queue waiting to send size_t max_queue_size_; /// @brief The socket protocol to use with kea-dhcp-ddns. diff --git a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc index 5cce39a0a0..19b24f8282 100644 --- a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc +++ b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc @@ -1315,17 +1315,18 @@ D2ClientConfigParser::parse(isc::data::ConstElementPtr client_config) { std::string qualifying_suffix; bool found_qualifying_suffix = false; IOAddress server_ip(0); - uint32_t server_port; + uint32_t server_port = 0; std::string sender_ip_str; uint32_t sender_port; - uint32_t max_queue_size; + uint32_t max_queue_size = 1024; dhcp_ddns::NameChangeProtocol ncr_protocol; dhcp_ddns::NameChangeFormat ncr_format; - bool always_include_fqdn; + bool always_include_fqdn = false; bool allow_client_update; - bool override_no_update; - bool override_client_update; - D2ClientConfig::ReplaceClientNameMode replace_client_name_mode; + bool override_no_update = false; + bool override_client_update = false; + D2ClientConfig::ReplaceClientNameMode replace_client_name_mode = + D2ClientConfig::ReplaceClientNameMode::RCM_NEVER; std::string generated_prefix; BOOST_FOREACH(ConfigPair param, client_config->mapValue()) { -- 2.47.3