]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[676-add-support-for-server-tags-in-the-cb_cmds-hooks-library] Better fixes...
authorFrancis Dupont <fdupont@isc.org>
Sat, 29 Jun 2019 13:37:44 +0000 (15:37 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sun, 30 Jun 2019 12:35:44 +0000 (08:35 -0400)
src/lib/dhcpsrv/testutils/test_config_backend_dhcp4.cc
src/lib/dhcpsrv/testutils/test_config_backend_dhcp6.cc

index 222b3b0f81f808e2f38cd5f734c80c4506a566f5..650542cce9cb1f7ea683ff1b00c1828718994c8d 100644 (file)
@@ -197,10 +197,11 @@ TestConfigBackendDHCPv4::getGlobalParameter4(const db::ServerSelector& server_se
         for (auto tag : tags) {
             if ((*global_it)->hasServerTag(ServerTag(tag))) {
                 return (*global_it);
-            } else if ((*global_it)->hasAllServerTag()) {
-                candidate = *global_it;
             }
         }
+        if ((*global_it)->hasAllServerTag()) {
+            candidate = *global_it;
+        }
     }
 
     return (candidate);
index 6e183b39febe3529961d759cb4b820c7028342c6..383c4cd6e91fe888afa7942b5f89a024502ac8df 100644 (file)
@@ -197,7 +197,8 @@ TestConfigBackendDHCPv6::getGlobalParameter6(const db::ServerSelector& server_se
             if ((*global_it)->hasServerTag(ServerTag(tag))) {
                 return (*global_it);
             }
-        } else if ((*global_it)->hasAllServerTag()) {
+        }
+        if ((*global_it)->hasAllServerTag()) {
             candidate = *global_it;
         }
     }