[Pdns-users] IXFR with EDIT-SOA, ALLOW-AXFR-FROM in bind-hybrid mode
Christof Meerwald
cmeerw at cmeerw.org
Thu Oct 16 11:26:21 UTC 2014
On Thu, Oct 16, 2014 at 10:42:34AM +0200, Christof Meerwald wrote:
> I just noticed that IXFRs appear to be broken when using EDIT-SOA in
> 3.4.0 - it looks like "rfc1982LessThan(serial, sd.serial)" compares
> the un-edited SOA from the zone and therefore doesn't send any data
> back to the client.
the following change seems to fix this for me:
Index: pdns/tcpreceiver.cc
===================================================================
--- pdns/tcpreceiver.cc (revision 6176)
+++ pdns/tcpreceiver.cc (working copy)
@@ -1008,6 +1008,11 @@
sendPacket(outpacket,outsock);
return 0;
}
+
+ string kind;
+ dk.getFromMeta(target, "SOA-EDIT", kind);
+ sd.serial = calculateEditSOA(sd, kind);
+
if (!rfc1982LessThan(serial, sd.serial)) {
TSIGRecordContent trc;
string tsigkeyname, tsigsecret;
@@ -1030,7 +1035,6 @@
DLOG(L<<"Sending out SOA"<<endl);
DNSResourceRecord soa = makeDNSRRFromSOAData(sd);
outpacket->addRecord(soa);
- editSOA(dk, sd.qname, outpacket.get());
if(securedZone) {
set<string, CIStringCompare> authSet;
authSet.insert(target);
Christof
--
http://cmeerw.org sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org xmpp:cmeerw at cmeerw.org
More information about the Pdns-users
mailing list