PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.7k stars 908 forks source link

Negative TTL seen as valid in cache #303

Closed Habbie closed 11 years ago

Habbie commented 11 years ago

Having just spoken with 'ahu' on IRC they suggested I file a bug on this issue.

Host being looked up: live.cardeasexml.com

When the record for live.cardeasexml.com is initially returned by it's authoritative NS it's TTL is 120. This works fine initially, and when I dump the cache it shows the TTL (or time to die, as I understand pdns sees it) is decreasing each time I dump the cache. All this time, pdns returns the valid response to queries, but when it goes negative it stops doing so, with the following log entry (cache entry is below this):


Jun  9 13:35:05 testenv pdns_recursor[27903]: 1 [2] question for 'live.cardeasexml.com.|A' from x.x.x.x
#
Jun  9 13:35:05 testenv pdns_recursor[27903]: [2] live.cardeasexml.com.: Looking for CNAME cache hit of 'live.cardeasexml.com.|CNAME'
#
Jun  9 13:35:05 testenv pdns_recursor[27903]: [2] live.cardeasexml.com.: No CNAME cache hit of 'live.cardeasexml.com.|CNAME' found
#
Jun  9 13:35:05 testenv pdns_recursor[27903]: AMF: Lookup for 'live.cardeasexml.com.|A
#
Jun  9 13:35:05 testenv pdns_recursor[27903]: AMF: 1276086905 : 1276090363
#
Jun  9 13:35:05 testenv pdns_recursor[27903]: [2] live.cardeasexml.com.: A is negatively cached via 'cardeasexml.com.' for another 3458 seconds
#
Jun  9 13:35:05 testenv pdns_recursor[27903]: [2] cardeasexml.com.: Found cache hit for SOA: pdns1.ultradns.net. will\.brouns.creditcall.co.uk. 2010060901 10800 3600 2592000 3600[ttl=3458]
#
Jun  9 13:35:05 testenv pdns_recursor[27903]: 1 [2] answer to question 'live.cardeasexml.com.|A': 0 answers, 0 additional, took 0 packets, 0 throttled, 0 timeouts, 0 tcp connections, rcode=0

cache:

live.cardeasexml.com. -707 IN CNAME live-uk.cardeasexml.com.
live-uk.cardeasexml.com. -707 IN A 91.197.93.250
cardeasexml.com. 85573 IN SOA pdns1.ultradns.net. will\.brouns.creditcall.co.uk. 2010060901 10800 3600 2592000 
3600
Habbie commented 11 years ago

Author: ahu Andy Fletcher from UKDedicated - marwood - is now fixed