return result;
}
-const string& DNSPacket::getTSIGKeyname() const {
+const DNSName& DNSPacket::getTSIGKeyname() const {
return d_tsigkeyname;
}
string d_peer_principal;
const DNSName& getTSIGKeyname() const;
- ComboAddress d_remote;
uint16_t qclass; //!< class of the question - should always be INternet 2
struct dnsheader d; //!< dnsheader at the start of the databuffer 12
- uint16_t qclass; //!< class of the question - should always be INternet 2
QType qtype; //!< type of the question 2
TSIGRecordContent d_trc; //72
{
UeberBackend B;
vector<string> meta;
- string tsigkeyname;
- string tsigalgorithm;
+ DNSName tsigkeyname;
+ DNSName tsigalgorithm;
string tsigsecret64;
string tsigsecret;
if (B.getDomainMetadata(domain, "TSIG-ALLOW-AXFR", meta) && meta.size() > 0) {
- tsigkeyname = meta[0];
+ tsigkeyname.toStringNoDot() = meta[0];
}
vector<uint8_t> packet;
*/
-int PacketHandler::trySuperMaster(DNSPacket *p, const string& tsigkeyname)
+int PacketHandler::trySuperMaster(DNSPacket *p, const DNSName& tsigkeyname)
{
if(p->d_tcp)
{
}
}
-int PacketHandler::trySuperMasterSynchronous(DNSPacket *p, const string& tsigkeyname)
+int PacketHandler::trySuperMasterSynchronous(DNSPacket *p, const DNSName& tsigkeyname)
{
Resolver::res_t nsset;
try {
db->createSlaveDomain(p->getRemote(), p->qdomain, nameserver, account);
if (tsigkeyname.empty() == false) {
vector<string> meta;
- meta.push_back(tsigkeyname);
+ meta.push_back(tsigkeyname.toStringNoDot());
db->setDomainMetadata(p->qdomain, "AXFR-MASTER-TSIG", meta);
}
}
meta.clear();
if (B.getDomainMetadata(p->qdomain,"AXFR-MASTER-TSIG",meta) && meta.size() > 0) {
- if (!p->d_havetsig || meta[0] != p->getTSIGKeyname()) {
+ if (!p->d_havetsig || meta[0] != p->getTSIGKeyname().toStringNoDot()) {
L<<Logger::Notice<<"Received NOTIFY for "<<p->qdomain<<" from "<<p->getRemote()<<": expected TSIG key '"<<meta[0]<<", got '"<<p->getTSIGKeyname()<<"'"<<endl;
return RCode::Refused;
}
UeberBackend *getBackend();
- int trySuperMasterSynchronous(DNSPacket *p, const string& tsigkeyname);
+ int trySuperMasterSynchronous(DNSPacket *p, const DNSName& tsigkeyname);
static NetmaskGroup s_allowNotifyFrom;
private:
- int trySuperMaster(DNSPacket *p, const string& tsigkeyname);
+ int trySuperMaster(DNSPacket *p, const DNSName& tsigkeyname);
int processNotify(DNSPacket *);
void addRootReferral(DNSPacket *r);
int doChaosRequest(DNSPacket *p, DNSPacket *r, DNSName &target);