From: Kees Monshouwer Date: Thu, 30 Nov 2017 12:58:24 +0000 (+0100) Subject: auth: remove supurios notify after a supermaster domain was created X-Git-Tag: dnsdist-1.3.1~168^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8090386edde568f9bcaf2416839b780b72e1796;p=thirdparty%2Fpdns.git auth: remove supurios notify after a supermaster domain was created From the regression tests: Nov 30 13:30:54 Received NOTIFY for test.com from 127.0.0.1 for which we are not authoritative, trying supermaster Nov 30 13:30:54 Received NOTIFY for example.com from 127.0.0.1 which is not a master (Refused) Nov 30 13:30:54 Received NOTIFY for test.com from 127.0.0.1 for which we are not authoritative, trying supermaster Nov 30 13:30:55 Created new slave zone 'test.com' from supermaster 127.0.0.1 Nov 30 13:30:55 Database error trying to create test.com for potential supermaster 127.0.0.1: Database error trying to insert new domain 'test.com.': Error while retrieving SQLite query results: column name is not unique Nov 30 13:30:55 1 slave domain needs checking, 0 queued for AXFR Nov 30 13:30:55 Received serial number updates for 1 zone, had 0 timeouts Nov 30 13:30:55 Domain 'test.com' is stale, master serial 2005092501, our serial 0 Nov 30 13:30:55 Initiating transfer of 'test.com' from remote '127.0.0.1' Nov 30 13:30:55 No new unfresh slave domains, 0 queued for AXFR already, 1 in progress Nov 30 13:30:55 Starting AXFR of 'test.com' from remote 127.0.0.1:53 Nov 30 13:30:55 AXFR of domain 'test.com' initiated by 127.0.0.2 Nov 30 13:30:55 AXFR of domain 'test.com' allowed: TSIG signed request with authorized key 'tsig.com' and algorithm 'hmac-md5.sig-alg.reg.int' Nov 30 13:30:55 AXFR started for 'test.com' Nov 30 13:30:55 AXFR of domain 'test.com' to 127.0.0.2 finished Nov 30 13:30:55 AXFR of 'test.com' from remote 127.0.0.1:53 done Nov 30 13:30:55 Backend transaction started for 'test.com' storage Nov 30 13:30:55 AXFR done for 'test.com', zone committed with serial number 2005092501 Nov 30 13:30:55 Removed from notification list: 'test.com' to 127.0.0.2:53 (was acknowledged) Nov 30 13:30:55 Received unsuccessful notification report for 'example.com' from 127.0.0.2:53, error: Query Refused Nov 30 13:30:55 Removed from notification list: 'example.com' to 127.0.0.2:53 Query Refused Nov 30 13:30:55 Removed from notification list: 'test.com' to 127.0.0.2:53 (was acknowledged) Nov 30 13:30:55 Received spurious notify answer for 'test.com' from 127.0.0.2:53 Nov 30 13:30:55 Received unsuccessful notification report for 'test.com' from 127.0.0.2:53, error: Server Failure Nov 30 13:30:55 Received spurious notify answer for 'test.com' from 127.0.0.2:53 --- diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index 144047ef52..3a8f0d95d4 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -750,15 +750,7 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) TSIGRecordContent trc; DNSName tsigkeyname; dp.getTSIGDetails(&trc, &tsigkeyname); - int res; - res=P->trySuperMasterSynchronous(&dp, tsigkeyname); - if(res>=0) { - DNSPacket *r=dp.replyPacket(); - r->setRcode(res); - r->setOpcode(Opcode::Notify); - N->send(r); - delete r; - } + P->trySuperMasterSynchronous(&dp, tsigkeyname); // FIXME could use some error loging } if(rdomains.empty()) { // if we have priority domains, check them first B->getUnfreshSlaveInfos(&rdomains);