Changeset 1302

Show
Ignore:
Timestamp:
11/18/08 18:20:16 (16 months ago)
Author:
ahu
Message:

fix up MBOXFW fancy records, plus add them to the regression tests

Location:
trunk/pdns
Files:
4 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/dnsrecords.cc

    r1298 r1302  
    343343                 ) 
    344344 
    345 boilerplate_conv(URL, 256,  
     345// "fancy records"  
     346boilerplate_conv(URL, QType::URL,  
    346347                 conv.xfrLabel(d_url); 
     348                 ) 
     349 
     350boilerplate_conv(MBOXFW, QType::MBOXFW,  
     351                 conv.xfrLabel(d_mboxfw); 
    347352                 ) 
    348353 
     
    410415{ 
    411416  URLRecordContent::report(); 
     417  MBOXFWRecordContent::report(); 
    412418} 
    413419 
  • trunk/pdns/pdns/dnsrecords.hh

    r1298 r1302  
    373373}; 
    374374 
     375class MBOXFWRecordContent : public DNSRecordContent // Fake, 'fancy record' with type 256 
     376{ 
     377public: 
     378  includeboilerplate(MBOXFW) 
     379private: 
     380  string d_mboxfw; 
     381}; 
     382 
     383 
    375384#define boilerplate(RNAME, RTYPE)                                                                         \ 
    376385RNAME##RecordContent::DNSRecordContent* RNAME##RecordContent::make(const DNSRecord& dr, PacketReader& pr) \ 
  • trunk/pdns/pdns/packethandler.cc

    r1299 r1302  
    659659    if(mret==2) { // there is some data, but not of the correct type 
    660660      r->clearRecords(); 
    661  
    662       if(d_doFancyRecords) { // MBOXFW, URL <- fake records, emulated with MX and A 
    663         DLOG(L<<"There is some data, but not of the correct type, checking fancy records"<<endl); 
    664         int res=doFancyRecords(p,r,target); 
    665         if(res) { // had a result 
    666           if(res<0) // it was an error 
    667             r->setRcode(RCode::ServFail); 
    668           goto sendit;   
    669         } 
    670       } 
     661    } 
     662    if(d_doFancyRecords) { // MBOXFW, URL <- fake records, emulated with MX and A 
     663      DLOG(L<<"There is some data, but not of the correct type, checking fancy records"<<endl); 
     664      int res=doFancyRecords(p,r,target); 
     665      if(res) { // had a result 
     666        if(res<0) // it was an error 
     667          r->setRcode(RCode::ServFail); 
     668        goto sendit;   
     669      } 
     670    } 
     671    if(mret == 2) { 
    671672      DLOG(L<<"There is some data, but not of the correct type, adding SOA for NXRECORDSET"<<endl); 
    672673      SOAData sd; 
  • trunk/pdns/regression-tests/test.com

    r1298 r1302  
    2525blah                    IN      A       9.9.9.9 
    2626images                  IN      URL     "http://www.ds9a.nl" 
     27bert@test.com.                  IN      MBOXFW  "bert@ds9a.nl"