mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	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.
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			368 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 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)
 | |
| }
 |