I noticed a strange behaviour on my security-aware resolver.
When resolving a secured domain name, the resolver receives DS RRset along with NS RRset. But when it processes to the validation of the data, it asks for for DS RRset again.
It seems it doesn't cache the first one it got.
I don't know if I'm very clear, let's look what happens with www.example.com. IN A ?
. Note that I choose this domain name randomly and does not represent the real one, I didn't event checked if this domain was DNSSEC-secured.
First, the resolver will resolve the domain name:
[...] #Asks NS "." and gets com. NS
Resolver -> NS "com."
Qry: www.example.com. IN A ?
NS "com." -> Resolver
Qry: www.example.com. IN A ?
Auth: example.com. IN NS ns.example.com.
example.com. IN DS
example.com. IN RRSIG (DS)
Add: ns.example.com. IN A IP_NS.EXAMPLE.COM
Resolver -> NS "example.com."
Qry: www.example.com. IN A ?
NS "example.com." -> Resolver
Qry: www.example.com. IN A ?
Ans: www.example.com. IN A IP_WWW.EXAMPLE.COM.
www.example.com. IN RRSIG (A)
Auth: example.com. IN NS ns.example.com.
example.com. IN RRSIG (NS)
Add: ns.example.com. IN A IP_EXAMPLE.COM
ns.example.com. IN RRSIG (A)
Okay, so now, the resolver has the answer, but need to autenticate it.
Resolver -> NS "example.com."
Qry: example.com. IN DNSKEY ?
NS "example.com." -> Resolver
Qry: example.com. IN DNSKEY ?
Ans: example.com. IN DNSKEY (KSK_current)
example.com. IN DNSKEY (ZSK_current)
example.com. IN DNSKEY (ZSK_published)
example.com. IN RRSIG (KSK_current)
example.com. IN RRSIG (ZSK_current)
Resolver -> NS "com."
Qry: example.com. IN DS ?
NS "com." -> Resolver
Qry: example.com. IN DS ?
Auth: example.com. IN NS ns.example.com.
example.com. IN DS
example.com. IN RRSIG (DS)
Add: ns.example.com. IN A IP_EXAMPLE.COM
[...] #Does the same thing with "com. DS ?", but it got it in previous skipped part "[...]"
What's the point of asking something it already got? (TTL are big enough)