resolver: ask a referral's nameservers that come without addresses (closes #221)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Looking up a nameserver's own address followed only the addresses a referral gave, so a nameserver whose zone is delegated without them, such as a.ntpns.org of pool.ntp.org, never resolved. The walk to a name's nameservers looked addresses up only when a referral gave none. Both now go through queryZone, which asks the nameservers whose addresses the referral gives first and, if none of them gives a usable reply, looks up and asks the others. maxLookupDepth stops lookups three deep, so delegations that point at each other still end; when the limit is why no address was found, the error is ErrLookupDepthExceeded, not "no address". Model: opus-5-5
This commit was merged in pull request #242.
This commit is contained in:
@@ -441,7 +441,12 @@ anew each time, so no one root server gets every first query. A server that does
|
||||
not reply, refuses the query, or gives an error reply such as SERVFAIL or a
|
||||
referral that leads no closer to the name is passed over for the next one. When
|
||||
a referral names a zone's nameservers without their addresses, the addresses of
|
||||
all of them are looked up, so that each can be asked.
|
||||
all of them are looked up, so that each can be asked. When it gives addresses
|
||||
for only some of them, those are asked first, and the others are looked up and
|
||||
asked only if none of those gives a usable reply. Both hold in the walk to a
|
||||
name's nameservers and in the lookup of a nameserver's own address. Such a
|
||||
lookup can need others in turn; lookups go at most three deep, one inside
|
||||
another, so delegations that point at each other still end.
|
||||
|
||||
This approach ensures:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user