]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Log if DoT was requested but not available/compiled in
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 25 May 2021 11:44:03 +0000 (13:44 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 18 Jun 2021 06:47:42 +0000 (08:47 +0200)
pdns/lwres.cc

index 0317544cdba78cdeb213da773b1a2dc00868caa8..1d5f0f7ccba3950bd09ae131000ef95d40b0dc63 100644 (file)
@@ -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<TCPIOHandler>("", 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();