From: Bert Hubert Date: Mon, 3 Jan 2011 11:16:22 +0000 (+0000) Subject: used a non-existent database connection in tcp backend for signing (oops) X-Git-Tag: auth-3.0~450 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81589bcc6e4796ca189dfc215d7f35bc29f02719;p=pdns used a non-existent database connection in tcp backend for signing (oops) git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1797 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index a166888ad..7df6dfbe9 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -58,10 +58,10 @@ string DNSPacket::getString() return stringbuffer; } -const char *DNSPacket::getData(void) +const char *DNSPacket::getData(DNSSECKeeper* dk) { if(!d_wrapped) - wrapup(); + wrapup(dk); return stringbuffer.data(); } diff --git a/pdns/dnspacket.hh b/pdns/dnspacket.hh index aca04b93a..e11a87652 100644 --- a/pdns/dnspacket.hh +++ b/pdns/dnspacket.hh @@ -119,7 +119,7 @@ public: DTime d_dt; //!< the time this packet was created. replyPacket() copies this in for you, so d_dt becomes the time spent processing the question+answer void wrapup(DNSSECKeeper* dk=0); // writes out queued rrs, and generates the binary packet. also shuffles. also rectifies dnsheader 'd', and copies it to the stringbuffer - const char *getData(void); //!< get binary representation of packet, will call 'wrapup' for you + const char *getData(DNSSECKeeper* dk=0); //!< get binary representation of packet, will call 'wrapup' for you const char *getRaw(void); //!< provides access to the raw packet, possibly on a packet that has never been 'wrapped' void spoofQuestion(const string &qd); //!< paste in the exact right case of the question. Useful for PacketCache diff --git a/pdns/lwres.cc b/pdns/lwres.cc index 71dbf288a..c804f9e2e 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -186,7 +186,6 @@ int asyncresolve(const ComboAddress& ip, const string& domain, int type, bool do rr.priority = 0; rr.qtype=i->first.d_type; rr.qname=i->first.d_label; - rr.ttl=i->first.d_ttl; rr.content=i->first.d_content->getZoneRepresentation(); // this should be the serialised form rr.d_place=(DNSResourceRecord::Place) i->first.d_place; diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 994b00cbf..67572d894 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -531,7 +531,7 @@ void PacketHandler::emitNSEC3(const NSEC3PARAMRecordContent& ns3prc, const std:: void PacketHandler::addNSECX(DNSPacket *p, DNSPacket *r, const string& target, const string& auth, int mode) { NSEC3PARAMRecordContent ns3rc; - cerr<<"Doing NSEC3PARAM lookup for '"<qdomain<<"|"<qtype.getName()<<": "; if(d_dk.getNSEC3PARAM(auth, &ns3rc)) { cerr<<"Present"<remote.toString() <<" wants a type " << p->qtype.getName() << " ("<qtype.getCode()<<") about '"<qdomain << "'" << endl); + L << Logger::Notice<<"Remote "<< p->remote.toString() <<" wants a type " << p->qtype.getName() << " ("<qtype.getCode()<<") about '"<qdomain << "'" << endl; if(p->d.qr) { // QR bit from dns packet (thanks RA from N) L<getRemote()<<", dropping"< p, int outsock) { - const char *buf=p->getData(); + DNSSECKeeper dk; + const char *buf=p->getData(&dk); uint16_t len=htons(p->len); writenWithTimeout(outsock, &len, 2); writenWithTimeout(outsock, buf, p->len);