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:
Miek Gieben 2016-03-26 09:26:54 +00:00
parent a832ab696a
commit 90f73c50cf
3 changed files with 40 additions and 5 deletions

View file

@ -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 {