From 5a8fa6d32ca82997ae8f76cdb5d780d1a62dec18 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Sun, 21 Jun 2020 01:26:28 +0200 Subject: [PATCH] auth: add used master address to slave check logs --- pdns/slavecommunicator.cc | 45 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index 1794cc0254..7ab50744b8 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -712,13 +712,10 @@ struct SlaveSenderReceiver bool receive(Identifier& id, Answer& a) { - if(d_resolver.tryGetSOASerial(&(std::get<0>(id)), &(std::get<1>(id)), &a.theirSerial, &a.theirInception, &a.theirExpire, &(std::get<2>(id)))) { - return 1; - } - return 0; + return d_resolver.tryGetSOASerial(&(std::get<0>(id)), &(std::get<1>(id)), &a.theirSerial, &a.theirInception, &a.theirExpire, &(std::get<2>(id))); } - void deliverAnswer(DomainNotificationInfo& dni, const Answer& a, unsigned int usec) + void deliverAnswer(const DomainNotificationInfo& dni, const Answer& a, unsigned int usec) { d_freshness[dni.di.id]=a; } @@ -899,14 +896,14 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) } g_log<getDomainInfo(di.zone, tempdi)) { g_log< their serial "<< theirserial << endl; + g_log< their serial "<< theirserial << endl; di.backend->setFresh(di.id); } else if(hasSOA && theirserial == ourserial) { @@ -968,38 +967,38 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) } } if(! maxInception && ! ssr.d_freshness[di.id].theirInception) { - g_log<setFresh(di.id); } else if(maxInception == ssr.d_freshness[di.id].theirInception && maxExpire == ssr.d_freshness[di.id].theirExpire) { - g_log<setFresh(di.id); } else if(maxExpire >= now && ! ssr.d_freshness[di.id].theirInception ) { - g_log<setFresh(di.id); } else if(maxInception && ! ssr.d_freshness[di.id].theirInception ) { - g_log<