]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5531] Checkpoint before first syntax change
authorFrancis Dupont <fdupont@isc.org>
Mon, 12 Feb 2018 00:34:48 +0000 (01:34 +0100)
committerFrancis Dupont <fdupont@isc.org>
Mon, 12 Feb 2018 00:34:48 +0000 (01:34 +0100)
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp4/parser_context.h
src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/json_config_parser.cc
src/bin/dhcp6/parser_context.h
src/lib/dhcpsrv/host_mgr.cc
src/lib/dhcpsrv/hosts_messages.mes

index d5d88ff41ae63c9feeef56ea46fd2810946915f0..8fcecb7ac2ef29ca51499a83b31deef31fb4718f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC")
 
    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -294,6 +294,15 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
     }
 }
 
+\"hosts-databases\" {
+    switch(driver.ctx_) {
+    case isc::dhcp::Parser4Context::DHCP4:
+        return isc::dhcp::Dhcp4Parser::make_HOSTS_DATABASES(driver.loc_);
+    default:
+        return isc::dhcp::Dhcp4Parser::make_STRING("hosts-databases", driver.loc_);
+    }
+}
+
 \"readonly\" {
     switch(driver.ctx_) {
     case isc::dhcp::Parser4Context::HOSTS_DATABASE:
index 9c5f94262a3ef7e5c24b7b55f7755158e843488a..d1ab591aa4ce00eece179b117a79d8eeb3493b3a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC")
 
    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -68,6 +68,7 @@ using namespace std;
 
   LEASE_DATABASE "lease-database"
   HOSTS_DATABASE "hosts-database"
+  HOSTS_DATABASES "hosts-databases"
   TYPE "type"
   MEMFILE "memfile"
   MYSQL "mysql"
@@ -421,6 +422,7 @@ global_param: valid_lifetime
             | interfaces_config
             | lease_database
             | hosts_database
+            | hosts_databases
             | host_reservation_identifiers
             | client_classes
             | option_def_list
@@ -568,6 +570,34 @@ hosts_database: HOSTS_DATABASE {
     ctx.leave();
 };
 
+hosts_databases: HOSTS_DATABASES {
+    ElementPtr l(new ListElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->set("hosts-databases", l);
+    ctx.stack_.push_back(l);
+    ctx.enter(ctx.HOSTS_DATABASE);
+} COLON LSQUARE_BRACKET database_list RSQUARE_BRACKET {
+    ctx.stack_.pop_back();
+    ctx.leave();
+};
+
+database_list: %empty
+             | not_empty_database_list
+             ;
+
+not_empty_database_list: database
+                       | not_empty_database_list COMMA database
+                       ;
+
+database: LCURLY_BRACKET {
+    ElementPtr m(new MapElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->add(m);
+    ctx.stack_.push_back(m);
+} database_map_params RCURLY_BRACKET {
+    // The type parameter is required
+    ctx.require("type", ctx.loc2pos(@1), ctx.loc2pos(@4));
+    ctx.stack_.pop_back();
+};
+
 database_map_params: database_map_param
                    | database_map_params COMMA database_map_param
                    ;
index 4c8417ef5e833da0a52007dcb4d73ee7f6895767..ea009f5a58100bad4770573fa8b8c306eb52606b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -425,6 +425,17 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set,
                 continue;
             }
 
+            // For now only support empty or singleton, ignoring extra entries.
+            if (config_pair.first == "hosts-databases") {
+                if (config_pair.second->size() == 0) {
+                    continue;
+                }
+                DbAccessParser parser(DbAccessParser::HOSTS_DB);
+                CfgDbAccessPtr cfg_db_access = srv_cfg->getCfgDbAccess();
+                parser.parse(cfg_db_access, config_pair.second->get(0));
+                continue;
+            }
+
             if (config_pair.first == "subnet4") {
                 SrvConfigPtr srv_cfg = CfgMgr::instance().getStagingCfg();
                 Subnets4ListConfigParser subnets_parser;
index 189d7512aec84ed7fcdd5b58f8d4d92a18400e54..23a8c1ca323bfdc1e3245e54d91eccce4dbea8a1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -223,7 +223,7 @@ public:
         /// Used while parsing Dhcp4/lease-database structures.
         LEASE_DATABASE,
 
-        /// Used while parsing Dhcp4/hosts-database structures.
+        /// Used while parsing Dhcp4/hosts-database[s] structures.
         HOSTS_DATABASE,
 
         /// Used while parsing Dhcp4/*-database/type.
index 58808613eaa1476a0922ad99248794ef0e430c41..f9fe3f8c5fae757429d2a138051c236b19736eb4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC")
 
    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -457,6 +457,15 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
     }
 }
 
+\"hosts-databases\" {
+    switch(driver.ctx_) {
+    case isc::dhcp::Parser6Context::DHCP6:
+        return isc::dhcp::Dhcp6Parser::make_HOSTS_DATABASES(driver.loc_);
+    default:
+        return isc::dhcp::Dhcp6Parser::make_STRING("hosts-databases", driver.loc_);
+    }
+}
+
 \"readonly\" {
     switch(driver.ctx_) {
     case isc::dhcp::Parser6Context::HOSTS_DATABASE:
index 5fd8df6db60b1d51779c3c5272380a4f6e73d265..7ed24cdc8f3ae9882ab42f1a3d0bab542d8e89fd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC")
 
    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -56,6 +56,7 @@ using namespace std;
 
   LEASE_DATABASE "lease-database"
   HOSTS_DATABASE "hosts-database"
+  HOSTS_DATABASES "hosts-databases"
   TYPE "type"
   MEMFILE "memfile"
   MYSQL "mysql"
@@ -425,6 +426,7 @@ global_param: preferred_lifetime
             | interfaces_config
             | lease_database
             | hosts_database
+            | hosts_databases
             | mac_sources
             | relay_supplied_options
             | host_reservation_identifiers
@@ -538,6 +540,34 @@ hosts_database: HOSTS_DATABASE {
     ctx.leave();
 };
 
+hosts_databases: HOSTS_DATABASES {
+    ElementPtr l(new ListElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->set("hosts-databases", l);
+    ctx.stack_.push_back(l);
+    ctx.enter(ctx.HOSTS_DATABASE);
+} COLON LSQUARE_BRACKET database_list RSQUARE_BRACKET {
+    ctx.stack_.pop_back();
+    ctx.leave();
+};
+
+database_list: %empty
+             | not_empty_database_list
+             ;
+
+not_empty_database_list: database
+                       | not_empty_database_list COMMA database
+                       ;
+
+database: LCURLY_BRACKET {
+    ElementPtr m(new MapElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->add(m);
+    ctx.stack_.push_back(m);
+} database_map_params RCURLY_BRACKET {
+    // The type parameter is required
+    ctx.require("type", ctx.loc2pos(@1), ctx.loc2pos(@4));
+    ctx.stack_.pop_back();
+};
+
 database_map_params: database_map_param
                    | database_map_params COMMA database_map_param
                    ;
index bab6ebe21d4ee01c424879d54dcce96d14f29086..a999ebe407789931d11b8f431bb3bacf65c1798c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -538,6 +538,17 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set,
                 continue;
             }
 
+            // For now only support empty or singleton, ignoring extra entries.
+            if (config_pair.first == "hosts-databases") {
+                if (config_pair.second->size() == 0) {
+                    continue;
+                }
+                DbAccessParser parser(DbAccessParser::HOSTS_DB);
+                CfgDbAccessPtr cfg_db_access = srv_config->getCfgDbAccess();
+                parser.parse(cfg_db_access, config_pair.second->get(0));
+                continue;
+            }
+
             if (config_pair.first == "subnet6") {
                 Subnets6ListConfigParser subnets_parser;
                 // parse() returns number of subnets parsed. We may log it one day.
index 9cca5e630fa41b085b4100874211766839310e17..8fe201b15769e3736185bf78d1a6c793f7e94b78 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -221,7 +221,7 @@ public:
         /// Used while parsing Dhcp6/lease-database structures.
         LEASE_DATABASE,
 
-        /// Used while parsing Dhcp6/hosts-database structures.
+        /// Used while parsing Dhcp6/hosts-database[s] structures.
         HOSTS_DATABASE,
 
         /// Used while parsing Dhcp6/*-database/type.
index b04bd3f0f9696856dd8e8aee929125deb5fd44c7..8b62d5423555e08d396aae61c11a78c669c6a98e 100644 (file)
@@ -116,16 +116,16 @@ ConstHostPtr
 HostMgr::get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
               const DuidPtr& duid) const {
     ConstHostPtr host = getCfgHosts()->get4(subnet_id, hwaddr, duid);
+    if (host || alternate_sources_.empty()) {
+        return (host);
+    }
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
+              HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_HWADDR_DUID)
+        .arg(subnet_id)
+        .arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)")
+        .arg(duid ? duid->toText() : "(duid)");
     for (auto it = alternate_sources_.begin();
-         it != alternate_sources_.end(); ++it) {
-        if (host) {
-            break;
-        }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
-                  HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_HWADDR_DUID)
-            .arg(subnet_id)
-            .arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)")
-            .arg(duid ? duid->toText() : "(duid)");
+         !host && it != alternate_sources_.end(); ++it) {
         if (duid) {
             host = (*it)->get4(subnet_id, HWAddrPtr(), duid);
         }
@@ -143,18 +143,18 @@ HostMgr::get4(const SubnetID& subnet_id,
               const size_t identifier_len) const {
     ConstHostPtr host = getCfgHosts()->get4(subnet_id, identifier_type,
                                             identifier_begin, identifier_len);
+    if (host || alternate_sources_.empty()) {
+        return (host);
+    }
+
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
+              HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER)
+        .arg(subnet_id)
+        .arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
+                                       identifier_len));
+
     for (auto it = alternate_sources_.begin();
          it != alternate_sources_.end(); ++it) {
-        if (host) {
-            break;
-        }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
-                  HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER)
-            .arg(subnet_id)
-            .arg(Host::getIdentifierAsText(identifier_type,
-                                           identifier_begin,
-                                           identifier_len));
-
         host = (*it)->get4(subnet_id, identifier_type,
                            identifier_begin, identifier_len);
 
