Changeset 509

Show
Ignore:
Timestamp:
10/04/05 19:55:01 (8 years ago)
Author:
ahu
Message:

Fix the bug reported in  http://mailman.powerdns.com/pipermail/pdns-users/2005-October/002703.html
regarding duplicate SRV records with differing weights being weeded down to one.
Plus add a regression test for this

Location:
trunk/pdns
Files:
4 added
2 modified

Legend:

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

    r493 r509  
    241241  if(d_compress) 
    242242    for(vector<DNSResourceRecord>::const_iterator i=rrs.begin();i!=rrs.end();++i)  
    243       if(rr.qname==i->qname && rr.qtype==i->qtype && rr.content==i->content) 
    244         if(rr.qtype.getCode()!=QType::MX || rr.priority==i->priority) 
     243      if(rr.qname==i->qname && rr.qtype==i->qtype && rr.content==i->content) { 
     244        if(rr.qtype.getCode()!=QType::MX && rr.qtype.getCode()!=QType::SRV) 
    245245          return; 
     246        if(rr.priority==i->priority) 
     247          return; 
     248      } 
    246249 
    247250  rrs.push_back(rr); 
     
    11091112  commitD(); 
    11101113 
    1111  
    11121114  len=stringbuffer.length(); 
    11131115} 
  • trunk/pdns/regression-tests/test.com

    r502 r509  
    2121counter                 IN      A       1.1.1.5 
    2222_ldap._tcp.dc           IN      SRV     0 100 389 server1 
     23_double._tcp.dc         IN      SRV     0 100 389 server1 
     24_double._tcp.dc         IN      SRV     1 100 389 server1