From: Otto Moerbeek Date: Thu, 12 Jun 2025 09:43:44 +0000 (+0200) Subject: rec: quote NTA reason retruned in negativetrustanchor.server and set answer to be... X-Git-Tag: dnsdist-2.0.0-beta1~19^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee7ffb555dcd8d65c325448743e173f511ddb535;p=thirdparty%2Fpdns.git rec: quote NTA reason retruned in negativetrustanchor.server and set answer to be variable --- diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index 6d29075199..33f20be91e 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -896,6 +896,7 @@ bool SyncRes::doSpecialNamesResolve(const DNSName& qname, const QType qtype, con ans << "\""; answers.emplace_back(QType::TXT, ans.str()); } + d_wasVariable = true; } } @@ -908,11 +909,12 @@ bool SyncRes::doSpecialNamesResolve(const DNSName& qname, const QType qtype, con ans << "\""; ans << negAnchor.first.toString(); // Explicit toString to have a trailing dot if (negAnchor.second.length() != 0) { - ans << " " << negAnchor.second; + ans << " " << txtEscape(negAnchor.second); } ans << "\""; answers.emplace_back(QType::TXT, ans.str()); } + d_wasVariable = true; } }