mirror of
https://github.com/coredns/coredns.git
synced 2026-10-25 19:55:43 -04:00
plugin/dns64: preserve A fallback response codes (#8619)
* plugin/dns64: preserve fallback response codes Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io> * plugin/dns64: mark written fallback replies as handled Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io> --------- Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io>
This commit is contained in:
@@ -63,7 +63,7 @@ func (d *DNS64) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
||||
|
||||
RequestsTranslatedCount.WithLabelValues(metrics.WithServer(ctx)).Inc()
|
||||
w.WriteMsg(msg)
|
||||
return msg.Rcode, nil
|
||||
return dns.RcodeSuccess, nil
|
||||
}
|
||||
|
||||
// Name implements the Handler interface.
|
||||
@@ -134,6 +134,7 @@ func (d *DNS64) DoDNS64(ctx context.Context, w dns.ResponseWriter, r *dns.Msg, o
|
||||
func (d *DNS64) Synthesize(origReq, origResponse, resp *dns.Msg) *dns.Msg {
|
||||
ret := dns.Msg{}
|
||||
ret.SetReply(origReq)
|
||||
ret.Rcode = resp.Rcode
|
||||
|
||||
// persist truncated state of AAAA response
|
||||
ret.Truncated = resp.Truncated
|
||||
|
||||
Reference in New Issue
Block a user