diff options
author | Slawek Figiel <slawek@isc.org> | 2023-04-06 18:39:09 +0200 |
---|---|---|
committer | Slawek Figiel <slawek@isc.org> | 2023-05-25 13:29:29 +0200 |
commit | e5a2fb85bc14b8680b6e9890ceb1bba26872bbc9 (patch) | |
tree | 3ef3de38c36cf956006b2aef71d5d4c24ba38801 /src/lib/dhcpsrv/cfg_hosts.cc | |
parent | [#2815] Add unit test (diff) | |
download | kea-e5a2fb85bc14b8680b6e9890ceb1bba26872bbc9.tar.xz kea-e5a2fb85bc14b8680b6e9890ceb1bba26872bbc9.zip |
[#2815] Fix getting IPv6 hosts by reserved address
Diffstat (limited to 'src/lib/dhcpsrv/cfg_hosts.cc')
-rw-r--r-- | src/lib/dhcpsrv/cfg_hosts.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc index 2ea5ad0fd7..c21905bf7e 100644 --- a/src/lib/dhcpsrv/cfg_hosts.cc +++ b/src/lib/dhcpsrv/cfg_hosts.cc @@ -644,16 +644,16 @@ CfgHosts::getAllInternal6(const IOAddress& address, Storage& storage) const { " for a host, specified address was " << address); } // Search for the Host using the reserved IPv6 address as a key. - const HostContainerIndex1& idx = hosts_.get<1>(); - HostContainerIndex1Range r = idx.equal_range(address); + const HostContainer6Index4& idx = hosts6_.get<4>(); + HostContainer6Index4Range r = idx.equal_range(address); // Append each Host object to the storage. - for (HostContainerIndex1::iterator host = r.first; host != r.second; - ++host) { + for (HostContainer6Index4::iterator reservation = r.first; reservation != r.second; + ++reservation) { LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE_DETAIL_DATA, HOSTS_CFG_GET_ALL_ADDRESS6_HOST) .arg(address.toText()) - .arg((*host)->toText()); - storage.push_back(*host); + .arg(reservation->host_->toText()); + storage.push_back(reservation->host_); } LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS, HOSTS_CFG_GET_ALL_ADDRESS6_COUNT) |