]> granicus.if.org Git - pdns/commitdiff
uth: use ComboAddress in addSlaveCheckRequest()
authorKees Monshouwer <mind04@monshouwer.org>
Sat, 31 Mar 2018 21:34:04 +0000 (23:34 +0200)
committermind04 <mind04@monshouwer.org>
Wed, 4 Apr 2018 11:27:48 +0000 (13:27 +0200)
pdns/slavecommunicator.cc

index abfc48b6bcef50fcde9abb61f4fd72496932095e..37b42de0e2e3de99b24632df391b049608001642 100644 (file)
@@ -701,15 +701,14 @@ void CommunicatorClass::addSlaveCheckRequest(const DomainInfo& di, const ComboAd
   Lock l(&d_lock);
   DomainInfo ours = di;
   ours.backend = 0;
-  string remote_address = remote.toString();
 
   // When adding a check, if the remote addr from which notification was
   // received is a master, clear all other masters so we can be sure the
   // query goes to that one.
-  for (const auto& master : ours.masters) {
-    if (master == remote_address) {
+  for (const auto& master : di.masters) {
+    if (ComboAddress::addressOnlyEqual()(remote, master)) {
       ours.masters.clear();
-      ours.masters.push_back(remote_address);
+      ours.masters.push_back(master);
       break;
     }
   }