summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-17 22:42:35 -0800
committerPixel <pixel@nobis-crew.org>2011-11-17 22:42:35 -0800
commita5de1d0383f668fecb7e3b9bf4263ec45cd5fd1d (patch)
treeb8ff6d48592758367b476397bb0a64f1f8fe587c /src
parent1b7a57d7f88cab0a1968e8c886eac3629dc74617 (diff)
Look at that. It seems that, indeed, IPv6 CAN get very retarded.
Diffstat (limited to 'src')
-rw-r--r--src/Socket.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Socket.cc b/src/Socket.cc
index 052f6a8..ad7edaf 100644
--- a/src/Socket.cc
+++ b/src/Socket.cc
@@ -243,6 +243,11 @@ Balau::Socket::Socket() throw (GeneralException) : m_fd(socket(AF_INET6, SOCK_ST
#else
fcntl(m_fd, F_SETFL, O_NONBLOCK);
#endif
+
+ int on = 0;
+ int r = setsockopt(m_fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &on, sizeof(on));
+ Assert(r == 0);
+
memset(&m_localAddr, 0, sizeof(m_localAddr));
memset(&m_remoteAddr, 0, sizeof(m_remoteAddr));
Printer::elog(E_SOCKET, "Creating a socket at %p", this);