From c4475b556cd644017cc63d99922f89840924589c Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 20 Sep 2018 14:46:11 +0200 Subject: [PATCH] rec: Keep the EDNS status of a server on FormErr with EDNS Note that the choice of DNAME in the unit test is an arbitrary choice, we could even have used A here. (cherry picked from commit 6fb756b6cd49d61eacf7865ce48d0edb62730710) (cherry picked from commit e8cc6a136087c5ede35f55b3a67902dcb0030165) --- pdns/syncres.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 434b29fd47..52068002f3 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -396,7 +396,7 @@ int SyncRes::asyncresolveWrapper(const ComboAddress& ip, bool wantsEDNS, const D return ret; } else if(mode==EDNSStatus::UNKNOWN || mode==EDNSStatus::EDNSOK || mode == EDNSStatus::EDNSIGNORANT ) { - if(res->d_rcode == RCode::FormErr || res->d_rcode == RCode::NotImp) { + if(!res->d_haveEDNS && (res->d_rcode == RCode::FormErr || res->d_rcode == RCode::NotImp)) { // cerr<<"Downgrading to NOEDNS because of "<d_rcode)<<" for query to "<