@@ -165,17 +165,17 @@ HostMgr::get4(const SubnetID& subnet_id,
                 .arg(Host::getIdentifierAsText(identifier_type,
                                                identifier_begin,
                                                identifier_len))
+                .arg((*it)->getType())
                 .arg(host->toText());
-            break;
+                     
+            return (host);
         }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS,
-                  HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER_NULL)
-            .arg(subnet_id)
-            .arg(Host::getIdentifierAsText(identifier_type,
-                                           identifier_begin,
-                                           identifier_len));
     }
-
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS,
+              HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER_NULL)
+        .arg(subnet_id)
+        .arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
+                                       identifier_len));
     return (host);
 }
 
@@ -183,15 +183,15 @@ ConstHostPtr
 HostMgr::get4(const SubnetID& subnet_id,
               const asiolink::IOAddress& address) const {
     ConstHostPtr host = getCfgHosts()->get4(subnet_id, address);
+    if (host || alternate_sources_.empty()) {
+        return (host);
+    }
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
+              HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_ADDRESS4)
+        .arg(subnet_id)
+        .arg(address.toText());
     for (auto it = alternate_sources_.begin();
-         it != alternate_sources_.end(); ++it) {
-        if (host) {
-            break;
-        }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
-                  HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_ADDRESS4)
-            .arg(subnet_id)
-            .arg(address.toText());
+         !host && it != alternate_sources_.end(); ++it) {
         host = (*it)->get4(subnet_id, address);
     }
     return (host);
