d_wantsnsid=false;
d_haveednssubnet = false;
d_dnssecOk=false;
+ d_ednsversion=0;
+ d_ednsrcode=0;
}
const string& DNSPacket::getString()
d_eso = orig.d_eso;
d_haveednssubnet = orig.d_haveednssubnet;
d_haveednssection = orig.d_haveednssection;
+ d_ednsversion = orig.d_ednsversion;
+ d_ednsrcode = orig.d_ednsrcode;
d_dnssecOk = orig.d_dnssecOk;
d_rrs=orig.d_rrs;
if(!opts.empty() || d_haveednssection || d_dnssecOk)
{
- pw.addOpt(s_udpTruncationThreshold, 0, d_dnssecOk ? EDNSOpts::DNSSECOK : 0, opts);
+ pw.addOpt(s_udpTruncationThreshold, d_ednsrcode, d_dnssecOk ? EDNSOpts::DNSSECOK : 0, opts);
pw.commit();
}
}
r->d_eso = d_eso;
r->d_haveednssubnet = d_haveednssubnet;
r->d_haveednssection = d_haveednssection;
-
+ r->d_ednsversion = 0;
+ r->d_ednsrcode = 0;
+
if(d_tsigkeyname.countLabels()) {
r->d_tsigkeyname = d_tsigkeyname;
r->d_tsigprevious = d_tsigprevious;
// cerr<<"Have an option #"<<iter->first<<": "<<makeHexDump(iter->second)<<endl;
}
}
+ d_ednsversion = edo.d_version;
+ d_ednsrcode = edo.d_extRCode;
}
else {
d_maxreplylen=512;
bool couldBeCached(); //!< returns 0 if this query should bypass the packet cache
bool hasEDNSSubnet();
bool hasEDNS();
+ uint8_t getEDNSVersion() const { return d_ednsversion; };
+ void setEDNSRcode(uint16_t extRCode)
+ {
+ // WARNING: this is really 12 bits
+ d_ednsrcode=extRCode;
+ };
+ uint8_t getEDNSRCode() const { return d_ednsrcode; };
//////// DATA !
DNSName qdomain; //!< qname of the question 4 - unsure how this is used
EDNSSubnetOpts d_eso;
int d_maxreplylen;
+ uint8_t d_ednsversion;
+ // WARNING! This is really 12 bits
+ uint16_t d_ednsrcode;
uint16_t d_qlen; // length of the question (including class & type) in this packet 2
bool d_compress; // 1