]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsproxy.cc prints warning if sendmsg fails 1203/head
authorKonstantinos Natsakis <github.com@aleph-0.net>
Thu, 9 Jan 2014 21:48:36 +0000 (23:48 +0200)
committerKonstantinos Natsakis <github.com@aleph-0.net>
Thu, 9 Jan 2014 21:48:36 +0000 (23:48 +0200)
pdns/dnsproxy.cc

index fe280e438e938f6bd7c7f4210f00ee8bf7b846ce..78d06a95b2090e20f1bf006741f98826174a3502 100644 (file)
@@ -212,7 +212,8 @@ void DNSProxy::mainloop(void)
         if(i->second.anyLocal) {
           addCMsgSrcAddr(&msgh, cbuf, i->second.anyLocal.get_ptr());
         }
-        sendmsg(i->second.outsock, &msgh, 0);
+        if(sendmsg(i->second.outsock, &msgh, 0) < 0)
+          L<<Logger::Warning<<"dnsproxy.cc: Error sending reply with sendmsg (socket="<<i->second.outsock<<"): "<<strerror(errno)<<endl;
         
         PC.insert(&q, &p);
         i->second.created=0;