class FindNS
{
public:
- vector<string> lookup(const DNSName &name, DNSBackend *b)
+ vector<string> lookup(const DNSName &name, UeberBackend *b)
{
vector<string> addresses;
if(b) {
b->lookup(QType(QType::ANY),name);
- DNSResourceRecord rr;
+ DNSZoneRecord rr;
while(b->get(rr))
- if(rr.qtype.getCode() == QType::A || rr.qtype.getCode()==QType::AAAA)
- addresses.push_back(rr.content); // SOL if you have a CNAME for an NS
+ if(rr.dr.d_type == QType::A || rr.dr.d_type==QType::AAAA)
+ addresses.push_back(rr.dr.d_content->getZoneRepresentation()); // SOL if you have a CNAME for an NS
}
return addresses;
}
{
bool hasQueuedItem=false;
set<string> nsset, ips;
- DNSResourceRecord rr;
+ DNSZoneRecord rr;
FindNS fns;
if (d_onlyNotify.size()) {
- B->lookup(QType(QType::NS),domain);
+ B->lookup(QType(QType::NS), di.zone);
while(B->get(rr))
- nsset.insert(rr.content);
+ nsset.insert(getRR<NSRecordContent>(rr.dr)->getNS().toString());
for(set<string>::const_iterator j=nsset.begin();j!=nsset.end();++j) {
vector<string> nsips=fns.lookup(DNSName(*j), B);
if(nsips.empty())
- L<<Logger::Warning<<"Unable to queue notification of domain '"<<domain<<"': nameservers do not resolve!"<<endl;
+ L<<Logger::Warning<<"Unable to queue notification of domain '"<<di.zone<<"': 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<<"' to "<<*j<<" because it does not match only-notify."<<endl;
+ L<<Logger::Info<<"Skipped notification of domain '"<<di.zone<<"' 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<<"' to "<<*j<<endl;
- d_nq.add(domain,*j);
+ L<<Logger::Warning<<"Queued notification of domain '"<<di.zone<<"' to "<<*j<<endl;
+ d_nq.add(di.zone,*j);
hasQueuedItem=true;
}
}
while(B->get(rr))
nsset.insert(DNSName(rr.content));
for(const auto & j: nsset) {
- vector<string> nsips=fns.lookup(j, B);
+ vector<string> nsips=fns.lookup(j, s_P->getBackend());
for(vector<string>::const_iterator k=nsips.begin();k!=nsips.end();++k) {
// cerr<<"got "<<*k<<" from AUTO-NS"<<endl;
if(*k == q->getRemote().toString())