Skip to content

Instantly share code, notes, and snippets.

@Habbie
Created April 26, 2013 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Habbie/5466851 to your computer and use it in GitHub Desktop.
Save Habbie/5466851 to your computer and use it in GitHub Desktop.
Index: pdns/nameserver.cc
===================================================================
--- pdns/nameserver.cc (revision 3022)
+++ pdns/nameserver.cc (working copy)
@@ -104,7 +104,7 @@
Utility::setCloseOnExec(s);
- if(locals.size() > 1 && !Utility::setNonBlocking(s))
+ if(!Utility::setNonBlocking(s))
throw AhuException("Unable to set UDP socket to non-blocking: "+stringerror());
memset(&locala,0,sizeof(locala));
@@ -169,6 +169,9 @@
if(s<0)
throw AhuException("Unable to acquire a UDPv6 socket: "+string(strerror(errno)));
+ if(!Utility::setNonBlocking(s))
+ throw AhuException("Unable to set UDPv6 socket to non-blocking: "+stringerror());
+
ComboAddress locala(localname, ::arg().asNum("local-port"));
if(IsAnyAddress(locala)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment