From a9abb26d720e5d2e33cdee2848006284eda8307a Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Sat, 31 Mar 2018 23:34:04 +0200 Subject: [PATCH] uth: use ComboAddress in addSlaveCheckRequest() --- pdns/slavecommunicator.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index abfc48b6b..37b42de0e 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -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; } } -- 2.40.0