mirror of
https://github.com/coredns/coredns.git
synced 2025-11-15 16:32:23 -05: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:
@@ -102,8 +102,8 @@ x := &ExamplePlugin{}
|
||||
|
||||
c.OnStartup(func() error {
|
||||
if taph := dnsserver.GetConfig(c).Handler("dnstap"); taph != nil {
|
||||
if tapPlugin, ok := taph.(dnstap.Dnstap); ok {
|
||||
x.tapPlugins = append(x.tapPlugins, &tapPlugin)
|
||||
for tapPlugin, ok := taph.(*dnstap.Dnstap); ok; tapPlugin, ok = tapPlugin.Next.(*dnstap.Dnstap) {
|
||||
x.tapPlugins = append(x.tapPlugins, tapPlugin)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user