mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
plugin/forward: fix broken tap plugins when dnstap plugins specified (#5890)
* plugin/forward: fix broken tap plugins when dnstap plugins specified --------- Signed-off-by: Gerhard Tan <gwohau.tan@gmail.com>
This commit is contained in:
@@ -66,6 +66,14 @@ func (f *Forward) SetProxy(p *Proxy) {
|
||||
p.start(f.hcInterval)
|
||||
}
|
||||
|
||||
// SetTapPlugin appends one or more dnstap plugins to the tap plugin list.
|
||||
func (f *Forward) SetTapPlugin(tapPlugin *dnstap.Dnstap) {
|
||||
f.tapPlugins = append(f.tapPlugins, tapPlugin)
|
||||
if nextPlugin, ok := tapPlugin.Next.(*dnstap.Dnstap); ok {
|
||||
f.SetTapPlugin(nextPlugin)
|
||||
}
|
||||
}
|
||||
|
||||
// Len returns the number of configured proxies.
|
||||
func (f *Forward) Len() int { return len(f.proxies) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user