]> granicus.if.org Git - pdns/commitdiff
Merge remote-tracking branch 'origin/master' into errno-review
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 16 Jul 2019 08:07:07 +0000 (10:07 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 16 Jul 2019 08:07:07 +0000 (10:07 +0200)
19 files changed:
1  2 
pdns/calidns.cc
pdns/devpollmplexer.cc
pdns/dnsdist-carbon.cc
pdns/dnsdist-lua-bindings.cc
pdns/dnsdist-tcp.cc
pdns/dnsdist.cc
pdns/dnsdist.hh
pdns/dnsproxy.cc
pdns/iputils.cc
pdns/ixfrdist.cc
pdns/misc.cc
pdns/misc.hh
pdns/nameserver.cc
pdns/pdns_recursor.cc
pdns/pdnsutil.cc
pdns/receiver.cc
pdns/syncres.cc
pdns/tcpiohandler.hh
pdns/tcpreceiver.cc

diff --cc pdns/calidns.cc
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc pdns/dnsdist.cc
Simple merge
diff --cc pdns/dnsdist.hh
Simple merge
index 017a59b034ddf84b9a16da232559eeb5ccd3ee15,eafc6663efc6345988aacb75b09a0290a6e04672..e2fad5ff881b65ee71ecbab581658d4db07ff211
@@@ -283,12 -284,11 +283,12 @@@ void DNSProxy::mainloop(void
          msgh.msg_control=NULL;
  
          if(i->second.anyLocal) {
-           addCMsgSrcAddr(&msgh, cbuf, i->second.anyLocal.get_ptr(), 0);
+           addCMsgSrcAddr(&msgh, &cbuf, i->second.anyLocal.get_ptr(), 0);
          }
 -        if(sendmsg(i->second.outsock, &msgh, 0) < 0)
 -          g_log<<Logger::Warning<<"dnsproxy.cc: Error sending reply with sendmsg (socket="<<i->second.outsock<<"): "<<strerror(errno)<<endl;
 -
 +        if(sendmsg(i->second.outsock, &msgh, 0) < 0) {
 +          int err = errno;
 +          g_log<<Logger::Warning<<"dnsproxy.cc: Error sending reply with sendmsg (socket="<<i->second.outsock<<"): "<<stringerror(err)<<endl;
 +        }
          i->second.created=0;
        }
      }
diff --cc pdns/iputils.cc
Simple merge
Simple merge
diff --cc pdns/misc.cc
Simple merge
diff --cc pdns/misc.hh
Simple merge
Simple merge
index 71f054a1300eed86f560e2a279263a016b0ffb7e,03e7c05236ca75c87f958d31ee4fe226b10a6c45..7e41abe8e107f3f340842cdc74808efe9b2615ea
@@@ -1664,13 -1666,10 +1671,13 @@@ static void startDoResolve(void *p
        msgh.msg_control=NULL;
  
        if(g_fromtosockets.count(dc->d_socket)) {
-       addCMsgSrcAddr(&msgh, cbuf, &dc->d_local, 0);
+         addCMsgSrcAddr(&msgh, &cbuf, &dc->d_local, 0);
        }
 -      if(sendmsg(dc->d_socket, &msgh, 0) < 0 && g_logCommonErrors) 
 -        g_log<<Logger::Warning<<"Sending UDP reply to client "<<dc->getRemote()<<" failed with: "<<strerror(errno)<<endl;
 +      if(sendmsg(dc->d_socket, &msgh, 0) < 0 && g_logCommonErrors) {
 +        int err = errno;
 +        g_log << Logger::Warning << "Sending UDP reply to client " << dc->getRemote() << " failed with: "
 +              << strerror(err) << endl;
 +      }
  
        if(variableAnswer || sr.wasVariable()) {
          g_stats.variableResponses++;
@@@ -2327,14 -2329,11 +2338,14 @@@ static string* doProcessUDPQuestion(con
        msgh.msg_control=NULL;
  
        if(g_fromtosockets.count(fd)) {
-       addCMsgSrcAddr(&msgh, cbuf, &destaddr, 0);
+         addCMsgSrcAddr(&msgh, &cbuf, &destaddr, 0);
        }
 -      if(sendmsg(fd, &msgh, 0) < 0 && g_logCommonErrors)
 -        g_log<<Logger::Warning<<"Sending UDP reply to client "<<source.toStringWithPort()<<(source != fromaddr ? " (via "+fromaddr.toStringWithPort()+")" : "")<<" failed with: "<<strerror(errno)<<endl;
 -
 +      if(sendmsg(fd, &msgh, 0) < 0 && g_logCommonErrors) {
 +        int err = errno;
 +        g_log << Logger::Warning << "Sending UDP reply to client " << source.toStringWithPort()
 +              << (source != fromaddr ? " (via " + fromaddr.toStringWithPort() + ")" : "") << " failed with: "
 +              << strerror(err) << endl;
 +      }
        if(response.length() >= sizeof(struct dnsheader)) {
          struct dnsheader tmpdh;
          memcpy(&tmpdh, response.c_str(), sizeof(tmpdh));
Simple merge
Simple merge
diff --cc pdns/syncres.cc
Simple merge
Simple merge
Simple merge