]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
kill some mallocs we were doing for EDNS PING which we don't use right now
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 6 Jan 2015 11:48:54 +0000 (12:48 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 6 Jan 2015 11:48:54 +0000 (12:48 +0100)
pdns/lwres.cc

index 8830a11e42bce9491d63a4833cfed4ba4eb0d669..aa863bdffe09653f05f6f400c37bbacd968132c2 100644 (file)
@@ -63,12 +63,12 @@ int asyncresolve(const ComboAddress& ip, const string& domain, int type, bool do
   
   string ping;
 
-  uint32_t nonce=dns_random(0xffffffff);
-  ping.assign((char*) &nonce, 4);
-
   if(EDNS0Level && !doTCP) {
     DNSPacketWriter::optvect_t opts;
     if(EDNS0Level > 1) {
+      uint32_t nonce=dns_random(0xffffffff);
+      ping.assign((char*) &nonce, 4);
+
       opts.push_back(make_pair(5, ping));
     }