From: Bert Hubert Date: Fri, 13 Oct 2006 12:14:03 +0000 (+0000) Subject: Christian Kuehn discovered we send out the wrong TTL... X-Git-Tag: rec-3.1.4~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=232f8a721a4db04237281ac8a878066ddbd5c449;p=pdns Christian Kuehn discovered we send out the wrong TTL for SOA records during an AXFR, we previously used the 'default ttl'. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@902 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 6a9e5accc..eee283582 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -1,12 +1,11 @@ /* PowerDNS Versatile Database Driven Nameserver - Copyright (C) 2002-2005 PowerDNS.COM BV + Copyright (C) 2002-2006 PowerDNS.COM BV This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -320,7 +319,7 @@ int TCPNameserver::doAXFR(const string &target, DNSPacket *q, int outsock) PacketHandler P; // now open up a database connection, we'll need it sd.db=(DNSBackend *)-1; // force uncached answer - if(!P.getBackend()->getSOA(target,sd)) { + if(!P.getBackend()->getSOA(target, sd)) { L<setRcode(9); // 'NOTAUTH' sendDelPacket(outpacket,outsock); @@ -330,7 +329,7 @@ int TCPNameserver::doAXFR(const string &target, DNSPacket *q, int outsock) soa.qname=target; soa.qtype=QType::SOA; soa.content=DNSPacket::serializeSOAData(sd); - soa.ttl=sd.default_ttl; + soa.ttl=sd.ttl; soa.domain_id=sd.domain_id; soa.d_place=DNSResourceRecord::ANSWER;