Commit cbc6a8f6 authored by Francis Dupont's avatar Francis Dupont
Browse files

[5533a] Reordered get4 hwaddr/duid code to follow CfgHosts behavior

parent c6b08019
[submodule "premium"]
path = premium
url = ssh://fdupont@repo.isc.org/proj/git/prod/kea-premium.git
premium @ 02dfa841
Subproject commit 02dfa841546e3ab44e5cc8d55c82e0e5af8cbb7a
...@@ -148,12 +148,12 @@ HostMgr::get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr, ...@@ -148,12 +148,12 @@ HostMgr::get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
.arg(duid ? duid->toText() : "(duid)"); .arg(duid ? duid->toText() : "(duid)");
for (auto it = alternate_sources_.begin(); for (auto it = alternate_sources_.begin();
!host && it != alternate_sources_.end(); ++it) { !host && it != alternate_sources_.end(); ++it) {
if (duid) { if (hwaddr) {
host = (*it)->get4(subnet_id, HWAddrPtr(), duid);
}
if (!host && hwaddr) {
host = (*it)->get4(subnet_id, hwaddr, DuidPtr()); host = (*it)->get4(subnet_id, hwaddr, DuidPtr());
} }
if (!host && duid) {
host = (*it)->get4(subnet_id, HWAddrPtr(), duid);
}
if (host && cache_ptr_ && (it != alternate_sources_.begin())) { if (host && cache_ptr_ && (it != alternate_sources_.begin())) {
cache(host); cache(host);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment