Changeset db037b88b1a8392d998a758523e8d0bd66113c89

Show
Ignore:
Timestamp:
06/02/11 15:29:23 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1307028563 -0400
git-parent:

[afea07dacaef88d02e45234ef24180031f7cd707]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1307028563 -0400
Message:

if we get multiple TTLs in the response, we should fudge it to the lowest one

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check_resolver.c

    rf8c63e9 rdb037b8  
    250250      } 
    251251      else { 
    252         if(ttl == 0) ttl = rr.dnsrr_ttl; 
     252        if(rr.dnsrr_ttl > 0 && (ttl == 0 || rr.dnsrr_ttl < ttl)) 
     253          ttl = rr.dnsrr_ttl; 
    253254        dns_dntodn(p.dnsp_dnbuf, idn, sizeof(idn)); 
    254255      } 
     
    267268    if (p.dnsp_rrl && !rr.dnsrr_dn[0] && rr.dnsrr_typ == DNS_T_OPT) continue; 
    268269    if (rtype == rr.dnsrr_typ) { 
    269       if (ttl == 0) ttl = rr.dnsrr_ttl; 
     270      if(rr.dnsrr_ttl > 0 && (ttl == 0 || rr.dnsrr_ttl < ttl)) 
     271        ttl = rr.dnsrr_ttl; 
    270272      switch(rr.dnsrr_typ) { 
    271273        case DNS_T_A: