mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	Add Scrub function
This function will make the message fit for the client's buffer, or set the TC bit.
This commit is contained in:
		| @@ -3,6 +3,7 @@ package proxy | ||||
|  | ||||
| import ( | ||||
| 	"github.com/miekg/coredns/middleware" | ||||
|  | ||||
| 	"github.com/miekg/dns" | ||||
| ) | ||||
|  | ||||
| @@ -18,7 +19,7 @@ func (p ReverseProxy) ServeDNS(w dns.ResponseWriter, r *dns.Msg, extra []dns.RR) | ||||
| 	) | ||||
| 	state := middleware.State{W: w, Req: r} | ||||
|  | ||||
| 	// tls+tcp ? | ||||
| 	// We forward the original request, no need to fiddle with EDNS0 opt sizes. | ||||
| 	if state.Proto() == "tcp" { | ||||
| 		reply, err = middleware.Exchange(p.Client.TCP, r, p.Host) | ||||
| 	} else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user