pdns caching weirdness with recursion-desired flag #247

Closed
Habbie opened this Issue Apr 26, 2013 · 1 comment

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

Problem:
Answers to questions seem to get cached regardless of the question-queries recursion-desired flag. Which seems to lead to interesting results depending on which query was asked first (replies with SERVFAIL/NOERROR, authoritative answer or not, ..).
I don't think that it's a huge problem for an authoritative setup, except maybe if one would flood it with questions with the rd-flag set.

Setup:
Authoritative PowerDNS server with gmysql backend and a single zone with one CNAME record pointing to www.l.google.com (any external target should work).

$ dig @127.0.0.1 www.testdomain1.at +norec
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29009
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 13
;; ANSWER SECTION:
www.testdomain1.at. 300 IN CNAME www.l.google.com.

$ dig @127.0.0.1 www.testdomain1.at +rec
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54837
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 13
;; WARNING: recursion requested but not available
;; ANSWER SECTION:
www.testdomain1.at. 300 IN CNAME www.l.google.com.

$ pdns_control purge
21

$ dig @127.0.0.1 www.testdomain1.at +rec
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 47501
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; ANSWER SECTION:
www.testdomain1.at. 300 IN CNAME www.l.google.com.

$ dig @127.0.0.1 www.testdomain1.at +norec
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 42631
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; ANSWER SECTION:
www.testdomain1.at. 300 IN CNAME www.l.google.com.

$ pdns_control purge
8

$ dig @127.0.0.1 www.testdomain1.at +norec
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64029
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 13
;; ANSWER SECTION:
www.testdomain1.at. 300 IN CNAME www.l.google.com.

Running PowerDNS 2.9.21.2 (stock Debian Lenny 2.9.21.2-1 package)

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie
Member
Habbie commented Apr 26, 2013

Author: ahu
fixed in 3.x, don't exactly know when.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment