Changeset 1299
- Timestamp:
- 11/18/08 13:58:43 (4 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
packethandler.cc (modified) (4 diffs)
-
sdig.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/packethandler.cc
r1289 r1299 181 181 { 182 182 DNSResourceRecord rr; 183 184 183 if(p->qtype.getCode()==QType::MX) // check if this domain has smtp service from us 185 184 return findMboxFW(p,r,target); … … 187 186 if(p->qtype.getCode()==QType::A) // search for a URL record for an A 188 187 return findUrl(p,r,target); 189 190 188 return 0; 191 189 } … … 661 659 if(mret==2) { // there is some data, but not of the correct type 662 660 r->clearRecords(); 661 662 if(d_doFancyRecords) { // MBOXFW, URL <- fake records, emulated with MX and A 663 DLOG(L<<"There is some data, but not of the correct type, checking fancy records"<<endl); 664 int res=doFancyRecords(p,r,target); 665 if(res) { // had a result 666 if(res<0) // it was an error 667 r->setRcode(RCode::ServFail); 668 goto sendit; 669 } 670 } 663 671 DLOG(L<<"There is some data, but not of the correct type, adding SOA for NXRECORDSET"<<endl); 664 672 SOAData sd; … … 679 687 goto sendit; // this might be the end of it (client requested a CNAME, or we found the answer already) 680 688 681 if(d_doFancyRecords) { // MBOXFW, URL <- fake records, emulated with MX and A682 int res=doFancyRecords(p,r,target);683 if(res) { // had a result684 if(res<0) // it was an error685 r->setRcode(RCode::ServFail);686 goto sendit;687 }688 }689 689 690 690 // now ready to start the real direct search -
trunk/pdns/pdns/sdig.cc
r1277 r1299 32 32 nrc2.toPacket(pw); 33 33 */ 34 34 /* 35 35 DNSPacketWriter::optvect_t opts; 36 36 string ping("hallo!"); … … 38 38 pw.addOpt(5200, 0, 0x8000, opts); 39 39 pw.commit(); 40 40 */ 41 41 Socket sock(InterNetwork, Datagram); 42 42 IPEndpoint dest(argv[1] + (*argv[1]=='@'), atoi(argv[2])); 43 44 43 sock.sendTo(string((char*)&*packet.begin(), (char*)&*packet.end()), dest); 45 44 … … 56 55 cout<<"\t"<<i->first.d_ttl<<"\t"<< i->first.d_content->getZoneRepresentation()<<"\n"; 57 56 } 58 57 #if 0 59 58 EDNSOpts edo; 60 59 if(getEDNSOpts(mdp, &edo)) { … … 72 71 73 72 } 73 #endif 74 74 } 75 75 catch(std::exception &e)