@@ -202,16 +202,17 @@ ConstHostPtr
 HostMgr::get6(const SubnetID& subnet_id, const DuidPtr& duid,
                const HWAddrPtr& hwaddr) const {
     ConstHostPtr host = getCfgHosts()->get6(subnet_id, duid, hwaddr);
+    if (host || alternate_sources_.empty()) {
+        return (host);
+    }
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
+              HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_DUID_HWADDR)
+        .arg(subnet_id)
+        .arg(duid ? duid->toText() : "(duid)")
+        .arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)");
+
     for (auto it = alternate_sources_.begin();
-         it != alternate_sources_.end(); ++it) {
-        if (host) {
-            break;
-        }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
-                  HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_DUID_HWADDR)
-            .arg(subnet_id)
-            .arg(duid ? duid->toText() : "(duid)")
-            .arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)");
+         !host && it != alternate_sources_.end(); ++it) {
         if (duid) {
             host = (*it)->get6(subnet_id, duid, HWAddrPtr());
         }
@@ -225,15 +226,15 @@ HostMgr::get6(const SubnetID& subnet_id, const DuidPtr& duid,
 ConstHostPtr
 HostMgr::get6(const IOAddress& prefix, const uint8_t prefix_len) const {
     ConstHostPtr host = getCfgHosts()->get6(prefix, prefix_len);
+    if (host || alternate_sources_.empty()) {
+        return (host);
+    }
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
+              HOSTS_MGR_ALTERNATE_GET6_PREFIX)
+        .arg(prefix.toText())
+        .arg(static_cast<int>(prefix_len));
     for (auto it = alternate_sources_.begin();
-         it != alternate_sources_.end(); ++it) {
-        if (host) {
-            break;
-        }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
-                  HOSTS_MGR_ALTERNATE_GET6_PREFIX)
-            .arg(prefix.toText())
-            .arg(static_cast<int>(prefix_len));
+         !host && it != alternate_sources_.end(); ++it) {
         host = (*it)->get6(prefix, prefix_len);
     }
     return (host);
@@ -246,17 +247,18 @@ HostMgr::get6(const SubnetID& subnet_id,
               const size_t identifier_len) const {
     ConstHostPtr host = getCfgHosts()->get6(subnet_id, identifier_type,
                                             identifier_begin, identifier_len);
+    if (host || alternate_sources_.empty()) {
+        return (host);
+    }
+
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
+              HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER)
+        .arg(subnet_id)
+        .arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
+                                       identifier_len));
+
     for (auto it = alternate_sources_.begin();
          it != alternate_sources_.end(); ++it) {
-        if (host) {
-            break;
-        }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
-                  HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER)
-            .arg(subnet_id)
-            .arg(Host::getIdentifierAsText(identifier_type,
-                                           identifier_begin,
-                                           identifier_len));
 
         host = (*it)->get6(subnet_id, identifier_type,
                            identifier_begin, identifier_len);
