conv.xfrBlob(d_key);
)
-boilerplate_conv(URL, 256,
+// "fancy records"
+boilerplate_conv(URL, QType::URL,
conv.xfrLabel(d_url);
)
+boilerplate_conv(MBOXFW, QType::MBOXFW,
+ conv.xfrLabel(d_mboxfw);
+ )
+
bool getEDNSOpts(const MOADNSParser& mdp, EDNSOpts* eo)
{
if(mdp.d_header.arcount && !mdp.d_answers.empty() &&
void reportFancyTypes()
{
URLRecordContent::report();
+ MBOXFWRecordContent::report();
}
void reportAllTypes()
string d_url;
};
+class MBOXFWRecordContent : public DNSRecordContent // Fake, 'fancy record' with type 256
+{
+public:
+ includeboilerplate(MBOXFW)
+private:
+ string d_mboxfw;
+};
+
+
#define boilerplate(RNAME, RTYPE) \
RNAME##RecordContent::DNSRecordContent* RNAME##RecordContent::make(const DNSRecord& dr, PacketReader& pr) \
{ \
if(mret==2) { // there is some data, but not of the correct type
r->clearRecords();
-
- if(d_doFancyRecords) { // MBOXFW, URL <- fake records, emulated with MX and A
- DLOG(L<<"There is some data, but not of the correct type, checking fancy records"<<endl);
- int res=doFancyRecords(p,r,target);
- if(res) { // had a result
- if(res<0) // it was an error
- r->setRcode(RCode::ServFail);
- goto sendit;
- }
+ }
+ if(d_doFancyRecords) { // MBOXFW, URL <- fake records, emulated with MX and A
+ DLOG(L<<"There is some data, but not of the correct type, checking fancy records"<<endl);
+ int res=doFancyRecords(p,r,target);
+ if(res) { // had a result
+ if(res<0) // it was an error
+ r->setRcode(RCode::ServFail);
+ goto sendit;
}
+ }
+ if(mret == 2) {
DLOG(L<<"There is some data, but not of the correct type, adding SOA for NXRECORDSET"<<endl);
SOAData sd;
if(getAuth(p, &sd, target, 0)) {
--- /dev/null
+0 test.com. IN MX 7200 25 127.0.0.2.
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='test.com.', qtype=MX