]> granicus.if.org Git - pdns/commitdiff
used a non-existent database connection in tcp backend for signing (oops)
authorBert Hubert <bert.hubert@netherlabs.nl>
Mon, 3 Jan 2011 11:16:22 +0000 (11:16 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Mon, 3 Jan 2011 11:16:22 +0000 (11:16 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1797 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnspacket.cc
pdns/dnspacket.hh
pdns/lwres.cc
pdns/packethandler.cc
pdns/tcpreceiver.cc

index a166888ad1e33841f56c9390f0cd0848b38ac196..7df6dfbe941e4d56d2ea80bdea36984b4d54c6cf 100644 (file)
@@ -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();
 }
index aca04b93a4212089d3e2ae0444013e782bd25f86..e11a876524024ec96048893222be5ce25ea04c0f 100644 (file)
@@ -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
index 71dbf288acd643d03ac7712570b83ec8ff8431b4..c804f9e2e0588b4ca193e22a651e40609d937393 100644 (file)
@@ -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;
index 994b00cbf72bb91836516727d3c99c955156a40c..67572d89494326abcfe5e560504857a3223e3295 100644 (file)
@@ -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 '"<<auth<<"': ";
+  cerr<<"Doing NSEC3PARAM lookup for '"<<auth<<"', "<<p->qdomain<<"|"<<p->qtype.getName()<<": ";
   if(d_dk.getNSEC3PARAM(auth, &ns3rc))  {
     cerr<<"Present"<<endl;
     addNSEC3(p, r, target, auth, ns3rc, mode);
@@ -1077,7 +1077,7 @@ DNSPacket *PacketHandler::questionOrRecurse(DNSPacket *p, bool *shouldRecurse)
 
   DNSPacket *r=0;
   try {    
-    DLOG(L << Logger::Notice<<"Remote "<< p->remote.toString() <<" wants a type " << p->qtype.getName() << " ("<<p->qtype.getCode()<<") about '"<<p->qdomain << "'" << endl);
+    L << Logger::Notice<<"Remote "<< p->remote.toString() <<" wants a type " << p->qtype.getName() << " ("<<p->qtype.getCode()<<") about '"<<p->qdomain << "'" << endl;
 
     if(p->d.qr) { // QR bit from dns packet (thanks RA from N)
       L<<Logger::Error<<"Received an answer (non-query) packet from "<<p->getRemote()<<", dropping"<<endl;
index 462a1c6b9838ebc65e0d403a467d4ca561bf1dcd..6d4bf52583fe7b35d0862dcce8d3027dcdbd7794 100644 (file)
@@ -174,7 +174,8 @@ void connectWithTimeout(int fd, struct sockaddr* remote, size_t socklen)
 
 void TCPNameserver::sendPacket(shared_ptr<DNSPacket> 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);