@@ -268,16 +270,18 @@ HostMgr::get6(const SubnetID& subnet_id,
                     .arg(Host::getIdentifierAsText(identifier_type,
                                                    identifier_begin,
                                                    identifier_len))
+                    .arg((*it)->getType())
                     .arg(host->toText());
-                break;
+                return (host);
         }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS,
-                  HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER_NULL)
-            .arg(subnet_id)
-            .arg(Host::getIdentifierAsText(identifier_type,
-                                           identifier_begin,
-                                           identifier_len));
     }
+
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS,
+              HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER_NULL)
+        .arg(subnet_id)
+        .arg(Host::getIdentifierAsText(identifier_type, identifier_begin,
+                                       identifier_len));
+
     return (host);
 }
 
@@ -285,15 +289,15 @@ ConstHostPtr
 HostMgr::get6(const SubnetID& subnet_id,
               const asiolink::IOAddress& addr) const {
     ConstHostPtr host = getCfgHosts()->get6(subnet_id, addr);
+    if (host || alternate_sources_.empty()) {
+        return (host);
+    }
+    LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
+              HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_ADDRESS6)
+        .arg(subnet_id)
+        .arg(addr.toText());
     for (auto it = alternate_sources_.begin();
-         it != alternate_sources_.end(); ++it) {
-        if (host) {
-            break;
-        }
-        LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE,
-                  HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_ADDRESS6)
-            .arg(subnet_id)
-            .arg(addr.toText());
+         !host && it != alternate_sources_.end(); ++it) {
         host = (*it)->get6(subnet_id, addr);
     }
     return (host);
