Permalink
Browse files

improve logging of sendmsg order - we may be logging errors about inv…

…alid remote addresses
  • Loading branch information...
1 parent 3cdaed5 commit 4f217ce4ec961ad7876347fd5a9a113d26da3dd2 @ahupowerdns ahupowerdns committed Mar 21, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 pdns/nameserver.cc
View
@@ -329,7 +329,7 @@ void UDPNameserver::send(DNSPacket *p)
L<<Logger::Error<<"Weird, trying to send a message that needs truncation, "<< buffer.length()<<" > "<<p->getMaxReplyLen()<<endl;
}
if(sendmsg(p->getSocket(), &msgh, 0) < 0)
- L<<Logger::Error<<"Error sending reply with sendmsg (socket="<<p->getSocket()<<"): "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Error sending reply with sendmsg (socket="<<p->getSocket()<<", dest="<<p->d_remote.toStringWithPort()<<"): "<<strerror(errno)<<endl;
}
static bool HarvestDestinationAddress(struct msghdr* msgh, ComboAddress* destination)

0 comments on commit 4f217ce

Please sign in to comment.