diff options
author | 2021-08-27 05:23:05 -0700 | |
---|---|---|
committer | 2021-08-27 14:23:05 +0200 | |
commit | de30710ed389d053a8f762e4227edd2468fb7aa2 (patch) | |
tree | 3fe4957afdd6804c147054f6fa7b88b34a00bdb6 /plugin | |
parent | 9026a4a295efa216f79e80dd7c544fcf0001ed27 (diff) | |
download | coredns-de30710ed389d053a8f762e4227edd2468fb7aa2.tar.gz coredns-de30710ed389d053a8f762e4227edd2468fb7aa2.tar.zst coredns-de30710ed389d053a8f762e4227edd2468fb7aa2.zip |
Update upstream.Lookup method comment to reflect current state (#4832)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/pkg/upstream/upstream.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/pkg/upstream/upstream.go b/plugin/pkg/upstream/upstream.go index f789d6692..b531b70b5 100644 --- a/plugin/pkg/upstream/upstream.go +++ b/plugin/pkg/upstream/upstream.go @@ -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 { |