From: Peter van Dijk Date: Wed, 8 Jun 2016 05:32:17 +0000 (+0000) Subject: make sure we set msgh.msg_control to NULL if we're not using it X-Git-Tag: auth-4.0.0-rc1~2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eae691f2add093cb1617fc9fe05ea87d79d529b;p=thirdparty%2Fpdns.git make sure we set msgh.msg_control to NULL if we're not using it --- diff --git a/pdns/dnsproxy.cc b/pdns/dnsproxy.cc index bd1d5f6dcf..1282744b4d 100644 --- a/pdns/dnsproxy.cc +++ b/pdns/dnsproxy.cc @@ -276,6 +276,7 @@ void DNSProxy::mainloop(void) msgh.msg_iovlen = 1; msgh.msg_name = (struct sockaddr*)&i->second.remote; msgh.msg_namelen = i->second.remote.getSocklen(); + msgh.msg_control=NULL; if(i->second.anyLocal) { addCMsgSrcAddr(&msgh, cbuf, i->second.anyLocal.get_ptr(), 0); diff --git a/pdns/nameserver.cc b/pdns/nameserver.cc index 561fc98e75..44c33a8c57 100644 --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@ -291,12 +291,10 @@ void UDPNameserver::send(DNSPacket *p) fillMSGHdr(&msgh, &iov, cbuf, 0, (char*)buffer.c_str(), buffer.length(), &p->d_remote); + msgh.msg_control=NULL; if(p->d_anyLocal) { addCMsgSrcAddr(&msgh, cbuf, p->d_anyLocal.get_ptr(), 0); } - else { - msgh.msg_control=NULL; - } DLOG(L<getRemote() <<" ("<< buffer.length()<<" octets)"< p->getMaxReplyLen()) { L< "<getMaxReplyLen()<