Changeset 947

Show
Ignore:
Timestamp:
01/15/07 23:13:44 (2 years ago)
Author:
ahu
Message:

fix 'ns with identical glue' giving sort of NXRRSET, plus regression test. Should close Augie Schwer's issue.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pdns/pdns/dnspacket.cc

    r941 r947  
    232232  DLOG(L<<"Adding an A record to the packet!"<<endl); 
    233233  addARecord(rr.qname, htonl(inet_addr(rr.content.c_str())), rr.ttl, rr.d_place); 
     234} 
     235 
     236void DNSPacket::clearRecords() 
     237{ 
     238  rrs.clear(); 
    234239} 
    235240 
  • trunk/pdns/pdns/dnspacket.hh

    r941 r947  
    130130 
    131131 
     132  void clearRecords(); //!< when building a packet, wipe all previously added records 
     133 
    132134  /** Add a DNSResourceRecord to this packet. A DNSPacket (as does a DNS Packet) has 4 kinds of resource records. Questions,  
    133135      Answers, Authority and Additional. See RFC 1034 and 1035 for details. You can specify where a record needs to go in the 
  • trunk/pdns/pdns/packethandler.cc

    r940 r947  
    1 /* 
     1 /* 
    22    PowerDNS Versatile Database Driven Nameserver 
    3     Copyright (C) 2002-2005  PowerDNS.COM BV 
     3    Copyright (C) 2002-2007  PowerDNS.COM BV 
    44 
    55    This program is free software; you can redistribute it and/or modify 
     
    642642 
    643643    if(mret==2) { // there is some data, but not of the correct type 
    644       DLOG(L<<"There is some data, but not of the correct type"<<endl); 
     644      DLOG(L<<"There is some data, but not of the correct type, adding SOA for NXRECORDSET"<<endl); 
    645645      SOAData sd; 
    646646      if(getAuth(p, &sd, target, 0)) { 
     
    763763 
    764764    if(weAuth) { 
    765       DLOG(L<<Logger::Warning<<"Soa found: "<<soa<<endl); 
     765      DLOG(L<<Logger::Warning<<"Soa found: '"<<sd.qname<<"'"<<endl); 
    766766      ; 
    767767    } 
     
    806806         
    807807        while(B.get(rr)) { 
     808          if(!found) 
     809            r->clearRecords(); // we need to start out with an empty slate 
    808810          found=true; 
    809811          rr.d_place=DNSResourceRecord::AUTHORITY; // this for the authority section 
  • trunk/pdns/regression-tests/test.com

    r509 r947  
    2323_double._tcp.dc         IN      SRV     0 100 389 server1 
    2424_double._tcp.dc         IN      SRV     1 100 389 server1 
     25blah                    IN      NS      blah 
     26blah                    IN      A       9.9.9.9