mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 00:04:15 -04:00
Update upstream.Lookup method comment to reflect current state (#4832)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
This commit is contained in:
@@ -18,7 +18,9 @@ type Upstream struct{}
|
||||
// New creates a new Upstream to resolve names using the coredns process.
|
||||
func New() *Upstream { return &Upstream{} }
|
||||
|
||||
// Lookup routes lookups to our selves or forward to a remote.
|
||||
// Lookup routes lookups to our selves to make it follow the plugin chain *again*, but with a (possibly) new query. As
|
||||
// we are doing the query against ourselves again, there is no actual new hop, as such RFC 6891 does not apply and we
|
||||
// need the EDNS0 option present in the *original* query to be present here too.
|
||||
func (u *Upstream) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) {
|
||||
server, ok := ctx.Value(dnsserver.Key{}).(*dnsserver.Server)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user