From 2576471819a460d3fccbfa035bb5b10eedfc85ad Mon Sep 17 00:00:00 2001 From: Otto Date: Tue, 25 May 2021 13:44:03 +0200 Subject: [PATCH] Log if DoT was requested but not available/compiled in --- pdns/lwres.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pdns/lwres.cc b/pdns/lwres.cc index 0317544cdb..1d5f0f7ccb 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -355,11 +355,14 @@ LWResult::Result asyncresolve(const ComboAddress& ip, const DNSName& domain, int tlsParams.d_validateCertificates = false; //tlsParams.d_caStore = caaStore; tlsCtx = getTLSContext(tlsParams); + if (tlsCtx == nullptr) { + g_log << Logger::Error << "DoT to " << ip << " requested but not available" << endl; + } } auto handler = std::make_shared("", s.releaseHandle(), timeout, tlsCtx, now->tv_sec); - /* auto state = */ handler->tryConnect(SyncRes::s_tcp_fast_open_connect, ip); + // Returned state ignored + handler->tryConnect(SyncRes::s_tcp_fast_open_connect, ip); - //cerr << "state after TryConnect() " << int(state) << endl; uint16_t tlen=htons(vpacket.size()); char *lenP=(char*)&tlen; const char *msgP=(const char*)&*vpacket.begin(); -- 2.47.2