From: Kees Monshouwer Date: Thu, 26 Dec 2013 13:07:27 +0000 (+0100) Subject: aviod address truncation in doNotifications X-Git-Tag: rec-3.6.0-rc1~263^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33966bfb88feb46a34831f51e5e6f30c9261bd78;p=pdns aviod address truncation in doNotifications --- diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index 282971775..a898cc00c 100644 --- a/pdns/mastercommunicator.cc +++ b/pdns/mastercommunicator.cc @@ -144,12 +144,13 @@ void CommunicatorClass::masterUpdateCheck(PacketHandler *P) time_t CommunicatorClass::doNotifications() { ComboAddress from; - Utility::socklen_t fromlen=sizeof(from); + Utility::socklen_t fromlen; char buffer[1500]; int size, sock; // receive incoming notifications on the nonblocking socket and take them off the list while(waitFor2Data(d_nsock4, d_nsock6, 0, 0, &sock) > 0) { + fromlen=sizeof(from); size=recvfrom(sock,buffer,sizeof(buffer),0,(struct sockaddr *)&from,&fromlen); if(size < 0) break; @@ -164,7 +165,7 @@ time_t CommunicatorClass::doNotifications() if(p.d.rcode) L<