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 }