safePutBBDomainInfo(bbd);
- L<<Logger::Warning<<"Zone "<<domainname.toString()<< " loaded"<<endl;
+ L<<Logger::Warning<<"Zone "<<domainname<< " loaded"<<endl;
return "Loaded zone " + domainname.toStringNoDot() + " from " + filename;
}
{
if(!(maxent))
{
- L<<Logger::Error<<"Zone '"<<bbd.d_name.toString()<<"' has too many empty non terminals."<<endl;
+ L<<Logger::Error<<"Zone '"<<bbd.d_name<<"' has too many empty non terminals."<<endl;
doent=false;
break;
}
++i)
{
if(i->type!="master" && i->type!="slave") {
- L<<Logger::Warning<<d_logprefix<<" Warning! Skipping '"<<i->type<<"' zone '"<<i->name.toString()<<"'"<<endl;
+ L<<Logger::Warning<<d_logprefix<<" Warning! Skipping '"<<i->type<<"' zone '"<<i->name<<"'"<<endl;
continue;
}
newnames.insert(bbd.d_name);
if(filenameChanged || !bbd.d_loaded || !bbd.current()) {
- L<<Logger::Info<<d_logprefix<<" parsing '"<<i->name.toString()<<"' from file '"<<i->filename<<"'"<<endl;
+ L<<Logger::Info<<d_logprefix<<" parsing '"<<i->name<<"' from file '"<<i->filename<<"'"<<endl;
try {
parseZoneFile(&bbd);
parseZoneFile(&bbold);
bbold.d_checknow=false;
safePutBBDomainInfo(bbold);
- L<<Logger::Warning<<"Zone '"<<bbold.d_name.toString()<<"' ("<<bbold.d_filename<<") reloaded"<<endl;
+ L<<Logger::Warning<<"Zone '"<<bbold.d_name<<"' ("<<bbold.d_filename<<") reloaded"<<endl;
}
catch(PDNSException &ae) {
ostringstream msg;
static bool mustlog=::arg().mustDo("query-logging");
if(mustlog)
- L<<Logger::Warning<<"Lookup for '"<<qtype.getName()<<"' of '"<<domain.toString()<<"'"<<endl;
+ L<<Logger::Warning<<"Lookup for '"<<qtype.getName()<<"' of '"<<domain<<"'"<<endl;
bool found=false;
BB2DomainInfo bbd;
}
if(mustlog)
- L<<Logger::Warning<<"Found a zone '"<<domain.toString()<<"' (with id " << bbd.d_id<<") that might contain data "<<endl;
+ L<<Logger::Warning<<"Found a zone '"<<domain<<"' (with id " << bbd.d_id<<") that might contain data "<<endl;
d_handle.id=bbd.d_id;
DLOG(L<<"Bind2Backend constructing handle for search for "<<qtype.getName()<<" for "<<
- qname.toString()<<endl);
+ qname<<endl);
if(domain.empty())
d_handle.qname=qname;
}
if(!bbd.current()) {
- L<<Logger::Warning<<"Zone '"<<bbd.d_name.toString()<<"' ("<<bbd.d_filename<<") needs reloading"<<endl;
+ L<<Logger::Warning<<"Zone '"<<bbd.d_name<<"' ("<<bbd.d_filename<<") needs reloading"<<endl;
queueReloadAndStore(bbd.d_id);
if (!safeGetBBDomainInfo(domain, &bbd))
throw DBException("Zone '"+bbd.d_name.toString()+"' ("+bbd.d_filename+") gone after reload"); // if we don't throw here, we crash for some reason
return false;
}
if(d_handle.mustlog)
- L<<Logger::Warning<<"Returning: '"<<r.qtype.getName()<<"' of '"<<r.qname.toString()<<"', content: '"<<r.content<<"'"<<endl;
+ L<<Logger::Warning<<"Returning: '"<<r.qtype.getName()<<"' of '"<<r.qname<<"', content: '"<<r.content<<"'"<<endl;
return true;
}
bool Bind2Backend::handle::get_normal(DNSResourceRecord &r)
{
DLOG(L << "Bind2Backend get() was called for "<<qtype.getName() << " record for '"<<
- qname.toString()<<"' - "<<d_records->size()<<" available in total!"<<endl);
+ qname<<"' - "<<d_records->size()<<" available in total!"<<endl);
if(d_iter==d_end_iter) {
return false;
}
while(d_iter!=d_end_iter && !(qtype.getCode()==QType::ANY || (d_iter)->qtype==qtype.getCode())) {
- DLOG(L<<Logger::Warning<<"Skipped "<<qname.toString()<<"/"<<QType(d_iter->qtype).getName()<<": '"<<d_iter->content<<"'"<<endl);
+ DLOG(L<<Logger::Warning<<"Skipped "<<qname<<"/"<<QType(d_iter->qtype).getName()<<": '"<<d_iter->content<<"'"<<endl);
d_iter++;
}
if(d_iter==d_end_iter) {
string key=simpleCompress(queryDomain);
- DLOG(L<<Logger::Debug<<backendname<<"[lookup] query for qtype ["<<qtype.getName()<<"] qdomain ["<<qdomain.toString()<<"]"<<endl);
+ DLOG(L<<Logger::Debug<<backendname<<"[lookup] query for qtype ["<<qtype.getName()<<"] qdomain ["<<qdomain<<"]"<<endl);
DLOG(L<<Logger::Debug<<"[lookup] key ["<<makeHexDump(key)<<"]"<<endl);
d_isWildcardQuery = false;
try {
SOAData sd;
if(!getSOA(domain, sd))
- L<<Logger::Notice<<"No serial for '"<<domain.toString()<<"' found - zone is missing?"<<endl;
+ L<<Logger::Notice<<"No serial for '"<<domain<<"' found - zone is missing?"<<endl;
else
di.serial = sd.serial;
}
catch(PDNSException &ae){
- L<<Logger::Error<<"Error retrieving serial for '"<<domain.toString()<<"': "<<ae.reason<<endl;
+ L<<Logger::Error<<"Error retrieving serial for '"<<domain<<"': "<<ae.reason<<endl;
}
di.kind = DomainInfo::stringToKind(type);
remote = P->getRemote() + "<-" + P->getRealRemote().toString();
else
remote = P->getRemote();
- L << Logger::Notice<<"Remote "<< remote <<" wants '" << P->qdomain.toString()<<"|"<<P->qtype.getName() <<
+ L << Logger::Notice<<"Remote "<< remote <<" wants '" << P->qdomain<<"|"<<P->qtype.getName() <<
"', do = " <<P->d_dnssecOk <<", bufsize = "<< P->getMaxReplyLen()<<": ";
}
delete tmp;
if (ns3p->d_iterations > maxNSEC3Iterations) {
ns3p->d_iterations = maxNSEC3Iterations;
- L<<Logger::Error<<"Number of NSEC3 iterations for zone '"<<zname.toString()<<"' is above 'max-nsec3-iterations'. Value adjusted to: "<<maxNSEC3Iterations<<endl;
+ L<<Logger::Error<<"Number of NSEC3 iterations for zone '"<<zname<<"' is above 'max-nsec3-iterations'. Value adjusted to: "<<maxNSEC3Iterations<<endl;
}
}
if(narrow) {
}
if(!sd.serial) { // magic time!
- DLOG(L<<Logger::Warning<<"Doing SOA serial number autocalculation for "<<rr.qname.toString()<<endl);
+ DLOG(L<<Logger::Warning<<"Doing SOA serial number autocalculation for "<<rr.qname<<endl);
time_t serial;
if (calculateSOASerial(domain, sd, serial)) {
sd.serial = serial;
//DLOG(L<<"autocalculated soa serialnumber for "<<rr.qname<<" is "<<newest<<endl);
} else {
- DLOG(L<<"soa serialnumber calculation failed for "<<rr.qname.toString()<<endl);
+ DLOG(L<<"soa serialnumber calculation failed for "<<rr.qname<<endl);
}
}
time_t newest=0;
if(!(this->list(domain, sd.domain_id))) {
- DLOG(L<<Logger::Warning<<"Backend error trying to determine magic serial number of zone '"<<domain.toString()<<"'"<<endl);
+ DLOG(L<<Logger::Warning<<"Backend error trying to determine magic serial number of zone '"<<domain<<"'"<<endl);
return false;
}
* presumably quicker to just substring the zone down to size */
soa->qname = inZone.substr( inZone.length() - foundkey.length(), string::npos );
- DLOG(L<<Logger::Error<<"Successfully got record: " <<foundkey << " : " << querykey.substr( 0, foundkey.length() ) << " : " << soa->qname.toString()<<endl);
+ DLOG(L<<Logger::Error<<"Successfully got record: " <<foundkey << " : " << querykey.substr( 0, foundkey.length() ) << " : " << soa->qname<<endl);
return GET_AUTH_SUCCESS;
}
q->getTSIGDetails(trc, keyname, &message);
int64_t now = time(0);
if(abs((int64_t)trc->d_time - now) > trc->d_fudge) {
- L<<Logger::Error<<"Packet for '"<<q->qdomain.toString()<<"' denied: TSIG (key '"<<keyname->toString()<<"') time delta "<< abs(trc->d_time - now)<<" > 'fudge' "<<trc->d_fudge<<endl;
+ L<<Logger::Error<<"Packet for '"<<q->qdomain<<"' denied: TSIG (key '"<<*keyname<<"') time delta "<< abs(trc->d_time - now)<<" > 'fudge' "<<trc->d_fudge<<endl;
return false;
}
string secret64;
if(!B->getTSIGKey(*keyname, &algoName, &secret64)) {
- L<<Logger::Error<<"Packet for domain '"<<q->qdomain.toString()<<"' denied: can't find TSIG key with name '"<<keyname->toString()<<"' and algorithm '"<<algoName.toString()<<"'"<<endl;
+ L<<Logger::Error<<"Packet for domain '"<<q->qdomain<<"' denied: can't find TSIG key with name '"<<*keyname<<"' and algorithm '"<<algoName<<"'"<<endl;
return false;
}
if (trc->d_algoName == "hmac-md5")
B64Decode(secret64, *secret);
bool result=calculateHMAC(*secret, message, algo) == trc->d_mac;
if(!result) {
- L<<Logger::Error<<"Packet for domain '"<<q->qdomain.toString()<<"' denied: TSIG signature mismatch using '"<<keyname->toString()<<"' and algorithm '"<<trc->d_algoName.toString()<<"'"<<endl;
+ L<<Logger::Error<<"Packet for domain '"<<q->qdomain<<"' denied: TSIG signature mismatch using '"<<*keyname<<"' and algorithm '"<<trc->d_algoName<<"'"<<endl;
}
return result;
if(p.qtype.getCode() != i->second.qtype || p.qdomain != i->second.qname) {
L<<Logger::Error<<"Discarding packet from recursor backend with id "<<(d.id^d_xor)<<
- ", qname or qtype mismatch ("<<p.qtype.getCode()<<" v " <<i->second.qtype<<", "<<p.qdomain.toString()<<" v "<<i->second.qname.toString()<<")"<<endl;
+ ", qname or qtype mismatch ("<<p.qtype.getCode()<<" v " <<i->second.qtype<<", "<<p.qdomain<<" v "<<i->second.qname<<")"<<endl;
continue;
}
string tmp_mac;
GssContext gssctx(context.toStringNoDot());
if (!gssctx.valid()) {
- L<<Logger::Error<<"GSS context '"<<context.toString()<<"' is not valid"<<endl;
+ L<<Logger::Error<<"GSS context '"<<context<<"' is not valid"<<endl;
BOOST_FOREACH(const string& error, gssctx.getErrorStrings()) {
L<<Logger::Error<<"GSS error: "<<error<<endl;;
}
}
if (!gssctx.sign(message, tmp_mac)) {
- L<<Logger::Error<<"Could not sign message using GSS context '"<<context.toString()<<"'"<<endl;
+ L<<Logger::Error<<"Could not sign message using GSS context '"<<context<<"'"<<endl;
BOOST_FOREACH(const string& error, gssctx.getErrorStrings()) {
L<<Logger::Error<<"GSS error: "<<error<<endl;;
}
bool gss_verify_signature(const DNSName& context, const std::string& message, const std::string& mac) {
GssContext gssctx(context.toStringNoDot());
if (!gssctx.valid()) {
- L<<Logger::Error<<"GSS context '"<<context.toString()<<"' is not valid"<<endl;
+ L<<Logger::Error<<"GSS context '"<<context<<"' is not valid"<<endl;
BOOST_FOREACH(const string& error, gssctx.getErrorStrings()) {
L<<Logger::Error<<"GSS error: "<<error<<endl;;
}
}
if (!gssctx.verify(message, mac)) {
- L<<Logger::Error<<"Could not verify message using GSS context '"<<context.toString()<<"'"<<endl;
+ L<<Logger::Error<<"Could not verify message using GSS context '"<<context<<"'"<<endl;
BOOST_FOREACH(const string& error, gssctx.getErrorStrings()) {
L<<Logger::Error<<"GSS error: "<<error<<endl;;
}
for(set<string>::const_iterator j=nsset.begin();j!=nsset.end();++j) {
vector<string> nsips=fns.lookup(*j, B);
if(nsips.empty())
- L<<Logger::Warning<<"Unable to queue notification of domain '"<<domain.toString()<<"': nameservers do not resolve!"<<endl;
+ L<<Logger::Warning<<"Unable to queue notification of domain '"<<domain<<"': nameservers do not resolve!"<<endl;
else
for(vector<string>::const_iterator k=nsips.begin();k!=nsips.end();++k) {
const ComboAddress caIp(*k, 53);
if(!d_preventSelfNotification || !AddressIsUs(caIp)) {
if(!d_onlyNotify.match(&caIp))
- L<<Logger::Info<<"Skipped notification of domain '"<<domain.toString()<<"' to "<<*j<<" because it does not match only-notify."<<endl;
+ L<<Logger::Info<<"Skipped notification of domain '"<<domain<<"' to "<<*j<<" because it does not match only-notify."<<endl;
else
ips.insert(caIp.toStringWithPort());
}
}
for(set<string>::const_iterator j=ips.begin();j!=ips.end();++j) {
- L<<Logger::Warning<<"Queued notification of domain '"<<domain.toString()<<"' to "<<*j<<endl;
+ L<<Logger::Warning<<"Queued notification of domain '"<<domain<<"' to "<<*j<<endl;
d_nq.add(domain,*j);
hasQueuedItem=true;
}
for(set<string>::const_iterator j=alsoNotify.begin();j!=alsoNotify.end();++j) {
try {
const ComboAddress caIp(*j, 53);
- L<<Logger::Warning<<"Queued also-notification of domain '"<<domain.toString()<<"' to "<<caIp.toStringWithPort()<<endl;
+ L<<Logger::Warning<<"Queued also-notification of domain '"<<domain<<"' to "<<caIp.toStringWithPort()<<endl;
if (!ips.count(caIp.toStringWithPort())) {
ips.insert(caIp.toStringWithPort());
d_nq.add(domain, caIp.toStringWithPort());
hasQueuedItem=true;
}
catch(PDNSException &e) {
- L<<Logger::Warning<<"Unparseable IP in ALSO-NOTIFY metadata of domain '"<<domain.toString()<<"'. Warning: "<<e.reason<<endl;
+ L<<Logger::Warning<<"Unparseable IP in ALSO-NOTIFY metadata of domain '"<<domain<<"'. Warning: "<<e.reason<<endl;
}
}
if (!hasQueuedItem)
- L<<Logger::Warning<<"Request to queue notification for domain '"<<domain.toString()<<"' was processed, but no valid nameservers or ALSO-NOTIFYs found. Not notifying!"<<endl;
+ L<<Logger::Warning<<"Request to queue notification for domain '"<<domain<<"' was processed, but no valid nameservers or ALSO-NOTIFYs found. Not notifying!"<<endl;
}
DomainInfo di;
UeberBackend B;
if(!B.getDomainInfo(domain, di)) {
- L<<Logger::Error<<"No such domain '"<<domain.toString()<<"' in our database"<<endl;
+ L<<Logger::Error<<"No such domain '"<<domain<<"' in our database"<<endl;
return false;
}
queueNotifyDomain(domain, &B);
}
if(p.d.rcode)
- L<<Logger::Warning<<"Received unsuccessful notification report for '"<<p.qdomain.toString()<<"' from "<<from.toStringWithPort()<<", error: "<<RCode::to_s(p.d.rcode)<<endl;
+ L<<Logger::Warning<<"Received unsuccessful notification report for '"<<p.qdomain<<"' from "<<from.toStringWithPort()<<", error: "<<RCode::to_s(p.d.rcode)<<endl;
if(d_nq.removeIf(from.toStringWithPort(), p.d.id, p.qdomain))
- L<<Logger::Warning<<"Removed from notification list: '"<<p.qdomain.toString()<<"' to "<<from.toStringWithPort()<<" "<< (p.d.rcode ? RCode::to_s(p.d.rcode) : "(was acknowledged)")<<endl;
+ L<<Logger::Warning<<"Removed from notification list: '"<<p.qdomain<<"' to "<<from.toStringWithPort()<<" "<< (p.d.rcode ? RCode::to_s(p.d.rcode) : "(was acknowledged)")<<endl;
else {
- L<<Logger::Warning<<"Received spurious notify answer for '"<<p.qdomain.toString()<<"' from "<< from.toStringWithPort()<<endl;
+ L<<Logger::Warning<<"Received spurious notify answer for '"<<p.qdomain<<"' from "<< from.toStringWithPort()<<endl;
//d_nq.dump();
}
}
}
}
else
- L<<Logger::Error<<Logger::NTLog<<"Notification for "<<domain.toString()<<" to "<<ip<<" failed after retries"<<endl;
+ L<<Logger::Error<<Logger::NTLog<<"Notification for "<<domain<<" to "<<ip<<" failed after retries"<<endl;
}
return d_nq.earliest();
DNSName prefix;
DNSName subdomain(target);
do {
- DLOG(L<<"Attempting DNAME lookup for "<<subdomain.toString()<<", sd.qname="<<sd.qname.toString()<<endl);
+ DLOG(L<<"Attempting DNAME lookup for "<<subdomain<<", sd.qname="<<sd.qname<<endl);
B.lookup(QType(QType::DNAME), subdomain, p, sd.domain_id);
while(B.get(rr)) {
}
while(B.get(rr)) {
if(rr.domain_id!=i->domain_id && ::arg()["out-of-zone-additional-processing"]=="no") {
- DLOG(L<<Logger::Warning<<"Not including out-of-zone additional processing of "<<i->qname.toString()<<" ("<<rr.qname.toString()<<")"<<endl);
+ DLOG(L<<Logger::Warning<<"Not including out-of-zone additional processing of "<<i->qname<<" ("<<rr.qname<<")"<<endl);
continue; // not adding out-of-zone additional data
}
if(rr.auth && !rr.qname.isPartOf(soadata.qname)) // don't sign out of zone data using the main key
void PacketHandler::addNSEC3(DNSPacket *p, DNSPacket *r, const DNSName& target, const DNSName& wildcard, const DNSName& auth, const NSEC3PARAMRecordContent& ns3rc, bool narrow, int mode)
{
- DLOG(L<<"addNSEC3() mode="<<mode<<" auth="<<auth.toString()<<" target="<<target.toString()<<" wildcard="<<wildcard.toString()<<endl);
+ DLOG(L<<"addNSEC3() mode="<<mode<<" auth="<<auth<<" target="<<target<<" wildcard="<<wildcard<<endl);
SOAData sd;
if(!B.getSOAUncached(auth, sd)) {
if (mode != 3) {
unhashed=(mode == 0 || mode == 1 || mode == 5) ? target : closest;
hashed=hashQNameWithSalt(ns3rc.d_iterations, ns3rc.d_salt, unhashed);
- DLOG(L<<"1 hash: "<<toBase32Hex(hashed)<<" "<<unhashed.toString()<<endl);
+ DLOG(L<<"1 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
// if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr))
getNSEC3Hashes(narrow, sd.db, sd.domain_id, hashed, false, unhashed, before, after, mode);
doNextcloser = true;
unhashed=closest;
hashed=hashQNameWithSalt(ns3rc.d_iterations, ns3rc.d_salt, unhashed);
- DLOG(L<<"1 hash: "<<toBase32Hex(hashed)<<" "<<unhashed.toString()<<endl);
+ DLOG(L<<"1 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
// if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr))
getNSEC3Hashes(narrow, sd.db, sd.domain_id, hashed, false, unhashed, before, after);
while( next.chopOff() && !pdns_iequals(next, closest));
hashed=hashQNameWithSalt(ns3rc.d_iterations, ns3rc.d_salt, unhashed);
- DLOG(L<<"2 hash: "<<toBase32Hex(hashed)<<" "<<unhashed.toString()<<endl);
+ DLOG(L<<"2 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
// if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr)) {
getNSEC3Hashes(narrow, sd.db,sd.domain_id, hashed, true, unhashed, before, after);
DLOG(L<<"Done calling for covering, hashed: '"<<toBase32Hex(hashed)<<"' before='"<<toBase32Hex(before)<<"', after='"<<toBase32Hex(after)<<"'"<<endl);
unhashed=DNSName("*")+closest;
hashed=hashQNameWithSalt(ns3rc.d_iterations, ns3rc.d_salt, unhashed);
- DLOG(L<<"3 hash: "<<toBase32Hex(hashed)<<" "<<unhashed.toString()<<endl);
+ DLOG(L<<"3 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
// if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr)) {
getNSEC3Hashes(narrow, sd.db, sd.domain_id, hashed, (mode != 2), unhashed, before, after);
void PacketHandler::addNSEC(DNSPacket *p, DNSPacket *r, const DNSName& target, const DNSName& wildcard, const DNSName& auth, int mode)
{
- DLOG(L<<"addNSEC() mode="<<mode<<" auth="<<auth.toString()<<" target="<<target.toString()<<" wildcard="<<wildcard.toString()<<endl);
+ DLOG(L<<"addNSEC() mode="<<mode<<" auth="<<auth<<" target="<<target<<" wildcard="<<wildcard<<endl);
SOAData sd;
if(!B.getSOAUncached(auth, sd)) {
resolver.resolve(p->getRemote(), p->qdomain, QType::NS, &nsset);
}
catch(ResolverException &re) {
- L<<Logger::Error<<"Error resolving SOA or NS for "<<p->qdomain.toString()<<" at: "<< p->getRemote() <<": "<<re.reason<<endl;
+ L<<Logger::Error<<"Error resolving SOA or NS for "<<p->qdomain<<" at: "<< p->getRemote() <<": "<<re.reason<<endl;
return RCode::ServFail;
}
}
if(!haveNS) {
- L<<Logger::Error<<"While checking for supermaster, did not find NS for "<<p->qdomain.toString()<<" at: "<< p->getRemote()<<endl;
+ L<<Logger::Error<<"While checking for supermaster, did not find NS for "<<p->qdomain<<" at: "<< p->getRemote()<<endl;
return RCode::ServFail;
}
string nameserver, account;
DNSBackend *db;
if(!B.superMasterBackend(p->getRemote(), p->qdomain, nsset, &nameserver, &account, &db)) {
- L<<Logger::Error<<"Unable to find backend willing to host "<<p->qdomain.toString()<<" for potential supermaster "<<p->getRemote()<<". Remote nameservers: "<<endl;
+ L<<Logger::Error<<"Unable to find backend willing to host "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<". Remote nameservers: "<<endl;
BOOST_FOREACH(class DNSResourceRecord& rr, nsset) {
if(rr.qtype.getCode()==QType::NS)
L<<Logger::Error<<rr.content<<endl;
db->createSlaveDomain(p->getRemote(), p->qdomain, nameserver, account);
}
catch(PDNSException& ae) {
- L<<Logger::Error<<"Database error trying to create "<<p->qdomain.toString()<<" for potential supermaster "<<p->getRemote()<<": "<<ae.reason<<endl;
+ L<<Logger::Error<<"Database error trying to create "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<": "<<ae.reason<<endl;
return RCode::ServFail;
}
- L<<Logger::Warning<<"Created new slave zone '"<<p->qdomain.toString()<<"' from supermaster "<<p->getRemote()<<endl;
+ L<<Logger::Warning<<"Created new slave zone '"<<p->qdomain<<"' from supermaster "<<p->getRemote()<<endl;
return RCode::NoError;
}
if master is higher -> do stuff
*/
if(!::arg().mustDo("slave")) {
- L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain.toString()<<" from "<<p->getRemote()<<" but slave support is disabled in the configuration"<<endl;
+ L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain<<" from "<<p->getRemote()<<" but slave support is disabled in the configuration"<<endl;
return RCode::NotImp;
}
if(!s_allowNotifyFrom.match((ComboAddress *) &p->d_remote )) {
- L<<Logger::Notice<<"Received NOTIFY for "<<p->qdomain.toString()<<" from "<<p->getRemote()<<" but remote is not in allow-notify-from"<<endl;
+ L<<Logger::Notice<<"Received NOTIFY for "<<p->qdomain<<" from "<<p->getRemote()<<" but remote is not in allow-notify-from"<<endl;
return RCode::Refused;
}
DomainInfo di;
di.serial = 0;
if(!B.getDomainInfo(p->qdomain, di) || !(db=di.backend)) {
- L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain.toString()<<" from "<<p->getRemote()<<" for which we are not authoritative"<<endl;
+ L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain<<" from "<<p->getRemote()<<" for which we are not authoritative"<<endl;
return trySuperMaster(p);
}
if(::arg().contains("trusted-notification-proxy", p->getRemote())) {
- L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain.toString()<<" from trusted-notification-proxy "<< p->getRemote()<<endl;
+ L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain<<" from trusted-notification-proxy "<< p->getRemote()<<endl;
if(di.masters.empty()) {
- L<<Logger::Error<<"However, "<<p->qdomain.toString()<<" does not have any masters defined"<<endl;
+ L<<Logger::Error<<"However, "<<p->qdomain<<" does not have any masters defined"<<endl;
return RCode::Refused;
}
}
else if(!db->isMaster(p->qdomain, p->getRemote())) {
- L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain.toString()<<" from "<<p->getRemote()<<" which is not a master"<<endl;
+ L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain<<" from "<<p->getRemote()<<" which is not a master"<<endl;
return RCode::Refused;
}
if(rrset.empty())
return false;
- DLOG(L<<"The best NS is: "<<rrset.begin()->qname.toString()<<endl);
+ DLOG(L<<"The best NS is: "<<rrset.begin()->qname<<endl);
BOOST_FOREACH(DNSResourceRecord rr, rrset) {
DLOG(L<<"\tadding '"<<rr.content<<"'"<<endl);
rr.d_place=DNSResourceRecord::AUTHORITY;
nodata=true;
}
else {
- DLOG(L<<"The best wildcard match: "<<rrset.begin()->qname.toString()<<endl);
+ DLOG(L<<"The best wildcard match: "<<rrset.begin()->qname<<endl);
BOOST_FOREACH(DNSResourceRecord rr, rrset) {
rr.wildcardname = rr.qname;
rr.qname=bestmatch=target;
if (p->d_tsig_algo == TSIG_GSS) {
GssContext gssctx(keyname.toStringNoDot());
if (!gssctx.getPeerPrincipal(p->d_peer_principal)) {
- L<<Logger::Warning<<"Failed to extract peer principal from GSS context with keyname '"<<keyname.toString()<<"'"<<endl;
+ L<<Logger::Warning<<"Failed to extract peer principal from GSS context with keyname '"<<keyname<<"'"<<endl;
}
}
}
// if(!validDNSName(p->qdomain)) {
// if(d_logDNSDetails)
- // L<<Logger::Error<<"Received a malformed qdomain from "<<p->getRemote()<<", '"<<p->qdomain.toString()<<"': sending servfail"<<endl;
+ // L<<Logger::Error<<"Received a malformed qdomain from "<<p->getRemote()<<", '"<<p->qdomain<<"': sending servfail"<<endl;
// S.inc("corrupt-packets");
// S.ringAccount("remotes-corrupt", p->d_remote);
// S.inc("servfail-packets");
return 0;
}
- L<<Logger::Error<<"Received an unknown opcode "<<p->d.opcode<<" from "<<p->getRemote()<<" for "<<p->qdomain.toString()<<endl;
+ L<<Logger::Error<<"Received an unknown opcode "<<p->d.opcode<<" from "<<p->getRemote()<<" for "<<p->qdomain<<endl;
r->setRcode(RCode::NotImp);
return r;
}
- // L<<Logger::Warning<<"Query for '"<<p->qdomain.toString()<<"' "<<p->qtype.getName()<<" from "<<p->getRemote()<< " (tcp="<<p->d_tcp<<")"<<endl;
+ // L<<Logger::Warning<<"Query for '"<<p->qdomain<<"' "<<p->qtype.getName()<<" from "<<p->getRemote()<< " (tcp="<<p->d_tcp<<")"<<endl;
r->d.ra = (p->d.rd && d_doRecursion && DP->recurseFor(p)); // make sure we set ra if rd was set, and we'll do it
retargeted:;
if(retargetcount > 10) { // XXX FIXME, retargetcount++?
- L<<Logger::Warning<<"Abort CNAME chain resolution after "<<--retargetcount<<" redirects, sending out servfail. Initial query: '"<<p->qdomain.toString()<<"'"<<endl;
+ L<<Logger::Warning<<"Abort CNAME chain resolution after "<<--retargetcount<<" redirects, sending out servfail. Initial query: '"<<p->qdomain<<"'"<<endl;
delete r;
r=p->replyPacket();
r->setRcode(RCode::ServFail);
}
if(!B.getAuth(p, &sd, target)) {
- DLOG(L<<Logger::Error<<"We have no authority over zone '"<<target.toString()<<"'"<<endl);
+ DLOG(L<<Logger::Error<<"We have no authority over zone '"<<target<<"'"<<endl);
if(r->d.ra) {
DLOG(L<<Logger::Error<<"Recursion is available for this remote, doing that"<<endl);
*shouldRecurse=true;
}
goto sendit;
}
- DLOG(L<<Logger::Error<<"We have authority, zone='"<<sd.qname.toString()<<"', id="<<sd.domain_id<<endl);
+ DLOG(L<<Logger::Error<<"We have authority, zone='"<<sd.qname<<"', id="<<sd.domain_id<<endl);
authSet.insert(sd.qname);
if(!retargetcount) r->qdomainzone=sd.qname;
// this TRUMPS a cname!
if(p->qtype.getCode() == QType::RRSIG) {
- L<<Logger::Info<<"Direct RRSIG query for "<<target.toString()<<" from "<<p->getRemote()<<endl;
+ L<<Logger::Info<<"Direct RRSIG query for "<<target<<" from "<<p->getRemote()<<endl;
r->setRcode(RCode::NotImp);
goto sendit;
}
}
- DLOG(L<<"After first ANY query for '"<<target.toString()<<"', id="<<sd.domain_id<<": weDone="<<weDone<<", weHaveUnauth="<<weHaveUnauth<<", weRedirected="<<weRedirected<<", haveAlias='"<<haveAlias.toString()<<"'"<<endl);
+ DLOG(L<<"After first ANY query for '"<<target<<"', id="<<sd.domain_id<<": weDone="<<weDone<<", weHaveUnauth="<<weHaveUnauth<<", weRedirected="<<weRedirected<<", haveAlias='"<<haveAlias<<"'"<<endl);
if(p->qtype.getCode() == QType::DS && weHaveUnauth && !weDone && !weRedirected && d_dk.isSecuredZone(sd.qname)) {
DLOG(L<<"Q for DS of a name for which we do have NS, but for which we don't have on a zone with DNSSEC need to provide an AUTH answer that proves we don't"<<endl);
makeNOError(p, r, target, "", sd, 1);
}
if(!haveAlias.empty() && !weDone) {
- DLOG(L<<Logger::Warning<<"Found nothing that matched for '"<<target.toString()<<"', but did get alias to '"<<haveAlias.toString()<<"', referring"<<endl);
+ DLOG(L<<Logger::Warning<<"Found nothing that matched for '"<<target<<"', but did get alias to '"<<haveAlias<<"', referring"<<endl);
DP->completePacket(r, haveAlias, target);
return 0;
}
goto sendit;
// check whether this could be fixed easily
// if (*(rr.qname.rbegin()) == '.') {
- // L<<Logger::Error<<"Should not get here ("<<p->qdomain.toString()<<"|"<<p->qtype.getCode()<<"): you have a trailing dot, this could be the problem (or run pdnssec rectify-zone " <<sd.qname<<")"<<endl;
+ // L<<Logger::Error<<"Should not get here ("<<p->qdomain<<"|"<<p->qtype.getCode()<<"): you have a trailing dot, this could be the problem (or run pdnssec rectify-zone " <<sd.qname<<")"<<endl;
// } else {
- L<<Logger::Error<<"Should not get here ("<<p->qdomain.toString()<<"|"<<p->qtype.getCode()<<"): please run pdnssec rectify-zone "<<sd.qname.toString()<<endl;
+ L<<Logger::Error<<"Should not get here ("<<p->qdomain<<"|"<<p->qtype.getCode()<<"): please run pdnssec rectify-zone "<<sd.qname<<endl;
// }
}
else {
QType rrType = QType(rr->d_type);
if (rrType == QType::NSEC || rrType == QType::NSEC3) {
- L<<Logger::Warning<<msgPrefix<<"Trying to add/update/delete "<<rr->d_label.toString()<<"|"<<rrType.getName()<<". These are generated records, ignoring!"<<endl;
+ L<<Logger::Warning<<msgPrefix<<"Trying to add/update/delete "<<rr->d_label<<"|"<<rrType.getName()<<". These are generated records, ignoring!"<<endl;
return 0;
}
if (!isPresigned && ((!::arg().mustDo("direct-dnskey") && rrType == QType::DNSKEY) || rrType == QType::RRSIG)) {
- L<<Logger::Warning<<msgPrefix<<"Trying to add/update/delete "<<rr->d_label.toString()<<"|"<<rrType.getName()<<" in non-presigned zone, ignoring!"<<endl;
+ L<<Logger::Warning<<msgPrefix<<"Trying to add/update/delete "<<rr->d_label<<"|"<<rrType.getName()<<" in non-presigned zone, ignoring!"<<endl;
return 0;
}
if ((rrType == QType::NSEC3PARAM || rrType == QType::DNSKEY) && rr->d_label != di->zone) {
- L<<Logger::Warning<<msgPrefix<<"Trying to add/update/delete "<<rr->d_label.toString()<<"|"<<rrType.getName()<<", "<<rrType.getName()<<" must be at zone apex, ignoring!"<<endl;
+ L<<Logger::Warning<<msgPrefix<<"Trying to add/update/delete "<<rr->d_label<<"|"<<rrType.getName()<<", "<<rrType.getName()<<" must be at zone apex, ignoring!"<<endl;
return 0;
}
if (rr->d_class == QClass::IN) { // 3.4.2.2 QClass::IN means insert or update
- DLOG(L<<msgPrefix<<"Add/Update record (QClass == IN) "<<rr->d_label.toString()<<"|"<<rrType.getName()<<endl);
+ DLOG(L<<msgPrefix<<"Add/Update record (QClass == IN) "<<rr->d_label<<"|"<<rrType.getName()<<endl);
if (rrType == QType::NSEC3PARAM) {
L<<Logger::Notice<<msgPrefix<<"Adding/updating NSEC3PARAM for zone, resetting ordernames."<<endl;
di->backend->replaceRRSet(di->id, oldRec->qname, oldRec->qtype, rrset);
*updatedSerial = true;
changedRecords++;
- L<<Logger::Notice<<msgPrefix<<"Replacing record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Replacing record "<<rr->d_label<<"|"<<rrType.getName()<<endl;
} else {
L<<Logger::Notice<<msgPrefix<<"Provided serial ("<<sdUpdate.serial<<") is older than the current serial ("<<sdOld.serial<<"), ignoring SOA update."<<endl;
}
}
if (changedCNames > 0) {
di->backend->replaceRRSet(di->id, rr->d_label, rrType, rrset);
- L<<Logger::Notice<<msgPrefix<<"Replacing record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Replacing record "<<rr->d_label<<"|"<<rrType.getName()<<endl;
changedRecords += changedCNames;
} else {
- L<<Logger::Notice<<msgPrefix<<"Replace for record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<" requested, but no changes made."<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Replace for record "<<rr->d_label<<"|"<<rrType.getName()<<" requested, but no changes made."<<endl;
}
// In any other case, we must check if the TYPE and RDATA match to provide an update (which effectily means a update of TTL)
}
if (updateTTL > 0) {
di->backend->replaceRRSet(di->id, rr->d_label, rrType, rrset);
- L<<Logger::Notice<<msgPrefix<<"Replacing record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Replacing record "<<rr->d_label<<"|"<<rrType.getName()<<endl;
changedRecords += updateTTL;
} else {
- L<<Logger::Notice<<msgPrefix<<"Replace for record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<" requested, but no changes made."<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Replace for record "<<rr->d_label<<"|"<<rrType.getName()<<" requested, but no changes made."<<endl;
}
}
// If we haven't found a record that matches, we must add it.
if (! foundRecord) {
- L<<Logger::Notice<<msgPrefix<<"Adding record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Adding record "<<rr->d_label<<"|"<<rrType.getName()<<endl;
delnonterm.insert(rr->d_label); // always remove any ENT's in the place where we're going to add a record.
DNSResourceRecord newRec(*rr);
newRec.domain_id = di->id;
// If we insert an NS, all the records below it become non auth - so, we're inserting a delegate.
// Auth can only be false when the rr->d_label is not the zone
if (auth == false && rrType == QType::NS) {
- DLOG(L<<msgPrefix<<"Going to fix auth flags below "<<rr->d_label.toString()<<endl);
+ DLOG(L<<msgPrefix<<"Going to fix auth flags below "<<rr->d_label<<endl);
insnonterm.clear(); // No ENT's are needed below delegates (auth=0)
vector<DNSName> qnames;
di->backend->listSubZone(rr->d_label, di->id);
// Delete records - section 3.4.2.3 and 3.4.2.4 with the exception of the 'always leave 1 NS rule' as that's handled by
// the code that calls this performUpdate().
if ((rr->d_class == QClass::ANY || rr->d_class == QClass::NONE) && rrType != QType::SOA) { // never delete a SOA.
- DLOG(L<<msgPrefix<<"Deleting records: "<<rr->d_label.toString()<<"; QClasse:"<<rr->d_class<<"; rrType: "<<rrType.getName()<<endl);
+ DLOG(L<<msgPrefix<<"Deleting records: "<<rr->d_label<<"; QClasse:"<<rr->d_class<<"; rrType: "<<rrType.getName()<<endl);
if (rrType == QType::NSEC3PARAM) {
L<<Logger::Notice<<msgPrefix<<"Deleting NSEC3PARAM from zone, resetting ordernames."<<endl;
if (recordsToDelete.size()) {
di->backend->replaceRRSet(di->id, rr->d_label, rrType, rrset);
- L<<Logger::Notice<<msgPrefix<<"Deleting record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Deleting record "<<rr->d_label<<"|"<<rrType.getName()<<endl;
changedRecords += recordsToDelete.size();
}
}
} else { // if (recordsToDelete.size())
- L<<Logger::Notice<<msgPrefix<<"Deletion for record "<<rr->d_label.toString()<<"|"<<rrType.getName()<<" requested, but not found."<<endl;
+ L<<Logger::Notice<<msgPrefix<<"Deletion for record "<<rr->d_label<<"|"<<rrType.getName()<<" requested, but not found."<<endl;
}
} // (End of delete block d_class == ANY || d_class == NONE
}
if (!validKey) {
- L<<Logger::Error<<msgPrefix<<"TSIG key ("<<inputkey.toString()<<") required, but no matching key found in domainmetadata, tried "<<tsigKeys.size()<<". Sending REFUSED"<<endl;
+ L<<Logger::Error<<msgPrefix<<"TSIG key ("<<inputkey<<") required, but no matching key found in domainmetadata, tried "<<tsigKeys.size()<<". Sending REFUSED"<<endl;
return RCode::Refused;
}
}
DomainInfo di;
di.backend=0;
if(!B.getDomainInfo(p->qdomain, di) || !di.backend) {
- L<<Logger::Error<<msgPrefix<<"Can't determine backend for domain '"<<p->qdomain.toString()<<"' (or backend does not support DNS update operation)"<<endl;
+ L<<Logger::Error<<msgPrefix<<"Can't determine backend for domain '"<<p->qdomain<<"' (or backend does not support DNS update operation)"<<endl;
return RCode::NotAuth;
}
Lock l(&s_rfc2136lock); //TODO: i think this lock can be per zone, not for everything
L<<Logger::Info<<msgPrefix<<"starting transaction."<<endl;
if (!di.backend->startTransaction(p->qdomain, -1)) { // Not giving the domain_id means that we do not delete the existing records.
- L<<Logger::Error<<msgPrefix<<"Backend for domain "<<p->qdomain.toString()<<" does not support transaction. Can't do Update packet."<<endl;
+ L<<Logger::Error<<msgPrefix<<"Backend for domain "<<p->qdomain<<" does not support transaction. Can't do Update packet."<<endl;
return RCode::NotImp;
}
void CommunicatorClass::suck(const DNSName &domain,const string &remote)
{
- L<<Logger::Error<<"Initiating transfer of '"<<domain.toString()<<"' from remote '"<<remote<<"'"<<endl;
+ L<<Logger::Error<<"Initiating transfer of '"<<domain<<"' from remote '"<<remote<<"'"<<endl;
UeberBackend B; // fresh UeberBackend
DomainInfo di;
DNSSECKeeper dk (&B); // reuse our UeberBackend copy for DNSSECKeeper
if(!B.getDomainInfo(domain, di) || !di.backend) { // di.backend and B are mostly identical
- L<<Logger::Error<<"Can't determine backend for domain '"<<domain.toString()<<"'"<<endl;
+ L<<Logger::Error<<"Can't determine backend for domain '"<<domain<<"'"<<endl;
return;
}
uint32_t domain_id=di.id;
if(B.getTSIGKey(tsigkeyname, &tsigalgorithm, &tsigsecret64)) {
B64Decode(tsigsecret64, tsigsecret);
} else {
- L<<Logger::Error<<"TSIG key '"<<tsigkeyname.toString()<<"' for domain '"<<domain.toString()<<"' not found"<<endl;
+ L<<Logger::Error<<"TSIG key '"<<tsigkeyname<<"' for domain '"<<domain<<"' not found"<<endl;
return;
}
}
if(B.getDomainMetadata(domain, "LUA-AXFR-SCRIPT", scripts) && !scripts.empty()) {
try {
pdl.reset(new AuthLua(scripts[0]));
- L<<Logger::Info<<"Loaded Lua script '"<<scripts[0]<<"' to edit the incoming AXFR of '"<<domain.toString()<<"'"<<endl;
+ L<<Logger::Info<<"Loaded Lua script '"<<scripts[0]<<"' to edit the incoming AXFR of '"<<domain<<"'"<<endl;
}
catch(std::exception& e) {
- L<<Logger::Error<<"Failed to load Lua editing script '"<<scripts[0]<<"' for incoming AXFR of '"<<domain.toString()<<"': "<<e.what()<<endl;
+ L<<Logger::Error<<"Failed to load Lua editing script '"<<scripts[0]<<"' for incoming AXFR of '"<<domain<<"': "<<e.what()<<endl;
return;
}
}
if(B.getDomainMetadata(domain, "AXFR-SOURCE", localaddr) && !localaddr.empty()) {
try {
laddr = ComboAddress(localaddr[0]);
- L<<Logger::Info<<"AXFR source for domain '"<<domain.toString()<<"' set to "<<localaddr[0]<<endl;
+ L<<Logger::Info<<"AXFR source for domain '"<<domain<<"' set to "<<localaddr[0]<<endl;
}
catch(std::exception& e) {
- L<<Logger::Error<<"Failed to load AXFR source '"<<localaddr[0]<<"' for incoming AXFR of '"<<domain.toString()<<"': "<<e.what()<<endl;
+ L<<Logger::Error<<"Failed to load AXFR source '"<<localaddr[0]<<"' for incoming AXFR of '"<<domain<<"': "<<e.what()<<endl;
return;
}
} else {
Resolver::res_t recs;
while(retriever.getChunk(recs)) {
if(first) {
- L<<Logger::Error<<"AXFR started for '"<<domain.toString()<<"'"<<endl;
+ L<<Logger::Error<<"AXFR started for '"<<domain<<"'"<<endl;
first=false;
}
continue;
if(!i->qname.isPartOf(domain)) {
- L<<Logger::Error<<"Remote "<<remote<<" tried to sneak in out-of-zone data '"<<i->qname.toString()<<"'|"<<i->qtype.getName()<<" during AXFR of zone '"<<domain.toString()<<"', ignoring"<<endl;
+ L<<Logger::Error<<"Remote "<<remote<<" tried to sneak in out-of-zone data '"<<i->qname<<"'|"<<i->qtype.getName()<<" during AXFR of zone '"<<domain<<"', ignoring"<<endl;
continue;
}
if(!isNSEC3)
L<<Logger::Info<<"Adding NSEC ordering information"<<endl;
else if(!isNarrow)
- L<<Logger::Info<<"Adding NSEC3 hashed ordering information for '"<<domain.toString()<<"'"<<endl;
+ L<<Logger::Info<<"Adding NSEC3 hashed ordering information for '"<<domain<<"'"<<endl;
else
L<<Logger::Info<<"Erasing NSEC3 ordering since we are narrow, only setting 'auth' fields"<<endl;
}
transaction=di.backend->startTransaction(domain, domain_id);
- L<<Logger::Error<<"Transaction started for '"<<domain.toString()<<"'"<<endl;
+ L<<Logger::Error<<"Transaction started for '"<<domain<<"'"<<endl;
// update the presigned flag and NSEC3PARAM
if (isDnssecZone) {
}
if(nonterm.size() > maxent) {
- L<<Logger::Error<<"AXFR zone "<<domain.toString()<<" has too many empty non terminals."<<endl;
+ L<<Logger::Error<<"AXFR zone "<<domain<<" has too many empty non terminals."<<endl;
nonterm.clear();
doent=false;
}
DomainInfo& di(val.di);
// might've come from the packethandler
if(!di.backend && !B->getDomainInfo(di.zone, di)) {
- L<<Logger::Warning<<"Ignore domain "<< di.zone.toString()<<" since it has been removed from our backend"<<endl;
+ L<<Logger::Warning<<"Ignore domain "<< di.zone<<" since it has been removed from our backend"<<endl;
continue;
}
}
}
if(maxInception == ssr.d_freshness[di.id].theirInception && maxExpire == ssr.d_freshness[di.id].theirExpire) {
- L<<Logger::Info<<"Domain '"<< di.zone.toString()<<"' is fresh and apex RRSIGs match"<<endl;
+ L<<Logger::Info<<"Domain '"<< di.zone<<"' is fresh and apex RRSIGs match"<<endl;
di.backend->setFresh(di.id);
}
else {
if(q->d_dnssecOk)
outpacket->d_dnssecOk=true; // RFC 5936, 2.2.5 'SHOULD'
- L<<Logger::Error<<"AXFR of domain '"<<target.toString()<<"' initiated by "<<q->getRemote()<<endl;
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' initiated by "<<q->getRemote()<<endl;
// determine if zone exists and AXFR is allowed using existing backend before spawning a new backend.
SOAData sd;
}
if (!canDoAXFR(q)) {
- L<<Logger::Error<<"AXFR of domain '"<<target.toString()<<"' failed: "<<q->getRemote()<<" cannot request AXFR"<<endl;
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' failed: "<<q->getRemote()<<" cannot request AXFR"<<endl;
outpacket->setRcode(9); // 'NOTAUTH'
sendPacket(outpacket,outsock);
return 0;
// canDoAXFR does all the ACL checks, and has the if(disable-axfr) shortcut, call it first.
if(!s_P->getBackend()->getSOAUncached(target, sd)) {
- L<<Logger::Error<<"AXFR of domain '"<<target.toString()<<"' failed: not authoritative"<<endl;
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' failed: not authoritative"<<endl;
outpacket->setRcode(9); // 'NOTAUTH'
sendPacket(outpacket,outsock);
return 0;
UeberBackend db;
if(!db.getSOAUncached(target, sd)) {
- L<<Logger::Error<<"AXFR of domain '"<<target.toString()<<"' failed: not authoritative in second instance"<<endl;
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' failed: not authoritative in second instance"<<endl;
outpacket->setRcode(RCode::NotAuth);
sendPacket(outpacket,outsock);
return 0;
if(dk.getNSEC3PARAM(target, &ns3pr, &narrow)) {
NSEC3Zone=true;
if(narrow) {
- L<<Logger::Error<<"Not doing AXFR of an NSEC3 narrow zone '"<<target.toString()<<"' for "<<q->getRemote()<<endl;
+ L<<Logger::Error<<"Not doing AXFR of an NSEC3 narrow zone '"<<target<<"' for "<<q->getRemote()<<endl;
noAXFRBecauseOfNSEC3Narrow=true;
}
}
if(noAXFRBecauseOfNSEC3Narrow) {
- L<<Logger::Error<<"AXFR of domain '"<<target.toString()<<"' denied to "<<q->getRemote()<<endl;
+ L<<Logger::Error<<"AXFR of domain '"<<target<<"' denied to "<<q->getRemote()<<endl;
outpacket->setRcode(RCode::Refused);
// FIXME: should actually figure out if we are auth over a zone, and send out 9 if we aren't
sendPacket(outpacket,outsock);
}
rrs.push_back(rr);
} else {
- L<<Logger::Warning<<"Zone '"<<target<<"' contains out-of-zone data '"<<rr.qname.toString()<<"'|"<<rr.qtype.getName()<<"', ignoring"<<endl;
+ L<<Logger::Warning<<"Zone '"<<target<<"' contains out-of-zone data '"<<rr.qname<<"'|"<<rr.qtype.getName()<<"', ignoring"<<endl;
continue;
}
}
UeberBackend db;
if(!db.getSOAUncached(target, sd)) {
- L<<Logger::Error<<"IXFR of domain '"<<target.toString()<<"' failed: not authoritative in second instance"<<endl;
+ L<<Logger::Error<<"IXFR of domain '"<<target<<"' failed: not authoritative in second instance"<<endl;
outpacket->setRcode(RCode::NotAuth);
sendPacket(outpacket,outsock);
return 0;
sendPacket(outpacket, outsock);
- L<<Logger::Error<<"IXFR of domain '"<<target.toString()<<"' to "<<q->getRemote()<<" finished"<<endl;
+ L<<Logger::Error<<"IXFR of domain '"<<target<<"' to "<<q->getRemote()<<" finished"<<endl;
return 1;
}
- L<<Logger::Error<<"IXFR fallback to AXFR for domain '"<<target.toString()<<"' our serial "<<sd.serial<<endl;
+ L<<Logger::Error<<"IXFR fallback to AXFR for domain '"<<target<<"' our serial "<<sd.serial<<endl;
return doAXFR(q->qdomain, q, outsock);
}
throw PDNSException("We are stale, please recycle");
}
- DLOG(L<<"UeberBackend received question for "<<qtype.getName()<<" of "<<qname.toString()<<endl);
+ DLOG(L<<"UeberBackend received question for "<<qtype.getName()<<" of "<<qname<<endl);
if(!d_go) {
pthread_mutex_lock(&d_mut);
while (d_go==false) {