From cbc6a8f6305a847268aed5552c8b52d9b4d235cb Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Thu, 1 Mar 2018 15:18:50 +0100 Subject: [PATCH] [5533a] Reordered get4 hwaddr/duid code to follow CfgHosts behavior --- .gitmodules | 3 +++ premium | 1 + src/lib/dhcpsrv/host_mgr.cc | 8 ++++---- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 160000 premium diff --git a/.gitmodules b/.gitmodules index e69de29bb2..e4730c1e82 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "premium"] + path = premium + url = ssh://fdupont@repo.isc.org/proj/git/prod/kea-premium.git diff --git a/premium b/premium new file mode 160000 index 0000000000..02dfa84154 --- /dev/null +++ b/premium @@ -0,0 +1 @@ +Subproject commit 02dfa841546e3ab44e5cc8d55c82e0e5af8cbb7a diff --git a/src/lib/dhcpsrv/host_mgr.cc b/src/lib/dhcpsrv/host_mgr.cc index e08b1288f8..775997d12a 100644 --- a/src/lib/dhcpsrv/host_mgr.cc +++ b/src/lib/dhcpsrv/host_mgr.cc @@ -148,12 +148,12 @@ HostMgr::get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr, .arg(duid ? duid->toText() : "(duid)"); for (auto it = alternate_sources_.begin(); !host && it != alternate_sources_.end(); ++it) { - if (duid) { - host = (*it)->get4(subnet_id, HWAddrPtr(), duid); - } - if (!host && hwaddr) { + if (hwaddr) { 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())) { cache(host); } -- 2.47.3