Created
February 13, 2015 09:20
-
-
Save Habbie/107a297695dcac9efe9b to your computer and use it in GitHub Desktop.
full 3.7.1 patch for sendmsg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urN pdns-recursor-git-rec-3.7.1/pdns_recursor.cc pdns-recursor-git-rec-3.7.1-1-g9ce7324/pdns_recursor.cc | |
--- pdns-recursor-git-rec-3.7.1/pdns_recursor.cc 2015-02-13 10:18:33.000000000 +0100 | |
+++ pdns-recursor-git-rec-3.7.1-1-g9ce7324/pdns_recursor.cc 2015-02-13 10:18:54.000000000 +0100 | |
@@ -688,6 +688,8 @@ | |
fillMSGHdr(&msgh, &iov, cbuf, 0, (char*)&*packet.begin(), packet.size(), &dc->d_remote); | |
if(dc->d_local.sin4.sin_family) | |
addCMsgSrcAddr(&msgh, cbuf, &dc->d_local); | |
+ else | |
+ msgh.msg_control=NULL; | |
sendmsg(dc->d_socket, &msgh, 0); | |
if(!SyncRes::s_nopacketcache && !variableAnswer ) { | |
t_packetCache->insertResponsePacket(string((const char*)&*packet.begin(), packet.size()), | |
@@ -961,6 +963,9 @@ | |
if(destaddr.sin4.sin_family) { | |
addCMsgSrcAddr(&msgh, cbuf, &destaddr); | |
} | |
+ else { | |
+ msgh.msg_control=NULL; | |
+ } | |
sendmsg(fd, &msgh, 0); | |
if(response.length() >= sizeof(struct dnsheader)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment