ndb/dns: ignore terminating authoritative flag for no-answer when more nameservers are provided
continue recursing when we get empty but non-negative answer from a (claimed) authoritative nameserer that provides more nameservers. this fixes wordpress dns: 63766.3: sending to 192.0.80.93/ns1.wordpress.com bossypally.files.wordpress.com ip 63766: rcvd OK from 192.0.80.93 (authoritative) Q: bossypally.files.wordpress.com ip Auth: files.wordpress.com 5 min ns mdns1.wordpress.com files.wordpress.com 5 min ns mdns2.wordpress.com files.wordpress.com 5 min ns mdns3.wordpress.com files.wordpress.com 5 min ns mdns4.wordpress.com files.wordpress.com 5 min ns mdns5.wordpress.com Hint: mdns1.wordpress.com 4 hr ip 192.0.75.7 mdns2.wordpress.com 4 hr ip 198.181.117.7 mdns3.wordpress.com 4 hr ip 198.181.116.7 mdns4.wordpress.com 4 hr ip 198.181.118.7 mdns5.wordpress.com 4 hr ip 192.0.74.7 63766.4: sending to 192.0.75.7/mdns1.wordpress.com bossypally.files.wordpress.com ip 63766: rcvd OK from 192.0.75.7 (authoritative) Q: bossypally.files.wordpress.com ip Ans: bossypally.files.wordpress.com 5 min ip 192.0.72.2 bossypally.files.wordpress.com 5 min ip 192.0.72.3 ---------------------------- answer bossypally.files.wordpress.com 5 min ip 192.0.72.2 answer bossypally.files.wordpress.com 5 min ip 192.0.72.3 ---------------------------- note the authoritative flag in the first response from ns1.wordpress.com that would otherwise terminate the search.
This commit is contained in:
parent
887d02274d
commit
501e69d010
1 changed files with 4 additions and 3 deletions
|
@ -1229,11 +1229,12 @@ procansw(Query *qp, DNSmsg *mp, int depth, Dest *p)
|
|||
}
|
||||
|
||||
/*
|
||||
* Any reply from an authoritative server,
|
||||
* Any reply from an authoritative server
|
||||
* that does not provide more nameservers,
|
||||
* or a positive reply terminates the search.
|
||||
* A negative response now also terminates the search.
|
||||
*/
|
||||
if(mp->an != nil || (mp->flags & Fauth)){
|
||||
if(mp->an || (mp->flags & Fauth) && mp->ns == nil){
|
||||
if(isnegrname(mp))
|
||||
qp->dp->respcode = Rname;
|
||||
else
|
||||
|
@ -1267,7 +1268,7 @@ procansw(Query *qp, DNSmsg *mp, int depth, Dest *p)
|
|||
* if we're a pure resolver, don't recurse, we have
|
||||
* to forward to a fixed set of named servers.
|
||||
*/
|
||||
if(!mp->ns || cfg.resolver && cfg.justforw)
|
||||
if(mp->ns == nil || cfg.resolver && cfg.justforw)
|
||||
return Answnone;
|
||||
tp = rrlookup(ndp, Tns, NOneg);
|
||||
if(contains(qp->nsrp, tp)){
|
||||
|
|
Loading…
Reference in a new issue