index 00f0b23b4bf4bec2efed6703c8f4b423308cc8ad..d47c582623037bfd782851714f6c29c3a63c9889 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -134,24 +134,24 @@ subnet id and specific host identifier.
 This debug message is issued when no host was found using the specified
 subnet id and host identifier.
 
-% HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_ADDRESS4 trying alternate source for host using subnet id %1 and address %2
+% HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_ADDRESS4 trying alternate sources for host using subnet id %1 and address %2
 This debug message is issued when the Host Manager doesn't find the
 host connected to the specific subnet and having the reservation for
 the specific IPv4 address, and it is starting to search for this host
-in the alternate host data source.
+in alternate host data sources.
 
-% HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_HWADDR_DUID trying alternate source for host using subnet id %1, HWADDR %2, DUID%3
+% HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_HWADDR_DUID trying alternate sources for host using subnet id %1, HWADDR %2, DUID%3
 This debug message is issued when the Host Manager doesn't find the
 host connected to the specific subnet and identified by the HW address
-or DUID, and it is starting to search for this host in the alternate
-host data source.
+or DUID, and it is starting to search for this host in alternate
+host data sources.
 
 % HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id %1, identified by %2
 This debug message is issued when starting to retrieve a host holding
 IPv4 reservation, which is connected to a specific subnet and
 is identified by a specific unique identifier.
 
-% HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER_HOST using subnet id %1 and identifier %2, found host: %3
+% HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER_HOST using subnet id %1 and identifier %2, found in %3 host: %4
 This debug message includes the details of a host returned by an
 alternate hosts data source using a subnet id and specific host
 identifier.
@@ -160,32 +160,32 @@ identifier.
 This debug message is issued when no host was found using the specified
 subnet id and host identifier.
 
-% HOSTS_MGR_ALTERNATE_GET6_PREFIX trying alternate source for host using prefix %1/%2
+% HOSTS_MGR_ALTERNATE_GET6_PREFIX trying alternate sources for host using prefix %1/%2
 This debug message is issued when the Host Manager doesn't find the
 host connected to the specific subnet and having the reservation for
 the specified prefix, and it is starting to search for this host in
-the alternate host data source.
+alternate host data sources.
 
-% HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_ADDRESS6 trying alternate source for host using subnet id %1 and IPv6 address %2
+% HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_ADDRESS6 trying alternate sources for host using subnet id %1 and IPv6 address %2
 This debug message is issued when the Host Manager doesn't find the
 host connected to the specific subnet and having the reservation for
 the specified IPv6 address, and it is starting to search for this
-host in the alternate host data source.
+host in alternate host data sources.
 
-% HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_DUID_HWADDR trying alternate source for host using subnet id %1, DUID %2, HWADDR %3
+% HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_DUID_HWADDR trying alternate sources for host using subnet id %1, DUID %2, HWADDR %3
 This debug message is issued when the Host Manager doesn't find the
 host connected to the specific subnet and identified by the specified
-DUID or HW Address, and it is starting to search for this host in the
-alternate host data source.
+DUID or HW Address, and it is starting to search for this host in
+alternate host data sources.
 
 % HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER get one host with IPv6 reservation for subnet id %1, identified by %2
 This debug message is issued when starting to retrieve a host holding
 IPv4 reservation, which is connected to a specific subnet and
 is identified by a specific unique identifier.
 
-% HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER_HOST using subnet id %1 and identifier %2, found host: %3
+% HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER_HOST using subnet id %1 and identifier %2, found in %3 host: %4
 This debug message includes the details of a host returned by an
-alternate hosts data source using a subnet id and specific host
+alternate host data source using a subnet id and specific host
 identifier.
 
 % HOSTS_MGR_ALTERNATE_GET6_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id %1 and identifier %2