From 92e9cfa814feb7e11d74c316ed0be695e3894ab1 Mon Sep 17 00:00:00 2001 From: louchenyao Date: Thu, 16 Jan 2020 20:11:44 +0800 Subject: [PATCH] minor --- freedns/freedns.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freedns/freedns.go b/freedns/freedns.go index 47886cd..0f3a83d 100644 --- a/freedns/freedns.go +++ b/freedns/freedns.go @@ -176,6 +176,9 @@ func (s *Server) lookup(req *dns.Msg, net string) (*dns.Msg, string) { } } + // dns.Msg.SetReply() always set the Rcode to RcodeSuccess which we do not want + rcode := res.Rcode res.SetReply(req) + res.Rcode = rcode return res, upstream }