Changeset 1438
- Timestamp:
- 10/15/09 22:56:09 (5 months ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 3 modified
-
pdns_recursor.cc (modified) (2 diffs)
-
syncres.cc (modified) (3 diffs)
-
syncres.hh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/pdns_recursor.cc
r1433 r1438 1810 1810 1811 1811 SyncRes::s_maxnegttl=::arg().asNum("max-negative-ttl"); 1812 SyncRes::s_maxcachettl=::arg().asNum("max-cache-ttl"); 1812 1813 SyncRes::s_serverID=::arg()["server-id"]; 1813 1814 if(SyncRes::s_serverID.empty()) { … … 2083 2084 ::arg().set("max-cache-entries", "If set, maximum number of entries in the main cache")="1000000"; 2084 2085 ::arg().set("max-negative-ttl", "maximum number of seconds to keep a negative cached entry in memory")="3600"; 2086 ::arg().set("max-cache-ttl", "maximum number of seconds to keep a cached entry in memory")="86400"; 2085 2087 ::arg().set("server-id", "Returned when queried for 'server.id' TXT or NSID, defaults to hostname")=""; 2086 2088 ::arg().set("remotes-ringbuffer-entries", "maximum number of packets to store statistics for")="0"; -
trunk/pdns/pdns/syncres.cc
r1436 r1438 51 51 52 52 unsigned int SyncRes::s_maxnegttl; 53 unsigned int SyncRes::s_maxcachettl; 53 54 unsigned int SyncRes::s_queries; 54 55 unsigned int SyncRes::s_outgoingtimeouts; … … 946 947 947 948 // reap all answers from this packet that are acceptable 948 for(LWResult::res_t:: const_iterator i=lwr.d_result.begin();i != lwr.d_result.end();++i) {949 for(LWResult::res_t::iterator i=lwr.d_result.begin();i != lwr.d_result.end();++i) { 949 950 if(i->qtype.getCode() == QType::OPT) { 950 951 LOG<<prefix<<qname<<": skipping OPT answer '"<<i->qname<<"' from '"<<auth<<"' nameservers" <<endl; … … 965 966 else { 966 967 LOG<<"YES!"<<endl; 968 969 i->ttl=min(s_maxcachettl, i->ttl); 967 970 968 971 DNSResourceRecord rr=*i; 969 972 rr.d_place=DNSResourceRecord::ANSWER; 970 973 971 rr.ttl=min(86400*14U, rr.ttl); // limit TTL to two weeks972 974 rr.ttl += d_now.tv_sec; 973 975 -
trunk/pdns/pdns/syncres.hh
r1430 r1438 386 386 struct timeval d_now; 387 387 static unsigned int s_maxnegttl; 388 static unsigned int s_maxcachettl; 388 389 static string s_serverID; 389 390