]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/lwres.hh
Don't read potentially uninitalized memory if gethostname() failed
[thirdparty/pdns.git] / pdns / lwres.hh
index 5ddc3af0dab4a2a4b84271e9bb4f1857369ac357..36a6d714fcd4d7c647c8467f5a9f0bac81897203 100644 (file)
@@ -19,8 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-#ifndef PDNS_LWRES_HH
-#define PDNS_LWRES_HH
+#pragma once
 #include <string>
 #include <vector>
 #include <sys/types.h>
 #include "dns.hh"
 #include "namespaces.hh"
 #include "remote_logger.hh"
+#include "fstrm_logger.hh"
 #include "resolve-context.hh"
 
+
 int asendto(const char *data, size_t len, int flags, const ComboAddress& ip, uint16_t id,
             const DNSName& domain, uint16_t qtype,  int* fd);
 int arecvfrom(std::string& packet, int flags, const ComboAddress& ip, size_t *d_len, uint16_t id,
@@ -68,5 +69,4 @@ public:
   bool d_haveEDNS{false};
 };
 
-int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional<Netmask>& srcmask, boost::optional<const ResolveContext&> context, const std::shared_ptr<std::vector<std::unique_ptr<RemoteLogger>>>& outgoingLoggers, const std::set<uint16_t>& exportTypes, LWResult* res, bool* chained);
-#endif // PDNS_LWRES_HH
+int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional<Netmask>& srcmask, boost::optional<const ResolveContext&> context, const std::shared_ptr<std::vector<std::unique_ptr<RemoteLogger>>>& outgoingLoggers, const std::shared_ptr<std::vector<std::unique_ptr<FrameStreamLogger>>>& fstrmLoggers, const std::set<uint16_t>& exportTypes, LWResult* res, bool* chained);