fuzz: fix forward plugin target (#6115)

Signed-off-by: Philippe Antoine <contact@catenacyber.fr>
This commit is contained in:
Catena cyber 2023-05-25 15:09:56 +02:00 committed by GitHub
parent 21fe7eaa35
commit 31ff926ea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@ package forward
import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/pkg/fuzz"
"github.com/coredns/coredns/plugin/pkg/proxy"
"github.com/miekg/dns"
)
@ -16,8 +17,8 @@ var f *Forward
func init() {
f = New()
s := dnstest.NewServer(r{}.reflectHandler)
f.SetProxy(NewProxy(s.Addr, "tcp"))
f.SetProxy(NewProxy(s.Addr, "udp"))
f.SetProxy(proxy.NewProxy(s.Addr, "tcp"))
f.SetProxy(proxy.NewProxy(s.Addr, "udp"))
}
// Fuzz fuzzes forward.