coredns/plugin/rewrite/fuzz.go
Miek Gieben e08d3335b0
fuzz: revert setup function (#3189)
This can't be used in its current form; revert the entire PR.

Revert "fuzzing: allow setup function to be called (#3175)"

This reverts commit 62451fd3eb.
2019-08-25 19:01:35 +00:00

21 lines
368 B
Go

// +build gofuzz
package rewrite
import (
"github.com/coredns/coredns/plugin/pkg/fuzz"
"github.com/caddyserver/caddy"
)
// Fuzz fuzzes rewrite.
func Fuzz(data []byte) int {
c := caddy.NewTestController("dns", "rewrite edns0 subnet set 24 56")
rules, err := rewriteParse(c)
if err != nil {
return 0
}
r := Rewrite{Rules: rules}
return fuzz.Do(r, data)
}